Fix specs reliance on .dropdown-item class

parent 06c9325c
......@@ -22,15 +22,17 @@ describe('MRWidgetHeader', () => {
});
const expectDownloadDropdownItems = () => {
const downloadEmailPatchesEl = vm.$el.querySelector(
'.js-download-email-patches .dropdown-item',
);
const downloadPlainDiffEl = vm.$el.querySelector('.js-download-plain-diff .dropdown-item');
const downloadEmailPatchesEl = vm.$el.querySelector('.js-download-email-patches');
const downloadPlainDiffEl = vm.$el.querySelector('.js-download-plain-diff');
expect(downloadEmailPatchesEl.textContent.trim()).toEqual('Email patches');
expect(downloadEmailPatchesEl.getAttribute('href')).toEqual('/mr/email-patches');
expect(downloadPlainDiffEl.textContent.trim()).toEqual('Plain diff');
expect(downloadPlainDiffEl.getAttribute('href')).toEqual('/mr/plainDiffPath');
expect(downloadEmailPatchesEl.innerText.trim()).toEqual('Email patches');
expect(downloadEmailPatchesEl.querySelector('a').getAttribute('href')).toEqual(
'/mr/email-patches',
);
expect(downloadPlainDiffEl.innerText.trim()).toEqual('Plain diff');
expect(downloadPlainDiffEl.querySelector('a').getAttribute('href')).toEqual(
'/mr/plainDiffPath',
);
};
describe('computed', () => {
......
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