Transform a
tag with button role into a button
This commit is contained in:
parent
c8a17cd1bd
commit
3fed0302cb
2 changed files with 11 additions and 9 deletions
|
@ -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>
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue