Commit 1c43d345 authored by Andrejs Cunskis's avatar Andrejs Cunskis

Merge branch 'tomi/fix/forker_logging_out' into 'master'

Fixing bug on user sign out for a few tests

See merge request gitlab-org/gitlab!72768
parents 9b7012d8 d3205773
......@@ -382,7 +382,11 @@ export default {
:data-testid="`radio-${value}`"
>
<div>
<gl-icon :name="icon" />
<gl-icon
data-qa-selector="fork_privacy_button"
:name="icon"
:data-qa-privacy-level="`${value}`"
/>
<span>{{ text }}</span>
</div>
<template #help>{{ help }}</template>
......
......@@ -12,6 +12,7 @@ module QA
view 'app/assets/javascripts/pages/projects/forks/new/components/fork_form.vue' do
element :fork_namespace_dropdown
element :fork_project_button
element :fork_privacy_button
end
def fork_project(namespace = Runtime::Namespace.path)
......@@ -19,6 +20,7 @@ module QA
click_element(:fork_namespace_button, name: namespace)
else
select_element(:fork_namespace_dropdown, namespace)
click_element(:fork_privacy_button, privacy_level: 'public')
click_element(:fork_project_button)
end
end
......
......@@ -37,11 +37,7 @@ module QA
namespace_path ||= user.name
# Sign out as admin and sign is as the fork user
Page::Main::Menu.perform(&:sign_out)
Runtime::Browser.visit(:gitlab, Page::Main::Login)
Page::Main::Login.perform do |login|
login.sign_in_using_credentials(user: user)
end
Flow::Login.sign_in(as: user)
upstream.visit!
......@@ -61,9 +57,6 @@ module QA
def fabricate_via_api!
populate(:upstream, :user)
# Remove after Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/343396
Flow::Login.sign_in(as: user) if Specs::Helpers::ContextSelector.dot_com?
@api_client = Runtime::API::Client.new(:gitlab, is_new_session: false, user: user)
Runtime::Logger.debug("Forking project #{upstream.name} to namespace #{user.username}...")
......@@ -71,9 +64,6 @@ module QA
wait_until_forked
populate(:project)
# Remove after Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/343396
Flow::Login.sign_in if Specs::Helpers::ContextSelector.dot_com?
end
def remove_via_api!
......
......@@ -6,7 +6,7 @@ module QA
attr_accessor :fork_branch
attribute :fork do
Fork.fabricate_via_api!
Fork.fabricate_via_browser_ui!
end
attribute :push do
......
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