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
efcfc614
Commit
efcfc614
authored
Sep 15, 2020
by
Sanad Liaquat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix transfer project spec
parent
4f16a565
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
19 deletions
+26
-19
qa/qa/page/component/select2.rb
qa/qa/page/component/select2.rb
+8
-0
qa/qa/page/project/settings/advanced.rb
qa/qa/page/project/settings/advanced.rb
+9
-13
qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
...atures/browser_ui/1_manage/group/transfer_project_spec.rb
+9
-6
No files found.
qa/qa/page/component/select2.rb
View file @
efcfc614
...
...
@@ -8,6 +8,10 @@ module QA
find
(
'.select2-result-label'
,
text:
item_text
,
match: :prefer_exact
).
click
end
def
has_item?
(
item_text
)
has_css?
(
'.select2-result-label'
,
text:
item_text
,
match: :prefer_exact
)
end
def
current_selection
find
(
'.select2-chosen'
).
text
end
...
...
@@ -25,8 +29,12 @@ module QA
end
def
search_and_select
(
item_text
)
QA
::
Runtime
::
Logger
.
info
"Searching and selecting:
#{
item_text
}
"
search_item
(
item_text
)
raise
QA
::
Page
::
Base
::
ElementNotFound
,
%Q(Couldn't find option named "
#{
item_text
}
")
unless
has_item?
(
item_text
)
select_item
(
item_text
)
end
...
...
qa/qa/page/project/settings/advanced.rb
View file @
efcfc614
...
...
@@ -38,20 +38,16 @@ module QA
click_element
:change_path_button
end
def
select_transfer_option
(
namespace
)
search_and_select
(
namespace
)
end
def
transfer_project!
(
project_name
,
namespace
)
# Retry added here due to seldom seen inconsistent UI state issue:
# https://gitlab.com/gitlab-org/gitlab/-/issues/231242
retry_on_exception
do
click_element_coordinates
(
:archive_project_content
)
expand_select_list
# Workaround for a failure to search when there are no spaces around the /
# https://gitlab.com/gitlab-org/gitlab/-/issues/218965
select_transfer_option
(
namespace
.
gsub
(
/([^\s])\/([^\s])/
,
'\1 / \2'
))
end
QA
::
Runtime
::
Logger
.
info
"Transferring project:
#{
project_name
}
to namespace:
#{
namespace
}
"
click_element_coordinates
(
:archive_project_content
)
expand_select_list
# Workaround for a failure to search when there are no spaces around the /
# https://gitlab.com/gitlab-org/gitlab/-/issues/218965
search_and_select
(
namespace
.
gsub
(
/([^\s])\/([^\s])/
,
'\1 / \2'
))
click_element
(
:transfer_button
)
fill_confirmation_text
(
project_name
)
...
...
qa/qa/specs/features/browser_ui/1_manage/group/transfer_project_spec.rb
View file @
efcfc614
...
...
@@ -11,14 +11,14 @@ module QA
let
(
:target_group
)
do
Resource
::
Group
.
fabricate_via_api!
do
|
group
|
group
.
path
=
'target-group'
group
.
path
=
"target-group-for-transfer_
#{
SecureRandom
.
hex
(
8
)
}
"
end
end
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
group
=
source_group
project
.
name
=
'transfer-project'
project
.
name
=
'transfer-project'
project
.
initialize_with_readme
=
true
end
end
...
...
@@ -44,12 +44,15 @@ module QA
end
it
'user transfers a project between groups'
,
testcase:
'https://gitlab.com/gitlab-org/quality/testcases/-/issues/406'
do
Page
::
File
::
Show
.
perform
(
&
:go_to_general_settings
)
# Retry is needed here as the target group is not avaliable for transfer right away.
QA
::
Support
::
Retrier
.
retry_on_exception
(
reload_page:
page
)
do
Page
::
File
::
Show
.
perform
(
&
:go_to_general_settings
)
Page
::
Project
::
Settings
::
Main
.
perform
(
&
:expand_advanced_settings
)
Page
::
Project
::
Settings
::
Main
.
perform
(
&
:expand_advanced_settings
)
Page
::
Project
::
Settings
::
Advanced
.
perform
do
|
advanced
|
advanced
.
transfer_project!
(
project
.
name
,
target_group
.
full_path
)
Page
::
Project
::
Settings
::
Advanced
.
perform
do
|
advanced
|
advanced
.
transfer_project!
(
project
.
name
,
target_group
.
full_path
)
end
end
Page
::
Project
::
Settings
::
Main
.
perform
(
&
:click_project
)
...
...
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