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 12:08:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-23 12:08:21 +0300
commit5b1258ee90fb29779d6c9da3f488ebff61e243a3 (patch)
treeff63f9b2f31759d2f20126219997c7230b5b822f /spec/frontend/ide
parent9cc33a92d0d4e79d7ca4a1e7b4400fbbdda33933 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ide')
-rw-r--r--spec/frontend/ide/stores/modules/terminal/actions/checks_spec.js3
-rw-r--r--spec/frontend/ide/stores/modules/terminal/actions/session_controls_spec.js12
-rw-r--r--spec/frontend/ide/stores/modules/terminal/actions/session_status_spec.js3
3 files changed, 12 insertions, 6 deletions
diff --git a/spec/frontend/ide/stores/modules/terminal/actions/checks_spec.js b/spec/frontend/ide/stores/modules/terminal/actions/checks_spec.js
index 09be1e333b3..bf57373dd03 100644
--- a/spec/frontend/ide/stores/modules/terminal/actions/checks_spec.js
+++ b/spec/frontend/ide/stores/modules/terminal/actions/checks_spec.js
@@ -11,6 +11,7 @@ import * as messages from '~/ide/stores/modules/terminal/messages';
import * as mutationTypes from '~/ide/stores/modules/terminal/mutation_types';
import axios from '~/lib/utils/axios_utils';
import {
+ HTTP_STATUS_BAD_REQUEST,
HTTP_STATUS_FORBIDDEN,
HTTP_STATUS_NOT_FOUND,
HTTP_STATUS_UNPROCESSABLE_ENTITY,
@@ -144,7 +145,7 @@ describe('IDE store terminal check actions', () => {
});
it('when error, dispatches request and receive', () => {
- mock.onPost(/.*\/ide_terminals\/check_config/).reply(400, {});
+ mock.onPost(/.*\/ide_terminals\/check_config/).reply(HTTP_STATUS_BAD_REQUEST, {});
return testAction(
actions.fetchConfigCheck,
diff --git a/spec/frontend/ide/stores/modules/terminal/actions/session_controls_spec.js b/spec/frontend/ide/stores/modules/terminal/actions/session_controls_spec.js
index 9fd5f1a38d7..3bc51e5840c 100644
--- a/spec/frontend/ide/stores/modules/terminal/actions/session_controls_spec.js
+++ b/spec/frontend/ide/stores/modules/terminal/actions/session_controls_spec.js
@@ -6,7 +6,11 @@ import { STARTING, PENDING, STOPPING, STOPPED } from '~/ide/stores/modules/termi
import * as messages from '~/ide/stores/modules/terminal/messages';
import * as mutationTypes from '~/ide/stores/modules/terminal/mutation_types';
import axios from '~/lib/utils/axios_utils';
-import { HTTP_STATUS_NOT_FOUND, HTTP_STATUS_UNPROCESSABLE_ENTITY } from '~/lib/utils/http_status';
+import {
+ HTTP_STATUS_BAD_REQUEST,
+ HTTP_STATUS_NOT_FOUND,
+ HTTP_STATUS_UNPROCESSABLE_ENTITY,
+} from '~/lib/utils/http_status';
jest.mock('~/flash');
@@ -126,7 +130,7 @@ describe('IDE store terminal session controls actions', () => {
});
it('dispatches request and receive on error', () => {
- mock.onPost(/.*\/ide_terminals/).reply(400);
+ mock.onPost(/.*\/ide_terminals/).reply(HTTP_STATUS_BAD_REQUEST);
return testAction(
actions.startSession,
@@ -191,7 +195,7 @@ describe('IDE store terminal session controls actions', () => {
});
it('dispatches request and receive on error', () => {
- mock.onPost(TEST_SESSION.cancel_path).reply(400);
+ mock.onPost(TEST_SESSION.cancel_path).reply(HTTP_STATUS_BAD_REQUEST);
const state = {
session: { cancelPath: TEST_SESSION.cancel_path },
@@ -271,7 +275,7 @@ describe('IDE store terminal session controls actions', () => {
it('dispatches request and receive on error', () => {
mock
.onPost(state.session.retryPath, { branch: rootState.currentBranchId, format: 'json' })
- .reply(400);
+ .reply(HTTP_STATUS_BAD_REQUEST);
return testAction(
actions.restartSession,
diff --git a/spec/frontend/ide/stores/modules/terminal/actions/session_status_spec.js b/spec/frontend/ide/stores/modules/terminal/actions/session_status_spec.js
index fe2328f25c2..3928f209e96 100644
--- a/spec/frontend/ide/stores/modules/terminal/actions/session_status_spec.js
+++ b/spec/frontend/ide/stores/modules/terminal/actions/session_status_spec.js
@@ -6,6 +6,7 @@ import { PENDING, RUNNING, STOPPING, STOPPED } from '~/ide/stores/modules/termin
import * as messages from '~/ide/stores/modules/terminal/messages';
import * as mutationTypes from '~/ide/stores/modules/terminal/mutation_types';
import axios from '~/lib/utils/axios_utils';
+import { HTTP_STATUS_BAD_REQUEST } from '~/lib/utils/http_status';
jest.mock('~/flash');
@@ -157,7 +158,7 @@ describe('IDE store terminal session controls actions', () => {
});
it('dispatches error on error', () => {
- mock.onGet(state.session.showPath).reply(400);
+ mock.onGet(state.session.showPath).reply(HTTP_STATUS_BAD_REQUEST);
return testAction(
actions.fetchSessionStatus,