Commit 07bb2b58 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'qa-shl-fix-prevent-forking-outside-group-spec' into 'master'

Fix e2e tests when UI is used to create a top level group

See merge request gitlab-org/gitlab!74603
parents f2739c1e 03256d87
...@@ -9,6 +9,7 @@ module QA ...@@ -9,6 +9,7 @@ module QA
view 'app/views/groups/_home_panel.html.haml' do view 'app/views/groups/_home_panel.html.haml' do
element :new_project_button element :new_project_button
element :new_subgroup_button element :new_subgroup_button
element :group_id_content
end end
view 'app/assets/javascripts/groups/constants.js' do view 'app/assets/javascripts/groups/constants.js' do
...@@ -40,6 +41,10 @@ module QA ...@@ -40,6 +41,10 @@ module QA
click_element :new_project_button click_element :new_project_button
end end
def group_id
find_element(:group_id_content).text.delete('Group ID: ')
end
def leave_group def leave_group
accept_alert do accept_alert do
click_element :leave_group_link click_element :leave_group_link
......
...@@ -25,6 +25,8 @@ module QA ...@@ -25,6 +25,8 @@ module QA
alias_method :full_path, :path alias_method :full_path, :path
def fabricate! def fabricate!
Flow::Login.sign_in_unless_signed_in
Page::Main::Menu.perform(&:go_to_groups) Page::Main::Menu.perform(&:go_to_groups)
Page::Dashboard::Groups.perform do |groups_page| Page::Dashboard::Groups.perform do |groups_page|
...@@ -39,6 +41,8 @@ module QA ...@@ -39,6 +41,8 @@ module QA
group.set_visibility('Public') group.set_visibility('Public')
group.create group.create
end end
@id = Page::Group::Show.perform(&:group_id)
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