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
2525513c
Commit
2525513c
authored
Jan 12, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update capybara specs for subscription toggle
parent
bd2e524f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
spec/features/boards/sidebar_spec.rb
spec/features/boards/sidebar_spec.rb
+5
-5
spec/features/projects/merge_requests/user_manages_subscription_spec.rb
...projects/merge_requests/user_manages_subscription_spec.rb
+9
-11
No files found.
spec/features/boards/sidebar_spec.rb
View file @
2525513c
...
...
@@ -334,14 +334,14 @@ describe 'Issue Boards', :js do
wait_for_requests
page
.
within
(
'.subscriptions'
)
do
click_button
'Subscribe'
find
(
'.js-issuable-subscribe-button button:not(.is-checked)'
).
click
wait_for_requests
expect
(
page
).
to
have_c
ontent
(
'Unsubscribe
'
)
expect
(
page
).
to
have_c
ss
(
'.js-issuable-subscribe-button button.is-checked
'
)
end
end
it
'has
"Unsubscribe" button
when already subscribed'
do
it
'has
checked subscription toggle
when already subscribed'
do
create
(
:subscription
,
user:
user
,
project:
project
,
subscribable:
issue2
,
subscribed:
true
)
visit
project_board_path
(
project
,
board
)
wait_for_requests
...
...
@@ -350,10 +350,10 @@ describe 'Issue Boards', :js do
wait_for_requests
page
.
within
(
'.subscriptions'
)
do
click_button
'Unsubscribe'
find
(
'.js-issuable-subscribe-button button.is-checked'
).
click
wait_for_requests
expect
(
page
).
to
have_c
ontent
(
'Subscribe
'
)
expect
(
page
).
to
have_c
ss
(
'.js-issuable-subscribe-button button:not(.is-checked)
'
)
end
end
end
...
...
spec/features/projects/merge_requests/user_manages_subscription_spec.rb
View file @
2525513c
...
...
@@ -13,20 +13,18 @@ describe 'User manages subscription', :js do
end
it
'toggles subscription'
do
subscribe_button
=
find
(
'.js-issuable-subscribe-button'
)
page
.
within
(
'.js-issuable-subscribe-button'
)
do
expect
(
page
).
to
have_css
'button:not(.is-checked)'
find
(
'button:not(.is-checked)'
).
click
expect
(
subscribe_button
).
to
have_content
(
'Subscribe'
)
wait_for_requests
click_on
(
'Subscribe'
)
expect
(
page
).
to
have_css
'button.is-checked'
find
(
'button.is-checked'
).
click
wait_for_requests
wait_for_requests
expect
(
subscribe_button
).
to
have_content
(
'Unsubscribe'
)
click_on
(
'Unsubscribe'
)
wait_for_requests
expect
(
subscribe_button
).
to
have_content
(
'Subscribe'
)
expect
(
page
).
to
have_css
'button:not(.is-checked)'
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