summaryrefslogtreecommitdiff
path: root/spec/frontend/artifacts_settings
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-03-24 12:11:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-03-24 12:11:33 +0000
commit22d83e3a64bb759bf409d087aeb449da1ac06732 (patch)
treefa6134079326a7ef083dbe1c7629f79b1a49a5be /spec/frontend/artifacts_settings
parent8856bb563b0f71b6a7e838df630766c5748a8ebb (diff)
downloadgitlab-ce-22d83e3a64bb759bf409d087aeb449da1ac06732.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/artifacts_settings')
-rw-r--r--spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js b/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js
index efdebe5f3b0..13f17b5e87d 100644
--- a/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js
+++ b/spec/frontend/artifacts_settings/components/keep_latest_artifact_checkbox_spec.js
@@ -1,7 +1,8 @@
import { GlFormCheckbox, GlLink } from '@gitlab/ui';
import { shallowMount } from '@vue/test-utils';
-import Vue, { nextTick } from 'vue';
+import Vue from 'vue';
import VueApollo from 'vue-apollo';
+import waitForPromises from 'helpers/wait_for_promises';
import createMockApollo from 'helpers/mock_apollo_helper';
import UpdateKeepLatestArtifactProjectSetting from '~/artifacts_settings/graphql/mutations/update_keep_latest_artifact_project_setting.mutation.graphql';
import GetKeepLatestArtifactApplicationSetting from '~/artifacts_settings/graphql/queries/get_keep_latest_artifact_application_setting.query.graphql';
@@ -102,19 +103,16 @@ describe('Keep latest artifact checkbox', () => {
});
describe('when application keep latest artifact setting is enabled', () => {
- beforeEach(() => {
+ beforeEach(async () => {
createComponent();
+ await waitForPromises();
});
it('sets correct setting value in checkbox with query result', async () => {
- await nextTick();
-
expect(wrapper.element).toMatchSnapshot();
});
it('checkbox is enabled when application setting is enabled', async () => {
- await nextTick();
-
expect(findCheckbox().attributes('disabled')).toBeUndefined();
});
});