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 { ...@@ -15,11 +15,6 @@ export default {
TestSummary, TestSummary,
TestSummaryTable, TestSummaryTable,
}, },
inject: {
hasTestReport: {
default: false,
},
},
computed: { computed: {
...mapState(['isLoading', 'selectedSuiteIndex', 'testReports']), ...mapState(['isLoading', 'selectedSuiteIndex', 'testReports']),
...mapGetters(['getSelectedSuite']), ...mapGetters(['getSelectedSuite']),
...@@ -32,9 +27,7 @@ export default { ...@@ -32,9 +27,7 @@ export default {
}, },
}, },
created() { created() {
if (this.hasTestReport) {
this.fetchSummary(); this.fetchSummary();
}
}, },
methods: { methods: {
...mapActions([ ...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', () => { ...@@ -31,7 +31,7 @@ describe('Test reports app', () => {
removeSelectedSuiteIndex: jest.fn(), removeSelectedSuiteIndex: jest.fn(),
}; };
const createComponent = ({ state = {}, hasTestReport = true } = {}) => { const createComponent = ({ state = {} } = {}) => {
store = new Vuex.Store({ store = new Vuex.Store({
state: { state: {
isLoading: false, isLoading: false,
...@@ -47,9 +47,6 @@ describe('Test reports app', () => { ...@@ -47,9 +47,6 @@ describe('Test reports app', () => {
shallowMount(TestReports, { shallowMount(TestReports, {
store, store,
localVue, localVue,
provide: {
hasTestReport,
},
}), }),
); );
}; };
...@@ -64,12 +61,6 @@ describe('Test reports app', () => { ...@@ -64,12 +61,6 @@ describe('Test reports app', () => {
expect(actionSpies.fetchSummary).toHaveBeenCalled(); 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', () => { 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