From aa16110e9ae32e72fb94eed3ad5dbd3a5f95d605 Mon Sep 17 00:00:00 2001 From: paulo-felipe Date: Thu, 11 May 2023 20:48:16 -0300 Subject: [PATCH] refactor(spec/system/admin/subscriptions_spec.rb): issue #7483 Add context when resetting the billing address after clearing the bill address. MOve scenario to its before do block. --- spec/system/admin/subscriptions_spec.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/subscriptions_spec.rb b/spec/system/admin/subscriptions_spec.rb index 7062618f89..3d02afc40d 100644 --- a/spec/system/admin/subscriptions_spec.rb +++ b/spec/system/admin/subscriptions_spec.rb @@ -296,8 +296,8 @@ describe 'Subscriptions' do expect(page).to have_content 'can\'t be blank', count: 6 end - context 're-setting the billing address' do - it 'has input with ship address values' do + context 'and re-setting the billing address' do + before do fill_in "bill_address_firstname", with: 'Freda' fill_in "bill_address_lastname", with: 'Figapple' fill_in "bill_address_address1", with: '7 Tempany Lane' @@ -306,7 +306,9 @@ describe 'Subscriptions' do fill_in "bill_address_phone", with: '0400 123 456' select2_select "Australia", from: "bill_address_country_id" 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'