diff options
Diffstat (limited to 'spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js')
-rw-r--r-- | spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js b/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js index 7173abe1316..a38dcd626f4 100644 --- a/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js +++ b/spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js @@ -79,7 +79,7 @@ describe('RunnerInstructionsModal component', () => { } }; - beforeEach(async () => { + beforeEach(() => { runnerPlatformsHandler = jest.fn().mockResolvedValue(mockGraphqlRunnerPlatforms); runnerSetupInstructionsHandler = jest.fn().mockResolvedValue(mockGraphqlInstructions); }); @@ -259,11 +259,11 @@ describe('RunnerInstructionsModal component', () => { }); describe('when apollo is loading', () => { - beforeEach(() => { + it('should show a skeleton loader', async () => { createComponent(); - }); + await nextTick(); + await nextTick(); - it('should show a skeleton loader', async () => { expect(findSkeletonLoader().exists()).toBe(true); expect(findGlLoadingIcon().exists()).toBe(false); @@ -275,6 +275,8 @@ describe('RunnerInstructionsModal component', () => { }); it('once loaded, should not show a loading state', async () => { + createComponent(); + await waitForPromises(); expect(findSkeletonLoader().exists()).toBe(false); |