diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 00:14:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-01-25 00:14:06 +0300 |
commit | 8e73c80c681d8b02633ae25dbd642ecff4864511 (patch) | |
tree | 5d33c6c8cd78c596f80997864b3558edf430b666 /spec/frontend/vue_shared/components/runner_instructions | |
parent | fdc98c3e3cfdca66222044fc6aa195011d227ee2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/vue_shared/components/runner_instructions')
-rw-r--r-- | spec/frontend/vue_shared/components/runner_instructions/runner_instructions_modal_spec.js | 18 |
1 files changed, 9 insertions, 9 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 e74a867ec97..7808bdb8db3 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 @@ -77,8 +77,6 @@ describe('RunnerInstructionsModal component', () => { runnerSetupInstructionsHandler = jest.fn().mockResolvedValue(mockGraphqlInstructions); createComponent(); - - await nextTick(); }); afterEach(() => { @@ -113,13 +111,15 @@ describe('RunnerInstructionsModal component', () => { }); }); - it('binary instructions are shown', () => { + it('binary instructions are shown', async () => { + await waitForPromises(); const instructions = findBinaryInstructions().text(); expect(instructions).toBe(installInstructions); }); - it('register command is shown with a replaced token', () => { + it('register command is shown with a replaced token', async () => { + await waitForPromises(); const instructions = findRegisterCommand().text(); expect(instructions).toBe( @@ -130,7 +130,7 @@ describe('RunnerInstructionsModal component', () => { describe('when a register token is not shown', () => { beforeEach(async () => { createComponent({ props: { registrationToken: undefined } }); - await nextTick(); + await waitForPromises(); }); it('register command is shown without a defined registration token', () => { @@ -198,16 +198,16 @@ describe('RunnerInstructionsModal component', () => { expect(findSkeletonLoader().exists()).toBe(true); expect(findGlLoadingIcon().exists()).toBe(false); - await nextTick(); // wait for platforms + await nextTick(); + await jest.runOnlyPendingTimers(); + await nextTick(); expect(findGlLoadingIcon().exists()).toBe(true); }); it('once loaded, should not show a loading state', async () => { createComponent(); - - await nextTick(); // wait for platforms - await nextTick(); // wait for architectures + await waitForPromises(); expect(findSkeletonLoader().exists()).toBe(false); expect(findGlLoadingIcon().exists()).toBe(false); |