refactor(spec/system/admin/subscriptions_spec.rb): issue #7483

Add context when using copy button to fill in ship address.
This commit is contained in:
paulo-felipe
2023-05-11 20:55:48 -03:00
parent aa16110e9a
commit 7efc68281e

View File

@@ -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