diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/frontend/pipelines/test_reports/stores | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/frontend/pipelines/test_reports/stores')
-rw-r--r-- | spec/frontend/pipelines/test_reports/stores/actions_spec.js | 22 | ||||
-rw-r--r-- | spec/frontend/pipelines/test_reports/stores/getters_spec.js | 4 |
2 files changed, 13 insertions, 13 deletions
diff --git a/spec/frontend/pipelines/test_reports/stores/actions_spec.js b/spec/frontend/pipelines/test_reports/stores/actions_spec.js index 1809f15a6e6..f7ff36c0a46 100644 --- a/spec/frontend/pipelines/test_reports/stores/actions_spec.js +++ b/spec/frontend/pipelines/test_reports/stores/actions_spec.js @@ -1,10 +1,10 @@ import MockAdapter from 'axios-mock-adapter'; import { getJSONFixture } from 'helpers/fixtures'; +import { TEST_HOST } from 'helpers/test_constants'; +import testAction from 'helpers/vuex_action_helper'; import axios from '~/lib/utils/axios_utils'; import * as actions from '~/pipelines/stores/test_reports/actions'; import * as types from '~/pipelines/stores/test_reports/mutation_types'; -import { TEST_HOST } from '../../../helpers/test_constants'; -import testAction from '../../../helpers/vuex_action_helper'; import { deprecatedCreateFlash as createFlash } from '~/flash'; jest.mock('~/flash.js'); @@ -39,7 +39,7 @@ describe('Actions TestReports Store', () => { mock.onGet(summaryEndpoint).replyOnce(200, summary, {}); }); - it('sets testReports and shows tests', done => { + it('sets testReports and shows tests', (done) => { testAction( actions.fetchSummary, null, @@ -50,7 +50,7 @@ describe('Actions TestReports Store', () => { ); }); - it('should create flash on API error', done => { + it('should create flash on API error', (done) => { testAction( actions.fetchSummary, null, @@ -75,7 +75,7 @@ describe('Actions TestReports Store', () => { .replyOnce(200, testReports.test_suites[0], {}); }); - it('sets test suite and shows tests', done => { + it('sets test suite and shows tests', (done) => { const suite = testReports.test_suites[0]; const index = 0; @@ -89,7 +89,7 @@ describe('Actions TestReports Store', () => { ); }); - it('should create flash on API error', done => { + it('should create flash on API error', (done) => { const index = 0; testAction( @@ -106,7 +106,7 @@ describe('Actions TestReports Store', () => { }); describe('when we already have the suite data', () => { - it('should not fetch suite', done => { + it('should not fetch suite', (done) => { const index = 0; testReports.test_suites[0].hasFullSuite = true; @@ -116,7 +116,7 @@ describe('Actions TestReports Store', () => { }); describe('set selected suite index', () => { - it('sets selectedSuiteIndex', done => { + it('sets selectedSuiteIndex', (done) => { const selectedSuiteIndex = 0; testAction( @@ -131,7 +131,7 @@ describe('Actions TestReports Store', () => { }); describe('remove selected suite index', () => { - it('sets selectedSuiteIndex to null', done => { + it('sets selectedSuiteIndex to null', (done) => { testAction( actions.removeSelectedSuiteIndex, {}, @@ -144,11 +144,11 @@ describe('Actions TestReports Store', () => { }); describe('toggles loading', () => { - it('sets isLoading to true', done => { + it('sets isLoading to true', (done) => { testAction(actions.toggleLoading, {}, state, [{ type: types.TOGGLE_LOADING }], [], done); }); - it('toggles isLoading to false', done => { + it('toggles isLoading to false', (done) => { testAction( actions.toggleLoading, {}, diff --git a/spec/frontend/pipelines/test_reports/stores/getters_spec.js b/spec/frontend/pipelines/test_reports/stores/getters_spec.js index 8cef499fdb9..7382a6beefa 100644 --- a/spec/frontend/pipelines/test_reports/stores/getters_spec.js +++ b/spec/frontend/pipelines/test_reports/stores/getters_spec.js @@ -40,7 +40,7 @@ describe('Getters TestReports Store', () => { setupState(); const suites = getters.getTestSuites(state); - const expected = testReports.test_suites.map(x => ({ + const expected = testReports.test_suites.map((x) => ({ ...x, formattedTime: formattedTime(x.total_time), })); @@ -72,7 +72,7 @@ describe('Getters TestReports Store', () => { const cases = getters.getSuiteTests(state); const expected = testReports.test_suites[0].test_cases - .map(x => ({ + .map((x) => ({ ...x, formattedTime: formattedTime(x.execution_time), icon: iconForTestStatus(x.status), |