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
e799b6f3
Commit
e799b6f3
authored
Sep 04, 2020
by
Pedro Moreira da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs reliance on .dropdown-item class
parent
06c9325c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
spec/frontend/vue_mr_widget/components/mr_widget_header_spec.js
...rontend/vue_mr_widget/components/mr_widget_header_spec.js
+10
-8
No files found.
spec/frontend/vue_mr_widget/components/mr_widget_header_spec.js
View file @
e799b6f3
...
...
@@ -22,15 +22,17 @@ describe('MRWidgetHeader', () => {
});
const
expectDownloadDropdownItems
=
()
=>
{
const
downloadEmailPatchesEl
=
vm
.
$el
.
querySelector
(
'
.js-download-email-patches .dropdown-item
'
,
);
const
downloadPlainDiffEl
=
vm
.
$el
.
querySelector
(
'
.js-download-plain-diff .dropdown-item
'
);
const
downloadEmailPatchesEl
=
vm
.
$el
.
querySelector
(
'
.js-download-email-patches
'
);
const
downloadPlainDiffEl
=
vm
.
$el
.
querySelector
(
'
.js-download-plain-diff
'
);
expect
(
downloadEmailPatchesEl
.
textContent
.
trim
()).
toEqual
(
'
Email patches
'
);
expect
(
downloadEmailPatchesEl
.
getAttribute
(
'
href
'
)).
toEqual
(
'
/mr/email-patches
'
);
expect
(
downloadPlainDiffEl
.
textContent
.
trim
()).
toEqual
(
'
Plain diff
'
);
expect
(
downloadPlainDiffEl
.
getAttribute
(
'
href
'
)).
toEqual
(
'
/mr/plainDiffPath
'
);
expect
(
downloadEmailPatchesEl
.
innerText
.
trim
()).
toEqual
(
'
Email patches
'
);
expect
(
downloadEmailPatchesEl
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
/mr/email-patches
'
,
);
expect
(
downloadPlainDiffEl
.
innerText
.
trim
()).
toEqual
(
'
Plain diff
'
);
expect
(
downloadPlainDiffEl
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
/mr/plainDiffPath
'
,
);
};
describe
(
'
computed
'
,
()
=>
{
...
...
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