Commit 4ab39fe0 authored by Illya Klymov's avatar Illya Klymov

Merge branch...

Merge branch 'dreedy-use-find-verbiage-instead-of-get-verbiage-for-spec-helper-methods-2' into 'master'

Use find rather than get verbiage for spec helpers

See merge request gitlab-org/gitlab!59439
parents 700e495f 2edbd2ce
......@@ -10,6 +10,7 @@ describe('TrialStatusPopover component', () => {
let trackingSpy;
const findByTestId = (testId) => wrapper.find(`[data-testid="${testId}"]`);
const findGlPopover = () => wrapper.findComponent(GlPopover);
const createComponent = () => {
return shallowMount(TrialStatusPopover, {
......@@ -34,8 +35,6 @@ describe('TrialStatusPopover component', () => {
wrapper = null;
});
const getGlPopover = () => wrapper.findComponent(GlPopover);
it('matches the snapshot', () => {
expect(wrapper.element).toMatchSnapshot();
});
......@@ -71,14 +70,14 @@ describe('TrialStatusPopover component', () => {
wrapper.vm.onResize();
await wrapper.vm.$nextTick();
expect(getGlPopover().attributes('disabled')).toBe(isDisabled);
expect(findGlPopover().attributes('disabled')).toBe(isDisabled);
},
);
});
describe('onShown', () => {
beforeEach(() => {
getGlPopover().vm.$emit('shown');
findGlPopover().vm.$emit('shown');
});
it('dispatches tracking event', () => {
......
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