diff options
Diffstat (limited to 'spec/frontend/reports/components')
6 files changed, 12 insertions, 13 deletions
diff --git a/spec/frontend/reports/components/grouped_test_reports_app_spec.js b/spec/frontend/reports/components/grouped_test_reports_app_spec.js index 492192988fb..ed261ed12c0 100644 --- a/spec/frontend/reports/components/grouped_test_reports_app_spec.js +++ b/spec/frontend/reports/components/grouped_test_reports_app_spec.js @@ -5,11 +5,11 @@ import GroupedTestReportsApp from '~/reports/components/grouped_test_reports_app import { getStoreConfig } from '~/reports/store'; import { failedReport } from '../mock_data/mock_data'; -import successTestReports from '../mock_data/no_failures_report.json'; +import mixedResultsTestReports from '../mock_data/new_and_fixed_failures_report.json'; +import newErrorsTestReports from '../mock_data/new_errors_report.json'; import newFailedTestReports from '../mock_data/new_failures_report.json'; +import successTestReports from '../mock_data/no_failures_report.json'; import recentFailuresTestReports from '../mock_data/recent_failures_report.json'; -import newErrorsTestReports from '../mock_data/new_errors_report.json'; -import mixedResultsTestReports from '../mock_data/new_and_fixed_failures_report.json'; import resolvedFailures from '../mock_data/resolved_failures.json'; const localVue = createLocalVue(); @@ -18,12 +18,11 @@ localVue.use(Vuex); describe('Grouped test reports app', () => { const endpoint = 'endpoint.json'; const pipelinePath = '/path/to/pipeline'; - const Component = localVue.extend(GroupedTestReportsApp); let wrapper; let mockStore; const mountComponent = ({ props = { pipelinePath } } = {}) => { - wrapper = mount(Component, { + wrapper = mount(GroupedTestReportsApp, { store: mockStore, localVue, propsData: { diff --git a/spec/frontend/reports/components/modal_spec.js b/spec/frontend/reports/components/modal_spec.js index 39b84d1ee05..d47bb964e8a 100644 --- a/spec/frontend/reports/components/modal_spec.js +++ b/spec/frontend/reports/components/modal_spec.js @@ -2,9 +2,9 @@ import { GlLink, GlSprintf } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import { extendedWrapper } from 'helpers/vue_test_utils_helper'; -import CodeBlock from '~/vue_shared/components/code_block.vue'; import ReportsModal from '~/reports/components/modal.vue'; import state from '~/reports/store/state'; +import CodeBlock from '~/vue_shared/components/code_block.vue'; const StubbedGlModal = { template: '<div><slot></slot></div>', name: 'GlModal', props: ['title'] }; diff --git a/spec/frontend/reports/components/report_item_spec.js b/spec/frontend/reports/components/report_item_spec.js index 6aac07984e3..a7243c5377b 100644 --- a/spec/frontend/reports/components/report_item_spec.js +++ b/spec/frontend/reports/components/report_item_spec.js @@ -1,8 +1,8 @@ import { shallowMount } from '@vue/test-utils'; -import { STATUS_SUCCESS } from '~/reports/constants'; -import ReportItem from '~/reports/components/report_item.vue'; -import IssueStatusIcon from '~/reports/components/issue_status_icon.vue'; import { componentNames } from '~/reports/components/issue_body'; +import IssueStatusIcon from '~/reports/components/issue_status_icon.vue'; +import ReportItem from '~/reports/components/report_item.vue'; +import { STATUS_SUCCESS } from '~/reports/constants'; describe('ReportItem', () => { describe('showReportSectionStatusIcon', () => { diff --git a/spec/frontend/reports/components/report_section_spec.js b/spec/frontend/reports/components/report_section_spec.js index c3219b34057..c9bf3185f8f 100644 --- a/spec/frontend/reports/components/report_section_spec.js +++ b/spec/frontend/reports/components/report_section_spec.js @@ -1,5 +1,5 @@ -import Vue from 'vue'; import { shallowMount } from '@vue/test-utils'; +import Vue from 'vue'; import mountComponent, { mountComponentWithSlots } from 'helpers/vue_mount_component_helper'; import reportSection from '~/reports/components/report_section.vue'; diff --git a/spec/frontend/reports/components/summary_row_spec.js b/spec/frontend/reports/components/summary_row_spec.js index 85c68ed069b..bdd6de1e0be 100644 --- a/spec/frontend/reports/components/summary_row_spec.js +++ b/spec/frontend/reports/components/summary_row_spec.js @@ -32,7 +32,7 @@ describe('Summary row', () => { it('renders provided summary', () => { createComponent(); - expect(findSummary().text()).toEqual(props.summary); + expect(findSummary().text()).toContain(props.summary); }); it('renders provided icon', () => { @@ -48,7 +48,7 @@ describe('Summary row', () => { createComponent({ slots: { summary: summarySlotContent } }); expect(wrapper.text()).not.toContain(props.summary); - expect(findSummary().text()).toEqual(summarySlotContent); + expect(findSummary().text()).toContain(summarySlotContent); }); }); }); diff --git a/spec/frontend/reports/components/test_issue_body_spec.js b/spec/frontend/reports/components/test_issue_body_spec.js index c13a3599fef..2843620a18d 100644 --- a/spec/frontend/reports/components/test_issue_body_spec.js +++ b/spec/frontend/reports/components/test_issue_body_spec.js @@ -1,6 +1,6 @@ import Vue from 'vue'; -import { mountComponentWithStore } from 'helpers/vue_mount_component_helper'; import { trimText } from 'helpers/text_helper'; +import { mountComponentWithStore } from 'helpers/vue_mount_component_helper'; import component from '~/reports/components/test_issue_body.vue'; import createStore from '~/reports/store'; import { issue } from '../mock_data/mock_data'; |