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
1679d31f
Commit
1679d31f
authored
Jun 15, 2021
by
Andrejs Cunskis
Committed by
Dan Davison
Jun 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Additional validations for github import e2e spec
parent
2621790e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
19 deletions
+84
-19
qa/qa/page/project/import/github.rb
qa/qa/page/project/import/github.rb
+1
-1
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+42
-18
qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
...es/browser_ui/1_manage/project/import_github_repo_spec.rb
+41
-0
No files found.
qa/qa/page/project/import/github.rb
View file @
1679d31f
...
...
@@ -72,7 +72,7 @@ module QA
# TODO: set reload:false and remove skip_finished_loading_check_on_refresh when
# https://gitlab.com/gitlab-org/gitlab/-/issues/292861 is fixed
wait_until
(
max_duration:
6
0
,
max_duration:
9
0
,
sleep_interval:
5.0
,
reload:
true
,
skip_finished_loading_check_on_refresh:
true
...
...
qa/qa/resource/project.rb
View file @
1679d31f
...
...
@@ -131,6 +131,18 @@ module QA
"/projects/
#{
id
}
"
end
def
api_put_path
"/projects/
#{
id
}
"
end
def
api_post_path
'/projects'
end
def
api_delete_path
"/projects/
#{
id
}
"
end
def
api_get_archive_path
(
type
=
'tar.gz'
)
"
#{
api_get_path
}
/repository/archive.
#{
type
}
"
end
...
...
@@ -183,12 +195,16 @@ module QA
"
#{
api_get_path
}
/issues"
end
def
api_
put
_path
"
/projects/
#{
id
}
"
def
api_
labels
_path
"
#{
api_get_path
}
/labels
"
end
def
api_post_path
'/projects'
def
api_milestones_path
"
#{
api_get_path
}
/milestones"
end
def
api_wikis_path
"
#{
api_get_path
}
/wikis"
end
def
api_post_body
...
...
@@ -211,10 +227,6 @@ module QA
post_body
end
def
api_delete_path
"/projects/
#{
id
}
"
end
def
change_repository_storage
(
new_storage
)
put_body
=
{
repository_storage:
new_storage
}
response
=
put
(
request_url
(
api_put_path
),
put_body
)
...
...
@@ -236,11 +248,6 @@ module QA
)
end
def
commits
response
=
get
(
request_url
(
api_commits_path
))
parse_body
(
response
)
end
def
default_branch
reload!
.
api_response
[
:default_branch
]
||
Runtime
::
Env
.
default_branch
end
...
...
@@ -259,6 +266,11 @@ module QA
result
[
:import_status
]
end
def
commits
response
=
get
(
request_url
(
api_commits_path
))
parse_body
(
response
)
end
def
merge_requests
response
=
get
(
request_url
(
api_merge_requests_path
))
parse_body
(
response
)
...
...
@@ -269,11 +281,8 @@ module QA
end
def
runners
(
tag_list:
nil
)
response
=
if
tag_list
get
(
request_url
(
"
#{
api_runners_path
}
?tag_list=
#{
tag_list
.
compact
.
join
(
','
)
}
"
,
per_page:
'100'
))
else
get
(
request_url
(
api_runners_path
,
per_page:
'100'
))
end
url
=
tag_list
?
"
#{
api_runners_path
}
?tag_list=
#{
tag_list
.
compact
.
join
(
','
)
}
"
:
api_runners_path
response
=
get
(
request_url
(
url
,
per_page:
'100'
))
parse_body
(
response
)
end
...
...
@@ -318,6 +327,21 @@ module QA
parse_body
(
response
)
end
def
labels
response
=
get
(
request_url
(
api_labels_path
))
parse_body
(
response
)
end
def
milestones
response
=
get
(
request_url
(
api_milestones_path
))
parse_body
(
response
)
end
def
wikis
response
=
get
(
request_url
(
api_wikis_path
))
parse_body
(
response
)
end
private
def
transform_api_resource
(
api_resource
)
...
...
qa/qa/specs/features/browser_ui/1_manage/project/import_github_repo_spec.rb
View file @
1679d31f
...
...
@@ -37,7 +37,11 @@ module QA
aggregate_failures
do
verify_repository_import
verify_commits_import
verify_labels_import
verify_issues_import
verify_milestones_import
verify_wikis_import
verify_merge_requests_import
end
end
...
...
@@ -50,6 +54,29 @@ module QA
)
end
def
verify_commits_import
expect
(
imported_project
.
commits
.
length
).
to
eq
(
20
)
end
def
verify_labels_import
labels
=
imported_project
.
labels
.
map
{
|
label
|
label
.
slice
(
:name
,
:color
)
}
expect
(
labels
).
to
eq
(
[
{
name:
'bug'
,
color:
'#d73a4a'
},
{
name:
'custom new label'
,
color:
'#fc8f91'
},
{
name:
'documentation'
,
color:
'#0075ca'
},
{
name:
'duplicate'
,
color:
'#cfd3d7'
},
{
name:
'enhancement'
,
color:
'#a2eeef'
},
{
name:
'good first issue'
,
color:
'#7057ff'
},
{
name:
'help wanted'
,
color:
'#008672'
},
{
name:
'invalid'
,
color:
'#e4e669'
},
{
name:
'question'
,
color:
'#d876e3'
},
{
name:
'wontfix'
,
color:
'#ffffff'
}
]
)
end
def
verify_issues_import
issues
=
imported_project
.
issues
...
...
@@ -62,6 +89,20 @@ module QA
)
end
def
verify_milestones_import
milestones
=
imported_project
.
milestones
expect
(
milestones
.
length
).
to
eq
(
1
)
expect
(
milestones
.
first
).
to
include
(
title:
'v1.0'
,
description:
nil
,
state:
'active'
)
end
def
verify_wikis_import
wikis
=
imported_project
.
wikis
expect
(
wikis
.
length
).
to
eq
(
1
)
expect
(
wikis
.
first
).
to
include
(
title:
'Home'
,
format:
'markdown'
)
end
def
verify_merge_requests_import
merge_requests
=
imported_project
.
merge_requests
...
...
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