From 37d3c025e91f1957513db7ad92214bec7b84fb2a Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou <40413322+rioug@users.noreply.github.com> Date: Mon, 20 Mar 2023 11:03:15 +1100 Subject: [PATCH] Make sure New voucher page can be accessed from voucher panel Co-authored-by: David Cook --- spec/system/admin/vouchers_spec.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/vouchers_spec.rb b/spec/system/admin/vouchers_spec.rb index baefa891fa..227d23a05f 100644 --- a/spec/system/admin/vouchers_spec.rb +++ b/spec/system/admin/vouchers_spec.rb @@ -31,8 +31,12 @@ describe ' it 'creates a voucher' do # Given an enterprise - # When I go to the new voucher page - login_as_admin_and_visit new_admin_enterprise_voucher_path(enterprise) + # When I go to the enterprise voucher tab and click new + login_as_admin_and_visit edit_admin_enterprise_path(enterprise) + click_link 'Vouchers' + within "#vouchers_panel" do + click_link 'Add New' + end # And I fill in the fields for a new voucher click save fill_in 'voucher_code', with: voucher_code