Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-17 21:11:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-17 21:11:44 +0300
commit4e582508047c7f5feedeba627461298e584e99dc (patch)
tree310eff30567463d986547a2d19ed31a3e657f900 /qa
parent3b9468e8b913d43f45e472b69b98c9da05f338bb (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'qa')
-rw-r--r--qa/qa/runtime/browser.rb2
-rw-r--r--qa/qa/specs/features/browser_ui/1_manage/login/maintain_log_in_mixed_env_spec.rb39
2 files changed, 41 insertions, 0 deletions
diff --git a/qa/qa/runtime/browser.rb b/qa/qa/runtime/browser.rb
index f208a93d302..0566bc237bb 100644
--- a/qa/qa/runtime/browser.rb
+++ b/qa/qa/runtime/browser.rb
@@ -237,6 +237,8 @@ module QA
else
browser.manage.delete_cookie("gitlab_canary")
end
+
+ browser.navigate.refresh
end
##
diff --git a/qa/qa/specs/features/browser_ui/1_manage/login/maintain_log_in_mixed_env_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/login/maintain_log_in_mixed_env_spec.rb
new file mode 100644
index 00000000000..2b1c956039f
--- /dev/null
+++ b/qa/qa/specs/features/browser_ui/1_manage/login/maintain_log_in_mixed_env_spec.rb
@@ -0,0 +1,39 @@
+# frozen_string_literal: true
+
+module QA
+ RSpec.describe 'Manage', :mixed_env, :smoke, only: { subdomain: :staging } do
+ describe 'basic user' do
+ it 'remains logged in when redirected from canary to non-canary node', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2251' do
+ Runtime::Browser.visit(:gitlab, Page::Main::Login)
+
+ Support::Retrier.retry_until(sleep_interval: 0.5) do
+ Page::Main::Login.perform(&:can_sign_in?)
+ end
+
+ Runtime::Browser::Session.target_canary(true)
+ Flow::Login.sign_in
+
+ verify_session_on_canary(true)
+
+ Runtime::Browser::Session.target_canary(false)
+
+ verify_session_on_canary(false)
+
+ Support::Retrier.retry_until(sleep_interval: 0.5) do
+ Page::Main::Menu.perform(&:sign_out)
+
+ Page::Main::Login.perform(&:can_sign_in?)
+ end
+ end
+
+ def verify_session_on_canary(enable_canary)
+ Page::Main::Menu.perform do |menu|
+ aggregate_failures 'testing session log in' do
+ expect(menu.canary?).to be(enable_canary)
+ expect(menu).to have_personal_area
+ end
+ end
+ end
+ end
+ end
+end