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/content_editor/components/content_editor_error_spec.js')
-rw-r--r--spec/frontend/content_editor/components/content_editor_error_spec.js54
1 files changed, 0 insertions, 54 deletions
diff --git a/spec/frontend/content_editor/components/content_editor_error_spec.js b/spec/frontend/content_editor/components/content_editor_error_spec.js
deleted file mode 100644
index 8723fb5a338..00000000000
--- a/spec/frontend/content_editor/components/content_editor_error_spec.js
+++ /dev/null
@@ -1,54 +0,0 @@
-import { GlAlert } from '@gitlab/ui';
-import { nextTick } from 'vue';
-import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
-import ContentEditorError from '~/content_editor/components/content_editor_error.vue';
-import EditorStateObserver from '~/content_editor/components/editor_state_observer.vue';
-import { createTestEditor, emitEditorEvent } from '../test_utils';
-
-describe('content_editor/components/content_editor_error', () => {
- let wrapper;
- let tiptapEditor;
-
- const findErrorAlert = () => wrapper.findComponent(GlAlert);
-
- const createWrapper = async () => {
- tiptapEditor = createTestEditor();
-
- wrapper = shallowMountExtended(ContentEditorError, {
- provide: {
- tiptapEditor,
- },
- stubs: {
- EditorStateObserver,
- },
- });
- };
-
- afterEach(() => {
- wrapper.destroy();
- });
-
- it('renders error when content editor emits an error event', async () => {
- const error = 'error message';
-
- createWrapper();
-
- await emitEditorEvent({ tiptapEditor, event: 'error', params: { error } });
-
- expect(findErrorAlert().text()).toBe(error);
- });
-
- it('allows dismissing the error', async () => {
- const error = 'error message';
-
- createWrapper();
-
- await emitEditorEvent({ tiptapEditor, event: 'error', params: { error } });
-
- findErrorAlert().vm.$emit('dismiss');
-
- await nextTick();
-
- expect(findErrorAlert().exists()).toBe(false);
- });
-});