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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
7d070129
Commit
7d070129
authored
May 16, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix form spec
parent
87277793
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
22 deletions
+8
-22
spec/features/issues/form_spec.rb
spec/features/issues/form_spec.rb
+8
-12
spec/features/issues/issue_sidebar_spec.rb
spec/features/issues/issue_sidebar_spec.rb
+0
-10
No files found.
spec/features/issues/form_spec.rb
View file @
7d070129
...
@@ -25,7 +25,7 @@ describe 'New/edit issue', :feature, :js do
...
@@ -25,7 +25,7 @@ describe 'New/edit issue', :feature, :js do
end
end
describe
'single assignee'
do
describe
'single assignee'
do
it
'hides assignee after selection'
do
before
do
click_button
'Unassigned'
click_button
'Unassigned'
wait_for_ajax
wait_for_ajax
...
@@ -36,14 +36,12 @@ describe 'New/edit issue', :feature, :js do
...
@@ -36,14 +36,12 @@ describe 'New/edit issue', :feature, :js do
click_link
user2
.
name
click_link
user2
.
name
end
end
click_button
user2
.
name
page
.
within
'.dropdown-menu-user'
do
page
.
within
'.dropdown-menu-user'
do
click_link
'Unassigned'
click_link
'Unassigned'
end
end
page
.
within
'.js-assignee-search'
do
expect
(
page
).
to
have_content
'Unassigned'
end
expect
(
find
(
'input[name="issue[assignee_ids][]"]'
,
visible:
false
).
value
).
to
match
(
'0'
)
expect
(
find
(
'input[name="issue[assignee_ids][]"]'
,
visible:
false
).
value
).
to
match
(
'0'
)
end
end
...
@@ -54,6 +52,8 @@ describe 'New/edit issue', :feature, :js do
...
@@ -54,6 +52,8 @@ describe 'New/edit issue', :feature, :js do
expect
(
find
(
'a'
,
text:
'Assign to me'
,
visible:
false
)).
not_to
be_visible
expect
(
find
(
'a'
,
text:
'Assign to me'
,
visible:
false
)).
not_to
be_visible
click_button
user
.
name
page
.
within
(
'.dropdown-menu-user'
)
do
page
.
within
(
'.dropdown-menu-user'
)
do
click_link
user
.
name
click_link
user
.
name
end
end
...
@@ -161,18 +161,14 @@ describe 'New/edit issue', :feature, :js do
...
@@ -161,18 +161,14 @@ describe 'New/edit issue', :feature, :js do
click_link
user
.
name
click_link
user
.
name
end
end
expect
(
find
(
'input[name="issue[assignee_ids][]"]'
,
visible:
false
).
value
).
to
match
(
user
.
id
.
to_s
)
expect
(
find
(
'.js-assignee-search'
)).
to
have_content
(
user
.
name
)
expect
(
find
(
'.dropdown-menu-user a.is-active'
).
first
(
:xpath
,
'..'
)[
'data-user-id'
]).
to
eq
(
user
.
id
.
to_s
)
click_button
user
.
name
# 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
(
''
)
page
.
within
'.dropdown-menu-user'
do
page
.
within
'.dropdown-menu-user'
do
click_link
user2
.
name
click_link
user2
.
name
end
end
expect
(
find
(
'input[name="issue[assignee_ids][]"]'
,
visible:
false
).
value
).
to
match
(
user2
.
id
.
to_s
)
expect
(
find
(
'.js-assignee-search'
)).
to
have_content
(
user2
.
name
)
expect
(
find
(
'.dropdown-menu-user a.is-active'
).
first
(
:xpath
,
'..'
)[
'data-user-id'
]).
to
eq
(
user2
.
id
.
to_s
)
end
end
end
end
...
...
spec/features/issues/issue_sidebar_spec.rb
View file @
7d070129
...
@@ -57,16 +57,6 @@ feature 'Issue Sidebar', feature: true do
...
@@ -57,16 +57,6 @@ feature 'Issue Sidebar', feature: true do
expect
(
page
.
find
(
'.dropdown-menu-user-link.is-active'
)).
to
have_content
(
user
.
name
)
expect
(
page
.
find
(
'.dropdown-menu-user-link.is-active'
)).
to
have_content
(
user
.
name
)
end
end
end
end
context
'single assignee'
do
it
'hides assignee after selection'
do
page
.
within
(
'.dropdown-menu-user'
)
do
click_link
user
.
name
end
expect
(
page
.
find
(
'.block.assignee .selectbox'
,
visible:
false
)).
not_to
be_visible
end
end
end
end
context
'as a allowed user'
do
context
'as a allowed user'
do
...
...
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