Commit 97e1bbe5 authored by Dan Davison's avatar Dan Davison

Merge branch 'qa/zm-add-login-mixed' into 'master'

Add maintains login in mixed env spec

See merge request gitlab-org/gitlab!70022
parents 91dcf83b 6964d051
...@@ -237,6 +237,8 @@ module QA ...@@ -237,6 +237,8 @@ module QA
else else
browser.manage.delete_cookie("gitlab_canary") browser.manage.delete_cookie("gitlab_canary")
end end
browser.navigate.refresh
end end
## ##
......
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment