Code cleanup of headerActions and tests

* Remove headerAction getter from job getters
* Remove prop from being passed into header_ci_component
* Remove no longer needed tests
This commit is contained in:
Fernando Arias 2019-01-11 11:14:53 -05:00
parent f3465c7293
commit a536fe2850
3 changed files with 0 additions and 20 deletions

View file

@ -80,7 +80,6 @@ export default {
'hasError',
]),
...mapGetters([
'headerActions',
'headerTime',
'shouldRenderCalloutMessage',
'shouldRenderTriggeredLabel',
@ -202,7 +201,6 @@ export default {
:item-id="job.id"
:time="headerTime"
:user="job.user"
:actions="headerActions"
:has-sidebar-button="true"
:should-render-triggered-label="shouldRenderTriggeredLabel"
:item-name="__('Job')"

View file

@ -1,8 +1,6 @@
import _ from 'underscore';
import { isScrolledToBottom } from '~/lib/utils/scroll_utils';
export const headerActions = () => [];
export const headerTime = state => (state.job.started ? state.job.started : state.job.created_at);
export const shouldRenderCalloutMessage = state =>

View file

@ -8,22 +8,6 @@ describe('Job Store Getters', () => {
localState = state();
});
describe('headerActions', () => {
describe('with new issue path', () => {
it('returns an empty array with no actions', () => {
localState.job.new_issue_path = 'issues/new';
expect(getters.headerActions(localState)).toEqual([]);
});
});
describe('without new issue path', () => {
it('returns an empty array', () => {
expect(getters.headerActions(localState)).toEqual([]);
});
});
});
describe('headerTime', () => {
describe('when the job has started key', () => {
it('returns started key', () => {