Commit 5e025655 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '329206-fix-test-report' into 'master'

Always fetch pipeline test report

See merge request gitlab-org/gitlab!60416
parents 8ff4aa03 8f8b7297
...@@ -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