Welcome to mirror list, hosted at ThFree Co, Russian Federation.

loading_indicator_spec.js « components « content_editor « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0065103d01bf8c8f896d8ab86ccc24009bd67038 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { GlLoadingIcon } from '@gitlab/ui';
import { shallowMountExtended } from 'helpers/vue_test_utils_helper';
import LoadingIndicator from '~/content_editor/components/loading_indicator.vue';

describe('content_editor/components/loading_indicator', () => {
  let wrapper;

  const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);

  const createWrapper = () => {
    wrapper = shallowMountExtended(LoadingIndicator);
  };

  afterEach(() => {
    wrapper.destroy();
  });

  describe('when loading content', () => {
    beforeEach(() => {
      createWrapper();
    });

    it('displays loading indicator', () => {
      expect(findLoadingIcon().exists()).toBe(true);
    });
  });
});