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
3fed0302
Commit
3fed0302
authored
Feb 01, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transform `a` tag with button role into a `button`
parent
c8a17cd1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_merge_help.vue
..._merge_request_widget/components/mr_widget_merge_help.vue
+6
-4
spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js
...pts/vue_mr_widget/components/mr_widget_merge_help_spec.js
+5
-5
No files found.
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_merge_help.vue
View file @
3fed0302
...
...
@@ -29,11 +29,13 @@
{{
s__
(
"
mrWidget|You can merge this merge request manually using the
"
)
}}
</
template
>
<a
role=
"button"
<button
type=
"button"
class=
"btn-link btn-blank js-open-modal-help"
data-toggle=
"modal"
href=
"#modal_merge_info"
>
data-target=
"#modal_merge_info"
>
{{ s__("mrWidget|command line") }}
</
a
>
</
button
>
</section>
</template>
spec/javascripts/vue_mr_widget/components/mr_widget_merge_help_spec.js
View file @
3fed0302
...
...
@@ -29,9 +29,9 @@ describe('MRWidgetMergeHelp', () => {
);
});
it
(
'
renders
element to open a
modal
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
#modal_merge_info
'
);
expect
(
vm
.
$el
.
querySelector
(
'
a
'
).
getAttribute
(
'
data-toggle
'
)).
toEqual
(
'
modal
'
);
it
(
'
renders
button to open help
modal
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-target
'
)).
toEqual
(
'
#modal_merge_info
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-toggle
'
)).
toEqual
(
'
modal
'
);
});
});
...
...
@@ -49,8 +49,8 @@ describe('MRWidgetMergeHelp', () => {
});
it
(
'
renders element to open a modal
'
,
()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
a
'
).
getAttribute
(
'
href
'
)).
toEqual
(
'
#modal_merge_info
'
);
expect
(
vm
.
$el
.
querySelector
(
'
a
'
).
getAttribute
(
'
data-toggle
'
)).
toEqual
(
'
modal
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-target
'
)).
toEqual
(
'
#modal_merge_info
'
);
expect
(
vm
.
$el
.
querySelector
(
'
.js-open-modal-help
'
).
getAttribute
(
'
data-toggle
'
)).
toEqual
(
'
modal
'
);
});
});
});
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