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_yaml_ext_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_yaml_ext_spec.js')
-rw-r--r-- | spec/frontend/editor/source_editor_yaml_ext_spec.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/frontend/editor/source_editor_yaml_ext_spec.js b/spec/frontend/editor/source_editor_yaml_ext_spec.js index b603b0e3a98..14ec7f8b93f 100644 --- a/spec/frontend/editor/source_editor_yaml_ext_spec.js +++ b/spec/frontend/editor/source_editor_yaml_ext_spec.js @@ -1,4 +1,5 @@ import { Document } from 'yaml'; +import { setHTMLFixture, resetHTMLFixture } from 'helpers/fixtures'; import SourceEditor from '~/editor/source_editor'; import { YamlEditorExtension } from '~/editor/extensions/source_editor_yaml_ext'; import { SourceEditorExtension } from '~/editor/extensions/source_editor_extension_base'; @@ -8,7 +9,7 @@ let baseExtension; let yamlExtension; const getEditorInstance = (editorInstanceOptions = {}) => { - setFixtures('<div id="editor"></div>'); + setHTMLFixture('<div id="editor"></div>'); return new SourceEditor().createInstance({ el: document.getElementById('editor'), blobPath: '.gitlab-ci.yml', @@ -18,7 +19,7 @@ const getEditorInstance = (editorInstanceOptions = {}) => { }; const getEditorInstanceWithExtension = (extensionOptions = {}, editorInstanceOptions = {}) => { - setFixtures('<div id="editor"></div>'); + setHTMLFixture('<div id="editor"></div>'); const instance = getEditorInstance(editorInstanceOptions); [baseExtension, yamlExtension] = instance.use([ { definition: SourceEditorExtension }, @@ -35,6 +36,10 @@ const getEditorInstanceWithExtension = (extensionOptions = {}, editorInstanceOpt }; describe('YamlCreatorExtension', () => { + afterEach(() => { + resetHTMLFixture(); + }); + describe('constructor', () => { it('saves setupOptions options on the extension, but does not expose those to instance', () => { const highlightPath = 'foo'; |