Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
691c707f
Commit
691c707f
authored
Jul 05, 2021
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix prevent prevent_forking_outside_group_spec e2e test
parent
9c80c1a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
21 deletions
+14
-21
qa/qa/page/project/fork/new.rb
qa/qa/page/project/fork/new.rb
+2
-6
qa/qa/specs/features/ee/browser_ui/1_manage/group/prevent_forking_outside_group_spec.rb
...r_ui/1_manage/group/prevent_forking_outside_group_spec.rb
+12
-15
No files found.
qa/qa/page/project/fork/new.rb
View file @
691c707f
...
@@ -9,10 +9,6 @@ module QA
...
@@ -9,10 +9,6 @@ module QA
element
:fork_namespace_button
element
:fork_namespace_button
end
end
view
'app/assets/javascripts/pages/projects/forks/new/components/fork_groups_list.vue'
do
element
:fork_groups_list_search_field
end
view
'app/assets/javascripts/pages/projects/forks/new/components/fork_form.vue'
do
view
'app/assets/javascripts/pages/projects/forks/new/components/fork_form.vue'
do
element
:fork_namespace_dropdown
element
:fork_namespace_dropdown
element
:fork_project_button
element
:fork_project_button
...
@@ -27,8 +23,8 @@ module QA
...
@@ -27,8 +23,8 @@ module QA
end
end
end
end
def
search_for_group
(
group_name
)
def
fork_namespace_dropdown_values
find_element
(
:fork_
groups_list_search_field
).
set
(
group_name
)
find_element
(
:fork_
namespace_dropdown
).
all
(
:option
).
map
{
|
option
|
option
.
text
.
tr
(
"
\n
"
,
''
).
strip
}
end
end
end
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/1_manage/group/prevent_forking_outside_group_spec.rb
View file @
691c707f
...
@@ -26,10 +26,13 @@ module QA
...
@@ -26,10 +26,13 @@ module QA
end
end
it
'allows forking outside of group'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1774'
do
it
'allows forking outside of group'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1774'
do
visit_project_and_search_group_for_fork
project
.
visit!
expect
(
page
).
to
have_text
(
group_for_fork
.
path
)
Page
::
Project
::
Show
.
perform
(
&
:fork_project
)
expect
(
page
).
to
have_text
(
'Select a namespace to fork the project'
)
all_namespaces_for_fork
=
Page
::
Project
::
Fork
::
New
.
perform
(
&
:fork_namespace_dropdown_values
)
expect
(
all_namespaces_for_fork
).
to
include
(
group_for_fork
.
path
)
end
end
end
end
...
@@ -39,10 +42,13 @@ module QA
...
@@ -39,10 +42,13 @@ module QA
end
end
it
'does not allow forking outside of group'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1775'
do
it
'does not allow forking outside of group'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/1775'
do
visit_project_and_search_group_for_fork
project
.
visit!
Page
::
Project
::
Show
.
perform
(
&
:fork_project
)
all_namespaces_for_fork
=
Page
::
Project
::
Fork
::
New
.
perform
(
&
:fork_namespace_dropdown_values
)
expect
(
page
).
not_to
have_text
(
group_for_fork
.
path
)
expect
(
all_namespaces_for_fork
).
not_to
include
(
group_for_fork
.
path
)
expect
(
page
).
not_to
have_text
(
'Select a namespace to fork the project'
)
end
end
end
end
...
@@ -60,15 +66,6 @@ module QA
...
@@ -60,15 +66,6 @@ module QA
general_setting
.
send
(
"set_prevent_forking_outside_group_
#{
enabled_or_disabled
}
"
)
general_setting
.
send
(
"set_prevent_forking_outside_group_
#{
enabled_or_disabled
}
"
)
end
end
end
end
def
visit_project_and_search_group_for_fork
project
.
visit!
Page
::
Project
::
Show
.
perform
(
&
:fork_project
)
Page
::
Project
::
Fork
::
New
.
perform
do
|
fork_new
|
fork_new
.
search_for_group
(
group_for_fork
.
path
)
end
end
end
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment