Commit 8f8b7297 authored by Scott Hampton's avatar Scott Hampton

Always fetch pipeline test report

Reverting a change where we prematurely
checked if a pipeline had a test report before
we fetched the test summary. This was not
reliable when a pipeline was still running, but
tests should still be able to be seen.

Changelog: fixed
parent 0928d733
......@@ -15,11 +15,6 @@ export default {
TestSummary,
TestSummaryTable,
},
inject: {
hasTestReport: {
default: false,
},
},
computed: {
...mapState(['isLoading', 'selectedSuiteIndex', 'testReports']),
...mapGetters(['getSelectedSuite']),
......@@ -32,9 +27,7 @@ export default {
},
},
created() {
if (this.hasTestReport) {
this.fetchSummary();
}
this.fetchSummary();
},
methods: {
...mapActions([
......
---
title: Fix bug where test report was not showing while pipeline was running
merge_request: 60416
author:
type: fixed
......@@ -31,7 +31,7 @@ describe('Test reports app', () => {
removeSelectedSuiteIndex: jest.fn(),
};
const createComponent = ({ state = {}, hasTestReport = true } = {}) => {
const createComponent = ({ state = {} } = {}) => {
store = new Vuex.Store({
state: {
isLoading: false,
......@@ -47,9 +47,6 @@ describe('Test reports app', () => {
shallowMount(TestReports, {
store,
localVue,
provide: {
hasTestReport,
},
}),
);
};
......@@ -64,12 +61,6 @@ describe('Test reports app', () => {
expect(actionSpies.fetchSummary).toHaveBeenCalled();
});
it('should not call fetchSummary when pipeline does not have test report', () => {
createComponent({ state: {}, hasTestReport: false });
expect(actionSpies.fetchSummary).not.toHaveBeenCalled();
});
});
describe('when loading', () => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment