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
6443395d
Commit
6443395d
authored
May 12, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix form_spec.rb failure relating to wait_for_ajax and unneeded commands
parent
df2d3773
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
spec/features/issues/form_spec.rb
spec/features/issues/form_spec.rb
+10
-2
No files found.
spec/features/issues/form_spec.rb
View file @
6443395d
require
'rails_helper'
describe
'New/edit issue'
,
feature:
true
,
js:
true
do
describe
'New/edit issue'
,
:feature
,
:js
do
include
GitlabRoutingHelper
include
ActionView
::
Helpers
::
JavaScriptHelper
include
WaitForAjax
let!
(
:project
)
{
create
(
:project
)
}
let!
(
:user
)
{
create
(
:user
)}
...
...
@@ -27,6 +28,8 @@ describe 'New/edit issue', feature: true, js: true do
before
do
click_button
'Unassigned'
end
wait_for_ajax
it
'unselects other assignees when unassigned is selected'
do
page
.
within
'.dropdown-menu-user'
do
...
...
@@ -65,6 +68,9 @@ describe 'New/edit issue', feature: true, js: true do
expect
(
find
(
'a'
,
text:
'Assign to me'
)).
to
be_visible
click_button
'Unassigned'
wait_for_ajax
page
.
within
'.dropdown-menu-user'
do
click_link
user2
.
name
end
...
...
@@ -161,13 +167,15 @@ describe 'New/edit issue', feature: true, js: true do
it
'correctly updates the selected user when changing assignee'
do
click_button
'Unassigned'
wait_for_ajax
page
.
within
'.dropdown-menu-user'
do
click_link
user
.
name
end
expect
(
find
(
'input[name="issue[assignee_ids][]"]'
,
visible:
false
).
value
).
to
match
(
user
.
id
.
to_s
)
expect
(
find
(
'.dropdown-menu-user a.is-active'
).
first
(
:xpath
,
'..'
)[
'data-user-id'
]).
to
eq
(
user
.
id
.
to_s
)
# check the ::before pseudo element to ensure checkmark icon is present
expect
(
before_for_selector
(
'.dropdown-menu-selectable a.is-active'
)).
not_to
eq
(
''
)
expect
(
before_for_selector
(
'.dropdown-menu-selectable a:not(.is-active)'
)).
to
eq
(
''
)
...
...
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