Improve test coverage for the test reports feature
Summary
During the review of !140123 (merged), Miguel commented on a missing test gap that requires changes to how we do mocks for the specs of the test report.
Improvements
The new tests should check that the actions and URL utilities perform their correspondent actions with matching parameters, e.g.
expect(actionSpies.setSelectedSuiteIndex).toHaveBeenCalledWith(0);
expect(actionSpies.fetchTestSuite).toHaveBeenCalled(0);
expect(updateHistory).toHaveBeenCalledWith({
replace: true,
title: '',
url: 'http://test.host/?job_name=test',
});
Involved components
spec/frontend/ci/pipeline_details/test_reports/test_reports_spec.js