From 5064bf8c5647d4c4430cbb4d097cf1592416de29 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 25 Mar 2020 09:08:11 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../blob/suggest_gitlab_ci_yml/components/popover_spec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'spec/frontend/blob') diff --git a/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js b/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js index 43e92bdca5f..68f4c5c9e02 100644 --- a/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js +++ b/spec/frontend/blob/suggest_gitlab_ci_yml/components/popover_spec.js @@ -1,6 +1,5 @@ import { shallowMount } from '@vue/test-utils'; import Popover from '~/blob/suggest_gitlab_ci_yml/components/popover.vue'; -import Cookies from 'js-cookie'; import { mockTracking, unmockTracking } from 'helpers/tracking_helper'; import * as utils from '~/lib/utils/common_utils'; @@ -10,9 +9,11 @@ jest.mock('~/lib/utils/common_utils', () => ({ })); const target = 'gitlab-ci-yml-selector'; -const dismissKey = 'suggest_gitlab_ci_yml_99'; +const dismissKey = '99'; const defaultTrackLabel = 'suggest_gitlab_ci_yml'; const commitTrackLabel = 'suggest_commit_first_project_gitlab_ci_yml'; + +const dismissCookie = 'suggest_gitlab_ci_yml_99'; const humanAccess = 'owner'; describe('Suggest gitlab-ci.yml Popover', () => { @@ -46,7 +47,8 @@ describe('Suggest gitlab-ci.yml Popover', () => { describe('when the dismiss cookie is set', () => { beforeEach(() => { - Cookies.set(dismissKey, true); + utils.setCookie(dismissCookie, true); + createWrapper(defaultTrackLabel); }); @@ -55,7 +57,7 @@ describe('Suggest gitlab-ci.yml Popover', () => { }); afterEach(() => { - Cookies.remove(dismissKey); + utils.removeCookie(dismissCookie); }); }); -- cgit v1.2.1