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
7c2fbe65
Commit
7c2fbe65
authored
Aug 31, 2020
by
Pedro Moreira da Silva
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test failures
parent
b94d7450
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
6 deletions
+10
-6
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
.../vue_merge_request_widget/components/mr_widget_header.vue
+5
-3
qa/qa/page/merge_request/show.rb
qa/qa/page/merge_request/show.rb
+1
-1
spec/frontend/vue_mr_widget/components/mr_widget_header_spec.js
...rontend/vue_mr_widget/components/mr_widget_header_spec.js
+4
-2
No files found.
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
View file @
7c2fbe65
...
@@ -12,7 +12,6 @@ import {
...
@@ -12,7 +12,6 @@ import {
import
{
n__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
n__
,
s__
,
sprintf
}
from
'
~/locale
'
;
import
{
mergeUrlParams
,
webIDEUrl
}
from
'
~/lib/utils/url_utility
'
;
import
{
mergeUrlParams
,
webIDEUrl
}
from
'
~/lib/utils/url_utility
'
;
import
clipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
import
clipboardButton
from
'
~/vue_shared/components/clipboard_button.vue
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
TooltipOnTruncate
from
'
~/vue_shared/components/tooltip_on_truncate.vue
'
;
import
TooltipOnTruncate
from
'
~/vue_shared/components/tooltip_on_truncate.vue
'
;
import
MrWidgetIcon
from
'
./mr_widget_icon.vue
'
;
import
MrWidgetIcon
from
'
./mr_widget_icon.vue
'
;
...
@@ -162,19 +161,22 @@ export default {
...
@@ -162,19 +161,22 @@ export default {
:aria-label=
"__('Download as')"
:aria-label=
"__('Download as')"
icon=
"download"
icon=
"download"
right
right
data-qa-selector=
"download_dropdown"
>
>
<gl-dropdown-header>
{{ s__('Download as') }}
</gl-dropdown-header>
<gl-dropdown-header>
{{ s__('Download as') }}
</gl-dropdown-header>
<gl-dropdown-item
<gl-dropdown-item
:href=
"mr.emailPatchesPath"
:href=
"mr.emailPatchesPath"
class=
"js-download-email-patches
qa-download-email-patches
"
class=
"js-download-email-patches"
download
download
data-qa-selector=
"download_email_patches"
>
>
{{ s__('mrWidget|Email patches') }}
{{ s__('mrWidget|Email patches') }}
</gl-dropdown-item>
</gl-dropdown-item>
<gl-dropdown-item
<gl-dropdown-item
:href=
"mr.plainDiffPath"
:href=
"mr.plainDiffPath"
class=
"js-download-plain-diff
qa-download-plain-diff
"
class=
"js-download-plain-diff"
download
download
data-qa-selector=
"download_plain_diff"
>
>
{{ s__('mrWidget|Plain diff') }}
{{ s__('mrWidget|Plain diff') }}
</gl-dropdown-item>
</gl-dropdown-item>
...
...
qa/qa/page/merge_request/show.rb
View file @
7c2fbe65
...
@@ -8,7 +8,7 @@ module QA
...
@@ -8,7 +8,7 @@ module QA
include
Page
::
Component
::
Issuable
::
Sidebar
include
Page
::
Component
::
Issuable
::
Sidebar
view
'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue'
do
view
'app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue'
do
element
:d
ropdown_toggle
element
:d
ownload_dropdown
element
:download_email_patches
element
:download_email_patches
element
:download_plain_diff
element
:download_plain_diff
element
:open_in_web_ide_button
element
:open_in_web_ide_button
...
...
spec/frontend/vue_mr_widget/components/mr_widget_header_spec.js
View file @
7c2fbe65
...
@@ -22,8 +22,10 @@ describe('MRWidgetHeader', () => {
...
@@ -22,8 +22,10 @@ describe('MRWidgetHeader', () => {
});
});
const
expectDownloadDropdownItems
=
()
=>
{
const
expectDownloadDropdownItems
=
()
=>
{
const
downloadEmailPatchesEl
=
vm
.
$el
.
querySelector
(
'
.js-download-email-patches
'
);
const
downloadEmailPatchesEl
=
vm
.
$el
.
querySelector
(
const
downloadPlainDiffEl
=
vm
.
$el
.
querySelector
(
'
.js-download-plain-diff
'
);
'
.js-download-email-patches .dropdown-item
'
,
);
const
downloadPlainDiffEl
=
vm
.
$el
.
querySelector
(
'
.js-download-plain-diff .dropdown-item
'
);
expect
(
downloadEmailPatchesEl
.
textContent
.
trim
()).
toEqual
(
'
Email patches
'
);
expect
(
downloadEmailPatchesEl
.
textContent
.
trim
()).
toEqual
(
'
Email patches
'
);
expect
(
downloadEmailPatchesEl
.
getAttribute
(
'
href
'
)).
toEqual
(
'
/mr/email-patches
'
);
expect
(
downloadEmailPatchesEl
.
getAttribute
(
'
href
'
)).
toEqual
(
'
/mr/email-patches
'
);
...
...
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