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
f62bcdc3
Commit
f62bcdc3
authored
Feb 03, 2020
by
Brett Walker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix flaky test by adding :js to specs
parent
91eee51f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
spec/features/task_lists_spec.rb
spec/features/task_lists_spec.rb
+12
-6
No files found.
spec/features/task_lists_spec.rb
View file @
f62bcdc3
...
@@ -240,28 +240,30 @@ describe 'Task Lists' do
...
@@ -240,28 +240,30 @@ describe 'Task Lists' do
end
end
shared_examples
'multiple tasks'
do
shared_examples
'multiple tasks'
do
it
'renders for description'
do
it
'renders for description'
,
:js
do
visit_merge_request
(
project
,
merge
)
visit_merge_request
(
project
,
merge
)
wait_for_requests
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
6
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
6
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
2
)
expect
(
page
).
to
have_selector
(
'ul input[checked]'
,
count:
2
)
end
end
it
'contains the required selectors'
do
it
'contains the required selectors'
,
:js
do
visit_merge_request
(
project
,
merge
)
visit_merge_request
(
project
,
merge
)
wait_for_requests
container
=
'.detail-page-description .description.js-task-list-container'
container
=
'.detail-page-description .description.js-task-list-container'
expect
(
page
).
to
have_selector
(
container
)
expect
(
page
).
to
have_selector
(
container
)
expect
(
page
).
to
have_selector
(
"
#{
container
}
.md .task-list .task-list-item .task-list-item-checkbox"
)
expect
(
page
).
to
have_selector
(
"
#{
container
}
.md .task-list .task-list-item .task-list-item-checkbox"
)
expect
(
page
).
to
have_selector
(
"
#{
container
}
.js-task-list-field"
)
expect
(
page
).
to
have_selector
(
"
#{
container
}
.js-task-list-field"
,
visible:
false
)
expect
(
page
).
to
have_selector
(
'form.js-issuable-update'
)
expect
(
page
).
to
have_selector
(
'form.js-issuable-update'
)
expect
(
page
).
to
have_selector
(
'a.btn-close'
)
end
end
it
'is only editable by author'
,
:js
do
it
'is only editable by author'
,
:js
do
visit_merge_request
(
project
,
merge
)
visit_merge_request
(
project
,
merge
)
wait_for_requests
expect
(
page
).
to
have_selector
(
'.js-task-list-container'
)
expect
(
page
).
to
have_selector
(
'.js-task-list-container'
)
expect
(
page
).
to
have_selector
(
'li.task-list-item.enabled'
,
count:
6
)
expect
(
page
).
to
have_selector
(
'li.task-list-item.enabled'
,
count:
6
)
...
@@ -269,6 +271,7 @@ describe 'Task Lists' do
...
@@ -269,6 +271,7 @@ describe 'Task Lists' do
logout
(
:user
)
logout
(
:user
)
login_as
(
user2
)
login_as
(
user2
)
visit
current_path
visit
current_path
wait_for_requests
expect
(
page
).
not_to
have_selector
(
'.js-task-list-container'
)
expect
(
page
).
not_to
have_selector
(
'.js-task-list-container'
)
expect
(
page
).
to
have_selector
(
'li.task-list-item.enabled'
,
count:
0
)
expect
(
page
).
to
have_selector
(
'li.task-list-item.enabled'
,
count:
0
)
...
@@ -297,8 +300,9 @@ describe 'Task Lists' do
...
@@ -297,8 +300,9 @@ describe 'Task Lists' do
describe
'single incomplete task'
do
describe
'single incomplete task'
do
let!
(
:merge
)
{
create
(
:merge_request
,
:simple
,
description:
singleIncompleteMarkdown
,
author:
user
,
source_project:
project
)
}
let!
(
:merge
)
{
create
(
:merge_request
,
:simple
,
description:
singleIncompleteMarkdown
,
author:
user
,
source_project:
project
)
}
it
'renders for description'
do
it
'renders for description'
,
:js
do
visit_merge_request
(
project
,
merge
)
visit_merge_request
(
project
,
merge
)
wait_for_requests
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
...
@@ -315,8 +319,9 @@ describe 'Task Lists' do
...
@@ -315,8 +319,9 @@ describe 'Task Lists' do
describe
'single complete task'
do
describe
'single complete task'
do
let!
(
:merge
)
{
create
(
:merge_request
,
:simple
,
description:
singleCompleteMarkdown
,
author:
user
,
source_project:
project
)
}
let!
(
:merge
)
{
create
(
:merge_request
,
:simple
,
description:
singleCompleteMarkdown
,
author:
user
,
source_project:
project
)
}
it
'renders for description'
do
it
'renders for description'
,
:js
do
visit_merge_request
(
project
,
merge
)
visit_merge_request
(
project
,
merge
)
wait_for_requests
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'ul.task-list'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
expect
(
page
).
to
have_selector
(
'li.task-list-item'
,
count:
1
)
...
@@ -325,6 +330,7 @@ describe 'Task Lists' do
...
@@ -325,6 +330,7 @@ describe 'Task Lists' do
it
'provides a summary on MergeRequests#index'
do
it
'provides a summary on MergeRequests#index'
do
visit
project_merge_requests_path
(
project
)
visit
project_merge_requests_path
(
project
)
expect
(
page
).
to
have_content
(
"1 of 1 task completed"
)
expect
(
page
).
to
have_content
(
"1 of 1 task completed"
)
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