Commit 3fed0302 authored by Filipa Lacerda's avatar Filipa Lacerda

Transform `a` tag with button role into a `button`

parent c8a17cd1
...@@ -29,11 +29,13 @@ ...@@ -29,11 +29,13 @@
{{ s__("mrWidget|You can merge this merge request manually using the") }} {{ s__("mrWidget|You can merge this merge request manually using the") }}
</template> </template>
<a <button
role="button" type="button"
class="btn-link btn-blank js-open-modal-help"
data-toggle="modal" data-toggle="modal"
href="#modal_merge_info"> data-target="#modal_merge_info"
>
{{ s__("mrWidget|command line") }} {{ s__("mrWidget|command line") }}
</a> </button>
</section> </section>
</template> </template>
...@@ -29,9 +29,9 @@ describe('MRWidgetMergeHelp', () => { ...@@ -29,9 +29,9 @@ describe('MRWidgetMergeHelp', () => {
); );
}); });
it('renders element to open a modal', () => { it('renders button to open help modal', () => {
expect(vm.$el.querySelector('a').getAttribute('href')).toEqual('#modal_merge_info'); expect(vm.$el.querySelector('.js-open-modal-help').getAttribute('data-target')).toEqual('#modal_merge_info');
expect(vm.$el.querySelector('a').getAttribute('data-toggle')).toEqual('modal'); expect(vm.$el.querySelector('.js-open-modal-help').getAttribute('data-toggle')).toEqual('modal');
}); });
}); });
...@@ -49,8 +49,8 @@ describe('MRWidgetMergeHelp', () => { ...@@ -49,8 +49,8 @@ describe('MRWidgetMergeHelp', () => {
}); });
it('renders element to open a modal', () => { it('renders element to open a modal', () => {
expect(vm.$el.querySelector('a').getAttribute('href')).toEqual('#modal_merge_info'); expect(vm.$el.querySelector('.js-open-modal-help').getAttribute('data-target')).toEqual('#modal_merge_info');
expect(vm.$el.querySelector('a').getAttribute('data-toggle')).toEqual('modal'); expect(vm.$el.querySelector('.js-open-modal-help').getAttribute('data-toggle')).toEqual('modal');
}); });
}); });
}); });
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment