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:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-08-19 15:10:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-19 15:10:17 +0300
commita39371aad976d8c57224f743ef1aeb465f508695 (patch)
tree69276be0bdcfcb06b3f8731e67eb0b452f3dc954 /spec/frontend/incidents
parent7866b83bf40c94e8a32d21fdea97a5e142e08f80 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/incidents')
-rw-r--r--spec/frontend/incidents/components/incidents_list_spec.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/frontend/incidents/components/incidents_list_spec.js b/spec/frontend/incidents/components/incidents_list_spec.js
index 34dc61772d4..33ddd06d6d9 100644
--- a/spec/frontend/incidents/components/incidents_list_spec.js
+++ b/spec/frontend/incidents/components/incidents_list_spec.js
@@ -9,6 +9,7 @@ import {
GlTab,
GlTabs,
GlBadge,
+ GlEmptyState,
} from '@gitlab/ui';
import { visitUrl, joinPaths, mergeUrlParams } from '~/lib/utils/url_utility';
import IncidentsList from '~/incidents/components/incidents_list.vue';
@@ -25,6 +26,7 @@ jest.mock('~/lib/utils/url_utility', () => ({
describe('Incidents List', () => {
let wrapper;
const newIssuePath = 'namespace/project/-/issues/new';
+ const emptyListSvgPath = '/assets/empty.svg';
const incidentTemplateName = 'incident';
const incidentType = 'incident';
const incidentsCount = {
@@ -48,6 +50,7 @@ describe('Incidents List', () => {
const findStatusFilterTabs = () => wrapper.findAll(GlTab);
const findStatusFilterBadge = () => wrapper.findAll(GlBadge);
const findStatusTabs = () => wrapper.find(GlTabs);
+ const findEmptyState = () => wrapper.find(GlEmptyState);
function mountComponent({ data = { incidents: [], incidentsCount: {} }, loading = false }) {
wrapper = mount(IncidentsList, {
@@ -70,6 +73,7 @@ describe('Incidents List', () => {
incidentType,
issuePath: '/project/isssues',
publishedAvailable: true,
+ emptyListSvgPath,
},
stubs: {
GlButton: true,
@@ -97,7 +101,7 @@ describe('Incidents List', () => {
data: { incidents: { list: [] }, incidentsCount: {} },
loading: false,
});
- expect(findTable().text()).toContain(I18N.noIncidents);
+ expect(findEmptyState().exists()).toBe(true);
});
it('shows error state', () => {
@@ -164,7 +168,7 @@ describe('Incidents List', () => {
describe('Create Incident', () => {
beforeEach(() => {
mountComponent({
- data: { incidents: { list: [] }, incidentsCount: {} },
+ data: { incidents: { list: mockIncidents }, incidentsCount: {} },
loading: false,
});
});