blob: 734529f319a0f01b53a5c3a92507c86a386d2f7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# frozen_string_literal: true
module QA
RSpec.describe 'Manage', only: { subdomain: :staging }, quarantine: { issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/344213', type: :stale } 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
|