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-11 15:07:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-11 15:07:18 +0300
commitfc0afaf7da2156e91e615662272811eee56d034a (patch)
treec6199a554acff7bdd34a7b6d7edf673807062212 /spec/frontend/notifications
parente6b6fb602889e43e7a8dde760e01d0a3b2147c54 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/notifications')
-rw-r--r--spec/frontend/notifications/components/custom_notifications_modal_spec.js10
-rw-r--r--spec/frontend/notifications/components/notifications_dropdown_spec.js8
2 files changed, 9 insertions, 9 deletions
diff --git a/spec/frontend/notifications/components/custom_notifications_modal_spec.js b/spec/frontend/notifications/components/custom_notifications_modal_spec.js
index a787c9ebac0..70749557e61 100644
--- a/spec/frontend/notifications/components/custom_notifications_modal_spec.js
+++ b/spec/frontend/notifications/components/custom_notifications_modal_spec.js
@@ -5,7 +5,7 @@ import MockAdapter from 'axios-mock-adapter';
import { nextTick } from 'vue';
import { extendedWrapper } from 'helpers/vue_test_utils_helper';
import waitForPromises from 'helpers/wait_for_promises';
-import httpStatus, { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status';
+import { HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK } from '~/lib/utils/http_status';
import CustomNotificationsModal from '~/notifications/components/custom_notifications_modal.vue';
import { i18n } from '~/notifications/constants';
@@ -138,7 +138,7 @@ describe('CustomNotificationsModal', () => {
mockAxios
.onGet(endpointUrl)
- .reply(httpStatus.OK, mockNotificationSettingsResponses.default);
+ .reply(HTTP_STATUS_OK, mockNotificationSettingsResponses.default);
wrapper = createComponent({ injectedProperties });
@@ -155,7 +155,7 @@ describe('CustomNotificationsModal', () => {
mockAxios
.onGet(endpointUrl)
- .reply(httpStatus.OK, mockNotificationSettingsResponses.default);
+ .reply(HTTP_STATUS_OK, mockNotificationSettingsResponses.default);
wrapper = createComponent();
@@ -201,11 +201,11 @@ describe('CustomNotificationsModal', () => {
async ({ projectId, groupId, endpointUrl }) => {
mockAxios
.onGet(endpointUrl)
- .reply(httpStatus.OK, mockNotificationSettingsResponses.default);
+ .reply(HTTP_STATUS_OK, mockNotificationSettingsResponses.default);
mockAxios
.onPut(endpointUrl)
- .reply(httpStatus.OK, mockNotificationSettingsResponses.updated);
+ .reply(HTTP_STATUS_OK, mockNotificationSettingsResponses.updated);
const injectedProperties = {
projectId,
diff --git a/spec/frontend/notifications/components/notifications_dropdown_spec.js b/spec/frontend/notifications/components/notifications_dropdown_spec.js
index 9eb29ce6ff6..0f13de0e6d8 100644
--- a/spec/frontend/notifications/components/notifications_dropdown_spec.js
+++ b/spec/frontend/notifications/components/notifications_dropdown_spec.js
@@ -4,7 +4,7 @@ import axios from 'axios';
import MockAdapter from 'axios-mock-adapter';
import { createMockDirective, getBinding } from 'helpers/vue_mock_directive';
import waitForPromises from 'helpers/wait_for_promises';
-import httpStatus, { HTTP_STATUS_NOT_FOUND } from '~/lib/utils/http_status';
+import { HTTP_STATUS_NOT_FOUND, HTTP_STATUS_OK } from '~/lib/utils/http_status';
import CustomNotificationsModal from '~/notifications/components/custom_notifications_modal.vue';
import NotificationsDropdown from '~/notifications/components/notifications_dropdown.vue';
import NotificationsDropdownItem from '~/notifications/components/notifications_dropdown_item.vue';
@@ -98,7 +98,7 @@ describe('NotificationsDropdown', () => {
it('opens the modal when the user clicks the button', async () => {
jest.spyOn(axios, 'put');
- mockAxios.onPut('/api/v4/notification_settings').reply(httpStatus.OK, {});
+ mockAxios.onPut('/api/v4/notification_settings').reply(HTTP_STATUS_OK, {});
wrapper = createComponent({
initialNotificationLevel: 'custom',
@@ -233,7 +233,7 @@ describe('NotificationsDropdown', () => {
);
it('updates the selectedNotificationLevel and marks the item with a checkmark', async () => {
- mockAxios.onPut('/api/v4/notification_settings').reply(httpStatus.OK, {});
+ mockAxios.onPut('/api/v4/notification_settings').reply(HTTP_STATUS_OK, {});
wrapper = createComponent();
const dropdownItem = findDropdownItemAt(1);
@@ -257,7 +257,7 @@ describe('NotificationsDropdown', () => {
});
it('opens the modal when the user clicks on the "Custom" dropdown item', async () => {
- mockAxios.onPut('/api/v4/notification_settings').reply(httpStatus.OK, {});
+ mockAxios.onPut('/api/v4/notification_settings').reply(HTTP_STATUS_OK, {});
wrapper = createComponent();
await clickDropdownItemAt(5);