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
949b959f
Commit
949b959f
authored
Nov 15, 2019
by
leiminghuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
supply tests
parent
1ab45d47
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
...cripts/sidebar/components/subscriptions/subscriptions.vue
+1
-0
spec/javascripts/sidebar/subscriptions_spec.js
spec/javascripts/sidebar/subscriptions_spec.js
+16
-11
No files found.
app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue
View file @
949b959f
...
...
@@ -103,6 +103,7 @@ export default {
<
template
>
<div>
<span
ref=
"tooltip"
v-tooltip
class=
"sidebar-collapsed-icon"
:title=
"notificationTooltip"
...
...
spec/javascripts/sidebar/subscriptions_spec.js
View file @
949b959f
...
...
@@ -77,19 +77,24 @@ describe('Subscriptions', function() {
expect
(
vm
.
$emit
).
toHaveBeenCalledWith
(
'
toggleSidebar
'
);
});
it
(
'
notify component disabled when project_emails_disabled is set on
'
,
()
=>
{
vm
=
mountComponent
(
Subscriptions
,
{
subscribed
:
true
,
projectEmailsDisabled
:
true
,
subscribeDisabledDescription
:
'
Notifications have been disabled
'
,
describe
(
'
given project emails are disabled
'
,
()
=>
{
const
subscribeDisabledDescription
=
'
Notifications have been disabled
'
;
beforeEach
(()
=>
{
vm
=
mountComponent
(
Subscriptions
,
{
subscribed
:
false
,
projectEmailsDisabled
:
true
,
subscribeDisabledDescription
,
});
});
expect
(
vm
.
$el
.
querySelector
(
'
span
'
).
getAttribute
(
'
data-original-title
'
)).
toBe
(
vm
.
subscribeDisabledDescription
,
);
it
(
'
sets the correct display text
'
,
()
=>
{
expect
(
vm
.
$el
.
textContent
).
toContain
(
subscribeDisabledDescription
);
expect
(
vm
.
$refs
.
tooltip
.
dataset
.
originalTitle
).
toBe
(
subscribeDisabledDescription
);
});
expect
(
vm
.
$el
.
querySelector
(
'
.issuable-header-text
'
).
textContent
.
trim
()).
toBe
(
vm
.
subscribeDisabledDescription
,
);
it
(
'
does not render the toggle button
'
,
()
=>
{
expect
(
vm
.
$refs
.
toggleButton
).
toBeUndefined
();
}
);
});
});
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