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