diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/frontend/editor/source_editor_spec.js | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/frontend/editor/source_editor_spec.js')
-rw-r--r-- | spec/frontend/editor/source_editor_spec.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/frontend/editor/source_editor_spec.js b/spec/frontend/editor/source_editor_spec.js index 049cab3a83b..b3d914e6755 100644 --- a/spec/frontend/editor/source_editor_spec.js +++ b/spec/frontend/editor/source_editor_spec.js @@ -1,4 +1,5 @@ import { editor as monacoEditor, languages as monacoLanguages } from 'monaco-editor'; +import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; import { SOURCE_EDITOR_INSTANCE_ERROR_NO_EL, URI_PREFIX, @@ -33,7 +34,7 @@ describe('Base editor', () => { const blobGlobalId = 'snippet_777'; beforeEach(() => { - setFixtures('<div id="editor" data-editor-loading></div>'); + setHTMLFixture('<div id="editor" data-editor-loading></div>'); editorEl = document.getElementById('editor'); defaultArguments = { el: editorEl, blobPath, blobContent, blobGlobalId }; editor = new SourceEditor(); @@ -45,6 +46,8 @@ describe('Base editor', () => { monacoEditor.getModels().forEach((model) => { model.dispose(); }); + + resetHTMLFixture(); }); const uriFilePath = joinPaths('/', URI_PREFIX, blobGlobalId, blobPath); @@ -244,7 +247,7 @@ describe('Base editor', () => { const readOnlyIndex = '78'; // readOnly option has the internal index of 78 in the editor's options beforeEach(() => { - setFixtures('<div id="editor1"></div><div id="editor2"></div>'); + setHTMLFixture('<div id="editor1"></div><div id="editor2"></div>'); editorEl1 = document.getElementById('editor1'); editorEl2 = document.getElementById('editor2'); inst1Args = { @@ -262,6 +265,7 @@ describe('Base editor', () => { afterEach(() => { editor.dispose(); + resetHTMLFixture(); }); it('can initialize several instances of the same editor', () => { |