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
a9d7ef80
Commit
a9d7ef80
authored
Mar 12, 2021
by
Tiffany Rea
Committed by
Sanad Liaquat
Mar 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improving github mirror spec flakiness
parent
7e6c8784
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
13 deletions
+28
-13
app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue
...es/import_projects/components/provider_repo_table_row.vue
+7
-3
qa/qa/page/project/import/github.rb
qa/qa/page/project/import/github.rb
+21
-10
No files found.
app/assets/javascripts/import_entities/import_projects/components/provider_repo_table_row.vue
View file @
a9d7ef80
...
@@ -101,7 +101,8 @@ export default {
...
@@ -101,7 +101,8 @@ export default {
<
template
>
<
template
>
<tr
<tr
class=
"qa-project-import-row gl-h-11 gl-border-0 gl-border-solid gl-border-t-1 gl-border-gray-100 gl-h-11"
class=
"gl-h-11 gl-border-0 gl-border-solid gl-border-t-1 gl-border-gray-100 gl-h-11"
data-qa-selector=
"project_import_row"
>
>
<td
class=
"gl-p-4"
>
<td
class=
"gl-p-4"
>
<gl-link
:href=
"repo.importSource.providerLink"
target=
"_blank"
data-testid=
"providerLink"
<gl-link
:href=
"repo.importSource.providerLink"
target=
"_blank"
data-testid=
"providerLink"
...
@@ -112,6 +113,7 @@ export default {
...
@@ -112,6 +113,7 @@ export default {
<td
<td
class=
"gl-display-flex gl-flex-sm-wrap gl-p-4 gl-pt-5 gl-vertical-align-top"
class=
"gl-display-flex gl-flex-sm-wrap gl-p-4 gl-pt-5 gl-vertical-align-top"
data-testid=
"fullPath"
data-testid=
"fullPath"
data-qa-selector=
"project_path_content"
>
>
<template
v-if=
"repo.importSource.target"
>
{{
repo
.
importSource
.
target
}}
</
template
>
<template
v-if=
"repo.importSource.target"
>
{{
repo
.
importSource
.
target
}}
</
template
>
<
template
v-else-if=
"isImportNotStarted"
>
<
template
v-else-if=
"isImportNotStarted"
>
...
@@ -124,7 +126,8 @@ export default {
...
@@ -124,7 +126,8 @@ export default {
</div>
</div>
<gl-form-input
<gl-form-input
v-model=
"newNameInput"
v-model=
"newNameInput"
class=
"gl-rounded-top-left-none gl-rounded-bottom-left-none qa-project-path-field"
class=
"gl-rounded-top-left-none gl-rounded-bottom-left-none"
data-qa-selector=
"project_path_field"
/>
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -140,12 +143,13 @@ export default {
...
@@ -140,12 +143,13 @@ export default {
:href=
"repo.importedProject.fullPath"
:href=
"repo.importedProject.fullPath"
rel=
"noreferrer noopener"
rel=
"noreferrer noopener"
target=
"_blank"
target=
"_blank"
data-qa-selector=
"go_to_project_button"
>
{{ __('Go to project') }}
>
{{ __('Go to project') }}
</gl-button>
</gl-button>
<gl-button
<gl-button
v-if=
"isImportNotStarted"
v-if=
"isImportNotStarted"
type=
"button"
type=
"button"
class=
"qa-import-
button"
data-qa-selector=
"import_
button"
@
click=
"fetchImport(repo.importSource.id)"
@
click=
"fetchImport(repo.importSource.id)"
>
>
{{ importButtonText }}
{{ importButtonText }}
...
...
qa/qa/page/project/import/github.rb
View file @
a9d7ef80
...
@@ -17,29 +17,34 @@ module QA
...
@@ -17,29 +17,34 @@ module QA
element
:project_namespace_select
element
:project_namespace_select
element
:project_path_field
element
:project_path_field
element
:import_button
element
:import_button
element
:project_path_content
element
:go_to_project_button
end
end
def
add_personal_access_token
(
personal_access_token
)
def
add_personal_access_token
(
personal_access_token
)
# If for some reasons this process is retried, user cannot re-enter github token in the same group
# In this case skip this step and proceed to import project row
return
unless
has_element?
(
:personal_access_token_field
)
fill_element
(
:personal_access_token_field
,
personal_access_token
)
fill_element
(
:personal_access_token_field
,
personal_access_token
)
click_element
(
:authenticate_button
)
click_element
(
:authenticate_button
)
finished_loading?
finished_loading?
end
end
def
import!
(
full_path
,
name
)
def
import!
(
full_path
,
name
)
unless
already_imported
(
full_path
)
choose_test_namespace
(
full_path
)
choose_test_namespace
(
full_path
)
set_path
(
full_path
,
name
)
set_path
(
full_path
,
name
)
import_project
(
full_path
)
import_project
(
full_path
)
wait_for_success
wait_for_success
end
go_to_project
(
name
)
go_to_project
(
name
)
end
end
private
private
def
within_repo_path
(
full_path
)
def
within_repo_path
(
full_path
)
wait_until
(
reload:
false
)
do
has_element?
(
:project_import_row
,
text:
full_path
)
end
project_import_row
=
find_element
(
:project_import_row
,
text:
full_path
)
project_import_row
=
find_element
(
:project_import_row
,
text:
full_path
)
within
(
project_import_row
)
do
within
(
project_import_row
)
do
...
@@ -69,9 +74,9 @@ module QA
...
@@ -69,9 +74,9 @@ module QA
def
wait_for_success
def
wait_for_success
# TODO: set reload:false and remove skip_finished_loading_check_on_refresh when
# TODO: set reload:false and remove skip_finished_loading_check_on_refresh when
# https://gitlab.com/gitlab-org/gitlab/-/issues/2
31542
is fixed
# https://gitlab.com/gitlab-org/gitlab/-/issues/2
92861
is fixed
wait_until
(
max_duration:
60
,
sleep_interval:
5.0
,
reload:
true
,
skip_finished_loading_check_on_refresh:
true
)
do
wait_until
(
max_duration:
60
,
sleep_interval:
5.0
,
reload:
true
,
skip_finished_loading_check_on_refresh:
true
)
do
page
.
has_
content?
(
'Done'
,
wait:
1
.0
)
page
.
has_
no_content?
(
'Importing 1 repository'
,
wait:
3
.0
)
end
end
end
end
...
@@ -81,6 +86,12 @@ module QA
...
@@ -81,6 +86,12 @@ module QA
dashboard
.
go_to_project
(
name
)
dashboard
.
go_to_project
(
name
)
end
end
end
end
def
already_imported
(
full_path
)
within_repo_path
(
full_path
)
do
has_element?
(
:project_path_content
)
&&
has_element?
(
:go_to_project_button
)
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