Commit 843566df authored by Filipa Lacerda's avatar Filipa Lacerda
Browse files

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

parent 5d8cb84f3125
......@@ -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');
});
});
});
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