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:
Diffstat (limited to 'spec/frontend_integration/ide/helpers/start.js')
-rw-r--r--spec/frontend_integration/ide/helpers/start.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/frontend_integration/ide/helpers/start.js b/spec/frontend_integration/ide/helpers/start.js
index 43a996286e7..173a9610c84 100644
--- a/spec/frontend_integration/ide/helpers/start.js
+++ b/spec/frontend_integration/ide/helpers/start.js
@@ -1,14 +1,15 @@
import { TEST_HOST } from 'helpers/test_constants';
-import extendStore from '~/ide/stores/extend';
-import { IDE_DATASET } from './mock_data';
import { initIde } from '~/ide';
import Editor from '~/ide/lib/editor';
+import extendStore from '~/ide/stores/extend';
+import { IDE_DATASET } from './mock_data';
+
+export default (container, { isRepoEmpty = false, path = '', mrId = '' } = {}) => {
+ const projectName = isRepoEmpty ? 'lorem-ipsum-empty' : 'lorem-ipsum';
+ const pathSuffix = mrId ? `merge_requests/${mrId}` : `tree/master/-/${path}`;
-export default (container, { isRepoEmpty = false, path = '' } = {}) => {
global.jsdom.reconfigure({
- url: `${TEST_HOST}/-/ide/project/gitlab-test/lorem-ipsum${
- isRepoEmpty ? '-empty' : ''
- }/tree/master/-/${path}`,
+ url: `${TEST_HOST}/-/ide/project/gitlab-test/${projectName}/${pathSuffix}`,
});
const el = document.createElement('div');