From 7efc68281e5fc237256b2106ee309777c3e26730 Mon Sep 17 00:00:00 2001 From: paulo-felipe Date: Thu, 11 May 2023 20:55:48 -0300 Subject: [PATCH] refactor(spec/system/admin/subscriptions_spec.rb): issue #7483 Add context when using copy button to fill in ship address. --- spec/system/admin/subscriptions_spec.rb | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/spec/system/admin/subscriptions_spec.rb b/spec/system/admin/subscriptions_spec.rb index 3d02afc40d..3ff5441654 100644 --- a/spec/system/admin/subscriptions_spec.rb +++ b/spec/system/admin/subscriptions_spec.rb @@ -308,13 +308,16 @@ describe 'Subscriptions' do select2_select "Victoria", from: "bill_address_state_id" end - it 'has input with ship address values' do - # Use copy button to fill in ship address - click_link "Copy" - expect(page).to have_input "ship_address_firstname", with: 'Freda' - expect(page).to have_input "ship_address_lastname", with: 'Figapple' - expect(page).to have_input "ship_address_address1", with: '7 Tempany Lane' + context 'and using copy button to fill in ship address' do + before { click_link "Copy" } + + it 'has input with ship address values' do + expect(page).to have_input "ship_address_firstname", with: 'Freda' + expect(page).to have_input "ship_address_lastname", with: 'Figapple' + expect(page).to have_input "ship_address_address1", with: '7 Tempany Lane' + end end + end end end