From 1863ee52e9053c17625034245e132908a0f2c745 Mon Sep 17 00:00:00 2001 From: Jan Cernik <66427541+jancernik@users.noreply.github.com> Date: Tue, 21 May 2024 17:39:29 -0300 Subject: [PATCH] DEV: Remove activation part from spec to fix flaky test (#27100) We already have a test for activation anyways --- spec/system/signup_spec.rb | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/spec/system/signup_spec.rb b/spec/system/signup_spec.rb index b342613d5e1..f8762c7e43a 100644 --- a/spec/system/signup_spec.rb +++ b/spec/system/signup_spec.rb @@ -5,7 +5,7 @@ describe "Signup", type: :system do let(:signup_modal) { PageObjects::Modals::Signup.new } context "when anyone can create an account" do - it "can signup and activate account" do + it "can signup" do Jobs.run_immediately! signup_modal.open @@ -13,20 +13,9 @@ describe "Signup", type: :system do signup_modal.fill_username("john") signup_modal.fill_password("supersecurepassword") expect(signup_modal).to have_valid_fields + signup_modal.click_create_account - - wait_for(timeout: 5) { ActionMailer::Base.deliveries.count != 0 } - - mail = ActionMailer::Base.deliveries.last - expect(mail.to).to contain_exactly("johndoe@example.com") - activation_link = mail.body.to_s[%r{/u/activate-account/\S+}] - - visit "/" - visit activation_link - find("#activate-account-button").click - - visit "/" - expect(page).to have_css(".header-dropdown-toggle.current-user") + expect(page).to have_css(".account-created") end context "with invite code" do