From 49ceec8b8e0068ef5a108e427f3f0c10458eb30e Mon Sep 17 00:00:00 2001 From: paulo-felipe Date: Wed, 17 May 2023 21:53:42 -0300 Subject: [PATCH] refactor(spec/system/admin/subscriptions_spec.rb): issue #7483 share common before action Create subscription between samples. --- spec/system/admin/subscriptions_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/system/admin/subscriptions_spec.rb b/spec/system/admin/subscriptions_spec.rb index 3b4181c1e6..6fa90d888e 100644 --- a/spec/system/admin/subscriptions_spec.rb +++ b/spec/system/admin/subscriptions_spec.rb @@ -404,16 +404,16 @@ describe 'Subscriptions' do end context 'and click Create Subscription button' do - it 'has selector td.items.panel-toggle' do + before do click_button('Create Subscription') - select2_select shop.name, from: "shop_id" + end + + it 'has selector td.items.panel-toggle' do expect(page).to have_selector "td.items.panel-toggle" end it 'has selector for price, input for quantity and selector for total price' do - click_button('Create Subscription') - select2_select shop.name, from: "shop_id" first("td.items.panel-toggle").click within 'table#subscription-line-items tr.item', match: :first do