Transform a tag with button role into a button

This commit is contained in:
Filipa Lacerda 2018-02-01 16:13:10 +00:00
parent c8a17cd1bd
commit 3fed0302cb
No known key found for this signature in database
GPG key ID: 9CA3FDE4D1E2F1C8
2 changed files with 11 additions and 9 deletions

View file

@ -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>

View file

@ -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');
});
});
});