DEV: Remove activation part from spec to fix flaky test (#27100)

We already have a test for activation anyways
This commit is contained in:
Jan Cernik 2024-05-21 17:39:29 -03:00 committed by GitHub
parent 915982955b
commit 1863ee52e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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