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
8b4dc1d0
Commit
8b4dc1d0
authored
Jun 28, 2018
by
Michael Kozono
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract `wait_for_issue_replication` for readability
And filter by issue title to make the method more deterministic.
parent
8ce82be9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
7 deletions
+43
-7
qa/qa/ee.rb
qa/qa/ee.rb
+4
-0
qa/qa/ee/page/project/issue/index.rb
qa/qa/ee/page/project/issue/index.rb
+36
-0
qa/qa/page/project/issue/index.rb
qa/qa/page/project/issue/index.rb
+2
-0
qa/qa/specs/features/ee/geo/attachment_replication_spec.rb
qa/qa/specs/features/ee/geo/attachment_replication_spec.rb
+1
-7
No files found.
qa/qa/ee.rb
View file @
8b4dc1d0
...
...
@@ -35,6 +35,10 @@ module QA
module
Project
autoload
:Show
,
'qa/ee/page/project/show'
module
Issue
autoload
:Index
,
'qa/ee/page/project/issue/index'
end
module
Settings
autoload
:ProtectedBranches
,
'qa/ee/page/project/settings/protected_branches'
end
...
...
qa/qa/ee/page/project/issue/index.rb
0 → 100644
View file @
8b4dc1d0
module
QA
module
EE
module
Page
module
Project
module
Issue
module
Index
def
self
.
prepended
(
page
)
page
.
module_eval
do
view
'app/views/shared/issuable/_search_bar.html.haml'
do
element
:issue_filter_form
,
/form_tag.+class: 'filter-form /
element
:issue_filter_input
,
/%input.form-control.filtered-search/
end
end
end
def
wait_for_issue_replication
(
issue
)
wait
do
filter_by_title
(
issue
.
title
)
page
.
has_content?
(
issue
.
title
)
end
go_to_issue
(
issue
.
title
)
end
def
filter_by_title
(
title
)
page
.
within
(
'form.filter-form'
)
do
fill_in
class:
'filtered-search'
,
with:
title
end
end
end
end
end
end
end
end
qa/qa/page/project/issue/index.rb
View file @
8b4dc1d0
...
...
@@ -3,6 +3,8 @@ module QA
module
Project
module
Issue
class
Index
<
Page
::
Base
prepend
QA
::
EE
::
Page
::
Project
::
Issue
::
Index
view
'app/views/projects/issues/_issue.html.haml'
do
element
:issue_link
,
'link_to issue.title'
end
...
...
qa/qa/specs/features/ee/geo/attachment_replication_spec.rb
View file @
8b4dc1d0
...
...
@@ -44,13 +44,7 @@ module QA
Page
::
Menu
::
Side
.
act
{
click_issues
}
Page
::
Project
::
Issue
::
Index
.
perform
do
|
index
|
# wait for DB replication of issue
index
.
wait
do
# we may want to filter by title here if the project is reused by other specs
page
.
has_content?
(
issue
.
title
)
end
index
.
go_to_issue
(
issue
.
title
)
index
.
wait_for_issue_replication
(
issue
)
end
image_url
=
find
(
'a[href$="banana_sample.gif"]'
)[
:href
]
...
...
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