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
d77d1749
Commit
d77d1749
authored
Jan 11, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update karma tests
parent
de19158c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
...cripts/sidebar/components/subscriptions/subscriptions.vue
+1
-1
spec/javascripts/sidebar/subscriptions_spec.js
spec/javascripts/sidebar/subscriptions_spec.js
+6
-6
No files found.
app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
View file @
d77d1749
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
{{
__
(
'
Notifications
'
)
}}
{{
__
(
'
Notifications
'
)
}}
</span>
</span>
<toggle-button
<toggle-button
ref=
"
loading
Button"
ref=
"
toggle
Button"
class=
"pull-right hide-collapsed js-issuable-subscribe-button"
class=
"pull-right hide-collapsed js-issuable-subscribe-button"
:is-loading=
"showLoadingState"
:is-loading=
"showLoadingState"
:value=
"subscribed"
:value=
"subscribed"
...
...
spec/javascripts/sidebar/subscriptions_spec.js
View file @
d77d1749
...
@@ -20,23 +20,23 @@ describe('Subscriptions', function () {
...
@@ -20,23 +20,23 @@ describe('Subscriptions', function () {
subscribed
:
undefined
,
subscribed
:
undefined
,
});
});
expect
(
vm
.
$refs
.
loadingButton
.
l
oading
).
toBe
(
true
);
expect
(
vm
.
$refs
.
toggleButton
.
isL
oading
).
toBe
(
true
);
expect
(
vm
.
$refs
.
loadingButton
.
label
).
toBeUndefined
(
);
expect
(
vm
.
$refs
.
toggleButton
.
$el
.
querySelector
(
'
.project-feature-toggle
'
)).
toHaveClass
(
'
is-loading
'
);
});
});
it
(
'
has "Subscribe" text
when currently not subscribed
'
,
()
=>
{
it
(
'
is toggled "off"
when currently not subscribed
'
,
()
=>
{
vm
=
mountComponent
(
Subscriptions
,
{
vm
=
mountComponent
(
Subscriptions
,
{
subscribed
:
false
,
subscribed
:
false
,
});
});
expect
(
vm
.
$refs
.
loadingButton
.
label
).
toBe
(
'
Subscribe
'
);
expect
(
vm
.
$refs
.
toggleButton
.
$el
.
querySelector
(
'
.project-feature-toggle
'
)).
not
.
toHaveClass
(
'
is-checked
'
);
});
});
it
(
'
has "Unsubscribe" text when currently not
subscribed
'
,
()
=>
{
it
(
'
is toggled "on" when currently
subscribed
'
,
()
=>
{
vm
=
mountComponent
(
Subscriptions
,
{
vm
=
mountComponent
(
Subscriptions
,
{
subscribed
:
true
,
subscribed
:
true
,
});
});
expect
(
vm
.
$refs
.
loadingButton
.
label
).
toBe
(
'
Unsubscribe
'
);
expect
(
vm
.
$refs
.
toggleButton
.
$el
.
querySelector
(
'
.project-feature-toggle
'
)).
toHaveClass
(
'
is-checked
'
);
});
});
});
});
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