From 6e56a76b20efc99fd33bfb131e30e6ffd55b8fe3 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Thu, 6 Jun 2024 15:09:50 +0800 Subject: [PATCH] DEV: Fix flaky login and activate account system test (#27371) After clicking activate, we cannot manually visit "/" and instead need to wait for the response from the server in order for the user to be signed in. --- spec/system/login_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/system/login_spec.rb b/spec/system/login_spec.rb index c1f90ebe148..ba485319a27 100644 --- a/spec/system/login_spec.rb +++ b/spec/system/login_spec.rb @@ -45,7 +45,7 @@ shared_examples "login scenarios" do find("#activate-account-button").click - visit "/" + expect(page).to have_current_path("/") expect(page).to have_css(".header-dropdown-toggle.current-user") end