From 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 18 Feb 2021 10:34:06 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-9-stable-ee --- spec/frontend/ide/lib/create_diff_spec.js | 2 +- spec/frontend/ide/lib/create_file_diff_spec.js | 2 +- spec/frontend/ide/lib/decorations/controller_spec.js | 6 +++--- spec/frontend/ide/lib/diff/controller_spec.js | 2 +- spec/frontend/ide/lib/editor_spec.js | 5 +++-- spec/frontend/ide/lib/languages/hcl_spec.js | 2 +- spec/frontend/ide/lib/languages/vue_spec.js | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) (limited to 'spec/frontend/ide/lib') diff --git a/spec/frontend/ide/lib/create_diff_spec.js b/spec/frontend/ide/lib/create_diff_spec.js index 76494f9af1b..b33fa599d1c 100644 --- a/spec/frontend/ide/lib/create_diff_spec.js +++ b/spec/frontend/ide/lib/create_diff_spec.js @@ -1,6 +1,6 @@ +import { commitActionTypes } from '~/ide/constants'; import createDiff from '~/ide/lib/create_diff'; import createFileDiff from '~/ide/lib/create_file_diff'; -import { commitActionTypes } from '~/ide/constants'; import { createNewFile, createUpdatedFile, diff --git a/spec/frontend/ide/lib/create_file_diff_spec.js b/spec/frontend/ide/lib/create_file_diff_spec.js index 294f0a926aa..646304c431b 100644 --- a/spec/frontend/ide/lib/create_file_diff_spec.js +++ b/spec/frontend/ide/lib/create_file_diff_spec.js @@ -1,5 +1,5 @@ -import createFileDiff from '~/ide/lib/create_file_diff'; import { commitActionTypes } from '~/ide/constants'; +import createFileDiff from '~/ide/lib/create_file_diff'; import { createUpdatedFile, createNewFile, diff --git a/spec/frontend/ide/lib/decorations/controller_spec.js b/spec/frontend/ide/lib/decorations/controller_spec.js index e9b7faaadfe..b513f1b2eba 100644 --- a/spec/frontend/ide/lib/decorations/controller_spec.js +++ b/spec/frontend/ide/lib/decorations/controller_spec.js @@ -1,8 +1,8 @@ -import Editor from '~/ide/lib/editor'; -import DecorationsController from '~/ide/lib/decorations/controller'; import Model from '~/ide/lib/common/model'; -import { file } from '../../helpers'; +import DecorationsController from '~/ide/lib/decorations/controller'; +import Editor from '~/ide/lib/editor'; import { createStore } from '~/ide/stores'; +import { file } from '../../helpers'; describe('Multi-file editor library decorations controller', () => { let editorInstance; diff --git a/spec/frontend/ide/lib/diff/controller_spec.js b/spec/frontend/ide/lib/diff/controller_spec.js index 57c134620c0..5f1344f1ea2 100644 --- a/spec/frontend/ide/lib/diff/controller_spec.js +++ b/spec/frontend/ide/lib/diff/controller_spec.js @@ -1,9 +1,9 @@ import { Range } from 'monaco-editor'; -import Editor from '~/ide/lib/editor'; import ModelManager from '~/ide/lib/common/model_manager'; import DecorationsController from '~/ide/lib/decorations/controller'; import DirtyDiffController, { getDiffChangeType, getDecorator } from '~/ide/lib/diff/controller'; import { computeDiff } from '~/ide/lib/diff/diff'; +import Editor from '~/ide/lib/editor'; import { createStore } from '~/ide/stores'; import { file } from '../../helpers'; diff --git a/spec/frontend/ide/lib/editor_spec.js b/spec/frontend/ide/lib/editor_spec.js index 12779c61dc3..c21a7edb2da 100644 --- a/spec/frontend/ide/lib/editor_spec.js +++ b/spec/frontend/ide/lib/editor_spec.js @@ -4,9 +4,10 @@ import { Range, Selection, } from 'monaco-editor'; +import { EDITOR_TYPE_DIFF } from '~/editor/constants'; import Editor from '~/ide/lib/editor'; -import { createStore } from '~/ide/stores'; import { defaultEditorOptions } from '~/ide/lib/editor_options'; +import { createStore } from '~/ide/stores'; import { file } from '../helpers'; describe('Multi-file editor library', () => { @@ -125,7 +126,7 @@ describe('Multi-file editor library', () => { }); it('sets original & modified when diff editor', () => { - jest.spyOn(instance.instance, 'getEditorType').mockReturnValue('vs.editor.IDiffEditor'); + jest.spyOn(instance.instance, 'getEditorType').mockReturnValue(EDITOR_TYPE_DIFF); jest.spyOn(instance.instance, 'setModel').mockImplementation(() => {}); instance.attachModel(model); diff --git a/spec/frontend/ide/lib/languages/hcl_spec.js b/spec/frontend/ide/lib/languages/hcl_spec.js index c6ebad6a4f4..948c44d4543 100644 --- a/spec/frontend/ide/lib/languages/hcl_spec.js +++ b/spec/frontend/ide/lib/languages/hcl_spec.js @@ -1,6 +1,6 @@ import { editor } from 'monaco-editor'; -import { registerLanguages } from '~/ide/utils'; import hcl from '~/ide/lib/languages/hcl'; +import { registerLanguages } from '~/ide/utils'; describe('tokenization for .tf files', () => { beforeEach(() => { diff --git a/spec/frontend/ide/lib/languages/vue_spec.js b/spec/frontend/ide/lib/languages/vue_spec.js index ba5c31bb101..e3a67ccd47f 100644 --- a/spec/frontend/ide/lib/languages/vue_spec.js +++ b/spec/frontend/ide/lib/languages/vue_spec.js @@ -1,6 +1,6 @@ import { editor } from 'monaco-editor'; -import { registerLanguages } from '~/ide/utils'; import vue from '~/ide/lib/languages/vue'; +import { registerLanguages } from '~/ide/utils'; // This file only tests syntax specific to vue. This does not test existing syntaxes // of html, javascript, css and handlebars, which vue files extend. -- cgit v1.2.1