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
2c8e0e1e
Commit
2c8e0e1e
authored
Jun 09, 2021
by
Vitaly Slobodin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract GlAlert finder into a function
parent
19676292
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
ee/spec/frontend/admin/components/qrtly_reconciliation_alert_spec.js
...ntend/admin/components/qrtly_reconciliation_alert_spec.js
+6
-4
No files found.
ee/spec/frontend/admin/components/qrtly_reconciliation_alert_spec.js
View file @
2c8e0e1e
...
...
@@ -20,6 +20,8 @@ describe('Qrtly Reconciliation Alert', () => {
});
};
const
findAlert
=
()
=>
wrapper
.
find
(
GlAlert
);
beforeEach
(()
=>
{
wrapper
=
createComponent
();
});
...
...
@@ -30,17 +32,17 @@ describe('Qrtly Reconciliation Alert', () => {
describe
(
'
Rendering
'
,
()
=>
{
it
(
'
renders alert title with date
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlAlert
).
attributes
(
'
title
'
)).
toContain
(
`occur on 2020-07-10`
);
expect
(
findAlert
(
).
attributes
(
'
title
'
)).
toContain
(
`occur on 2020-07-10`
);
});
it
(
'
has the correct link to the help page
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlAlert
).
attributes
(
'
primarybuttonlink
'
)).
toBe
(
expect
(
findAlert
(
).
attributes
(
'
primarybuttonlink
'
)).
toBe
(
'
/help/subscriptions/self_managed/index#quarterly-subscription-reconciliation
'
,
);
});
it
(
'
has the correct link to contact support
'
,
()
=>
{
expect
(
wrapper
.
find
(
GlAlert
).
attributes
(
'
secondarybuttonlink
'
)).
toBe
(
expect
(
findAlert
(
).
attributes
(
'
secondarybuttonlink
'
)).
toBe
(
'
https://about.gitlab.com/support/#contact-support
'
,
);
});
...
...
@@ -48,7 +50,7 @@ describe('Qrtly Reconciliation Alert', () => {
describe
(
'
methods
'
,
()
=>
{
it
(
'
sets the cookie on dismis
'
,
()
=>
{
wrapper
.
find
(
GlAlert
).
vm
.
$emit
(
'
dismiss
'
);
findAlert
(
).
vm
.
$emit
(
'
dismiss
'
);
expect
(
Cookie
.
set
).
toHaveBeenCalledTimes
(
1
);
expect
(
Cookie
.
set
).
toHaveBeenCalledWith
(
'
key
'
,
true
,
{
expires
:
4
});
...
...
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