Commit 2edbd2ce authored by Dallas Reedy's avatar Dallas Reedy

Use find rather than get verbiage for spec helpers

parent 11c635a8
......@@ -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