Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-23 21:11:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-23 21:11:12 +0300
commitcfc8827f6bf9573b02401b1908728da3aed96698 (patch)
tree30180d04062db3e56d1cc3772888ff4f15e56c10 /spec/frontend/persistent_user_callout_spec.js
parenta8b96c3072b3bd4d45e6364931042b350bf7fa2e (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/persistent_user_callout_spec.js')
-rw-r--r--spec/frontend/persistent_user_callout_spec.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/frontend/persistent_user_callout_spec.js b/spec/frontend/persistent_user_callout_spec.js
index c9574208900..cf97d69e1c1 100644
--- a/spec/frontend/persistent_user_callout_spec.js
+++ b/spec/frontend/persistent_user_callout_spec.js
@@ -3,6 +3,7 @@ import { useMockLocationHelper } from 'helpers/mock_window_location_helper';
import waitForPromises from 'helpers/wait_for_promises';
import { createAlert } from '~/flash';
import axios from '~/lib/utils/axios_utils';
+import { HTTP_STATUS_OK } from '~/lib/utils/http_status';
import PersistentUserCallout from '~/persistent_user_callout';
jest.mock('~/flash');
@@ -88,7 +89,7 @@ describe('PersistentUserCallout', () => {
${'primary'}
${'secondary'}
`('POSTs endpoint and removes container when clicking $button close', async ({ button }) => {
- mockAxios.onPost(dismissEndpoint).replyOnce(200);
+ mockAxios.onPost(dismissEndpoint).replyOnce(HTTP_STATUS_OK);
buttons[button].click();
@@ -140,7 +141,7 @@ describe('PersistentUserCallout', () => {
it('defers loading of a link until callout is dismissed', async () => {
const { href, target } = deferredLink;
- mockAxios.onPost(dismissEndpoint).replyOnce(200);
+ mockAxios.onPost(dismissEndpoint).replyOnce(HTTP_STATUS_OK);
deferredLink.click();
@@ -161,7 +162,7 @@ describe('PersistentUserCallout', () => {
});
it('does not follow link when notification is closed', async () => {
- mockAxios.onPost(dismissEndpoint).replyOnce(200);
+ mockAxios.onPost(dismissEndpoint).replyOnce(HTTP_STATUS_OK);
button.click();
@@ -195,7 +196,7 @@ describe('PersistentUserCallout', () => {
it('uses a link to trigger callout and defers following until callout is finished', async () => {
const { href } = link;
- mockAxios.onPost(dismissEndpoint).replyOnce(200);
+ mockAxios.onPost(dismissEndpoint).replyOnce(HTTP_STATUS_OK);
link.click();