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
dbe50cdb
Commit
dbe50cdb
authored
Feb 28, 2020
by
Jennifer Louie
Committed by
Sanad Liaquat
Feb 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor Geo end-to-end specs
parent
9e26d989
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
35 additions
and
24 deletions
+35
-24
qa/qa/ee/page/project/issue/show.rb
qa/qa/ee/page/project/issue/show.rb
+11
-0
qa/qa/specs/features/ee/browser_ui/geo/attachment_replication_spec.rb
...features/ee/browser_ui/geo/attachment_replication_spec.rb
+3
-6
qa/qa/specs/features/ee/browser_ui/geo/http_push_spec.rb
qa/qa/specs/features/ee/browser_ui/geo/http_push_spec.rb
+2
-2
qa/qa/specs/features/ee/browser_ui/geo/http_push_to_secondary_spec.rb
...features/ee/browser_ui/geo/http_push_to_secondary_spec.rb
+2
-2
qa/qa/specs/features/ee/browser_ui/geo/rename_replication_spec.rb
...ecs/features/ee/browser_ui/geo/rename_replication_spec.rb
+11
-8
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
+2
-2
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
.../features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
+2
-2
qa/qa/specs/features/ee/browser_ui/geo/wiki_http_push_spec.rb
...a/specs/features/ee/browser_ui/geo/wiki_http_push_spec.rb
+1
-1
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
+1
-1
No files found.
qa/qa/ee/page/project/issue/show.rb
View file @
dbe50cdb
...
@@ -78,6 +78,17 @@ module QA
...
@@ -78,6 +78,17 @@ module QA
def
weight_no_value_content
def
weight_no_value_content
find_element
(
:weight_no_value_content
)
find_element
(
:weight_no_value_content
)
end
end
def
wait_for_attachment_replication
(
image_url
,
max_wait:
Runtime
::
Geo
.
max_file_replication_time
)
QA
::
Runtime
::
Logger
.
debug
(
%Q[
#{
self
.
class
.
name
}
- wait_for_attachment_replication]
)
wait_until_geo_max_replication_time
(
max_wait:
max_wait
)
do
asset_exists?
(
image_url
)
end
end
def
wait_until_geo_max_replication_time
(
max_wait:
Runtime
::
Geo
.
max_file_replication_time
)
wait_until
(
max_duration:
max_wait
)
{
yield
}
end
end
end
end
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/attachment_replication_spec.rb
View file @
dbe50cdb
...
@@ -7,12 +7,12 @@ module QA
...
@@ -7,12 +7,12 @@ module QA
it
'user uploads attachment to the primary node'
do
it
'user uploads attachment to the primary node'
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
@project
=
Resource
::
Project
.
fabricate!
do
|
project
|
@project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'project-for-issues'
project
.
name
=
'project-for-issues'
project
.
description
=
'project for adding issues'
project
.
description
=
'project for adding issues'
end
end
@issue
=
Resource
::
Issue
.
fabricate!
do
|
issue
|
@issue
=
Resource
::
Issue
.
fabricate
_via_api
!
do
|
issue
|
issue
.
title
=
'My geo issue'
issue
.
title
=
'My geo issue'
issue
.
project
=
@project
issue
.
project
=
@project
end
end
...
@@ -52,10 +52,7 @@ module QA
...
@@ -52,10 +52,7 @@ module QA
image_url
=
find
(
'a[href$="banana_sample.gif"]'
)[
:href
]
image_url
=
find
(
'a[href$="banana_sample.gif"]'
)[
:href
]
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
Page
::
Project
::
Issue
::
Show
.
perform
do
|
show
|
# Wait for attachment replication
found
=
show
.
wait_for_attachment_replication
(
image_url
)
found
=
show
.
wait_until
(
reload:
false
)
do
show
.
asset_exists?
(
image_url
)
end
expect
(
found
).
to
be_truthy
expect
(
found
).
to
be_truthy
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/http_push_spec.rb
View file @
dbe50cdb
...
@@ -12,7 +12,7 @@ module QA
...
@@ -12,7 +12,7 @@ module QA
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new Project
# Create a new Project
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
@@ -66,7 +66,7 @@ module QA
...
@@ -66,7 +66,7 @@ module QA
project
=
nil
project
=
nil
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/http_push_to_secondary_spec.rb
View file @
dbe50cdb
...
@@ -15,7 +15,7 @@ module QA
...
@@ -15,7 +15,7 @@ module QA
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new Project
# Create a new Project
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
@@ -96,7 +96,7 @@ module QA
...
@@ -96,7 +96,7 @@ module QA
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
# Create a new Project
# Create a new Project
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/rename_replication_spec.rb
View file @
dbe50cdb
...
@@ -4,21 +4,24 @@ module QA
...
@@ -4,21 +4,24 @@ module QA
context
'Geo'
,
:orchestrated
,
:geo
do
context
'Geo'
,
:orchestrated
,
:geo
do
describe
'GitLab Geo project rename replication'
do
describe
'GitLab Geo project rename replication'
do
it
'user renames project'
do
it
'user renames project'
do
original_project_name
=
'geo-before-rename'
original_readme_content
=
"The original project name was
#{
original_project_name
}
"
readme_file_name
=
'README.md'
# create the project and push code
# create the project and push code
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-before-rename'
project
.
name
=
original_project_name
project
.
description
=
'Geo project to be renamed'
project
.
description
=
'Geo project to be renamed'
end
end
geo_project_name
=
project
.
name
geo_project_name
=
project
.
name
expect
(
project
.
name
).
to
include
'geo-before-rename'
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
push
|
Resource
::
Repository
::
ProjectPush
.
fabricate!
do
|
push
|
push
.
project
=
project
push
.
project
=
project
push
.
file_name
=
'README.md'
push
.
file_name
=
readme_file_name
push
.
file_content
=
'# This is Geo project!'
push
.
file_content
=
original_readme_content
push
.
commit_message
=
'Add README.md'
push
.
commit_message
=
"Add
#{
readme_file_name
}
"
end
end
# rename the project
# rename the project
...
@@ -62,8 +65,8 @@ module QA
...
@@ -62,8 +65,8 @@ module QA
Page
::
Project
::
Show
.
perform
do
|
show
|
Page
::
Project
::
Show
.
perform
do
|
show
|
show
.
wait_for_repository_replication
show
.
wait_for_repository_replication
expect
(
page
).
to
have_content
'README.md'
expect
(
page
).
to
have_content
readme_file_name
expect
(
page
).
to
have_content
'This is Geo project!'
expect
(
page
).
to
have_content
original_readme_content
end
end
end
end
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_spec.rb
View file @
dbe50cdb
...
@@ -19,7 +19,7 @@ module QA
...
@@ -19,7 +19,7 @@ module QA
end
end
# Create a new Project
# Create a new Project
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
@@ -88,7 +88,7 @@ module QA
...
@@ -88,7 +88,7 @@ module QA
end
end
# Create a new Project
# Create a new Project
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/ssh_push_to_secondary_spec.rb
View file @
dbe50cdb
...
@@ -20,7 +20,7 @@ module QA
...
@@ -20,7 +20,7 @@ module QA
end
end
# Create a new Project
# Create a new Project
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
@@ -110,7 +110,7 @@ module QA
...
@@ -110,7 +110,7 @@ module QA
end
end
# Create a new Project
# Create a new Project
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
'geo-project'
project
.
name
=
'geo-project'
project
.
description
=
'Geo test project'
project
.
description
=
'Geo test project'
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/wiki_http_push_spec.rb
View file @
dbe50cdb
...
@@ -12,7 +12,7 @@ module QA
...
@@ -12,7 +12,7 @@ module QA
# Create new wiki and push wiki commit
# Create new wiki and push wiki commit
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
QA
::
Flow
::
Login
.
while_signed_in
(
address: :geo_primary
)
do
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
project_name
project
.
name
=
project_name
project
.
description
=
'Geo project for wiki repo test'
project
.
description
=
'Geo project for wiki repo test'
end
end
...
...
qa/qa/specs/features/ee/browser_ui/geo/wiki_ssh_push_spec.rb
View file @
dbe50cdb
...
@@ -20,7 +20,7 @@ module QA
...
@@ -20,7 +20,7 @@ module QA
end
end
# Create a new project and wiki
# Create a new project and wiki
project
=
Resource
::
Project
.
fabricate!
do
|
project
|
project
=
Resource
::
Project
.
fabricate
_via_api
!
do
|
project
|
project
.
name
=
project_name
project
.
name
=
project_name
project
.
description
=
'Geo project for wiki ssh spec'
project
.
description
=
'Geo project for wiki ssh spec'
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