diff --git a/spec/system/page_objects/modals/base.rb b/spec/system/page_objects/modals/base.rb index 51c174f2799..963800bf05e 100644 --- a/spec/system/page_objects/modals/base.rb +++ b/spec/system/page_objects/modals/base.rb @@ -5,7 +5,6 @@ module PageObjects class Base include Capybara::DSL include RSpec::Matchers - include SystemHelpers BODY_SELECTOR = "" diff --git a/spec/system/page_objects/modals/signup.rb b/spec/system/page_objects/modals/signup.rb index 2015b3b6f80..0dfacd68afe 100644 --- a/spec/system/page_objects/modals/signup.rb +++ b/spec/system/page_objects/modals/signup.rb @@ -31,13 +31,8 @@ module PageObjects click("#login-link") end - def click_create_account(expect_success: true) - try_until_success(timeout: 5) do - click(".modal.create-account .btn-primary") - if expect_success - expect(page).to have_css(".modal.create-account .btn-primary.is-loading") - end - end + def click_create_account + click(".modal.create-account .btn-primary") end def has_password_input? diff --git a/spec/system/page_objects/pages/signup.rb b/spec/system/page_objects/pages/signup.rb index afe6c1de062..9f2c2e30245 100644 --- a/spec/system/page_objects/pages/signup.rb +++ b/spec/system/page_objects/pages/signup.rb @@ -31,11 +31,8 @@ module PageObjects click("#login-link") end - def click_create_account(expect_success: true) - try_until_success(timeout: 5) do - click(".signup-fullpage .btn-primary") - expect(page).to have_css(".signup-fullpage .btn-primary.is-loading") if expect_success - end + def click_create_account + click(".signup-fullpage .btn-primary") end def has_password_input? diff --git a/spec/system/signup_spec.rb b/spec/system/signup_spec.rb index 7d90e3e4a9a..8962e7f7042 100644 --- a/spec/system/signup_spec.rb +++ b/spec/system/signup_spec.rb @@ -96,7 +96,7 @@ shared_examples "signup scenarios" do |signup_page_object, login_page_object| .fill_code("pudding") expect(signup_form).to have_valid_fields - signup_form.click_create_account(expect_success: false) + signup_form.click_create_account expect(signup_form).to have_content(I18n.t("login.wrong_invite_code")) expect(signup_form).to have_no_css(".account-created") end @@ -131,7 +131,7 @@ shared_examples "signup scenarios" do |signup_page_object, login_page_object| .fill_email("johndoe@example.com") .fill_username("john") .fill_password("supersecurepassword") - .click_create_account(expect_success: false) + .click_create_account expect(signup_form).to have_content(I18n.t("js.user_fields.required", name: "Occupation")) expect(signup_form).to have_no_css(".account-created") end