From 997c8a49ca2dfb54039c1cc442f8404fdaeec850 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 5 Sep 2023 10:51:38 +1000 Subject: [PATCH] Combine system specs for efficiency --- spec/system/admin/users_spec.rb | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/spec/system/admin/users_spec.rb b/spec/system/admin/users_spec.rb index 6561d06cf6..5d1e7b0163 100644 --- a/spec/system/admin/users_spec.rb +++ b/spec/system/admin/users_spec.rb @@ -131,22 +131,17 @@ describe "Managing users" do end describe "creating a user" do - it "shows no confirmation message to start with" do - visit spree.new_admin_user_path - expect(page).to have_no_text "Email confirmation is pending" - end - - it "uses the instance default locale for new new user" do - visit spree.new_admin_user_path - - expect(page).to have_select('Language', selected: 'English') - end - it "confirms successful creation" do visit spree.new_admin_user_path + + # shows no confirmation message to start with + expect(page).to have_no_text "Email confirmation is pending" + fill_in "Email", with: "user1@example.org" fill_in "Password", with: "user1Secret" fill_in "Confirm Password", with: "user1Secret" + + expect(page).to have_select "Language", selected: "English" select "EspaƱol", from: "Language" perform_enqueued_jobs do