Commit a536fe28 authored by Fernando Arias's avatar Fernando Arias

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
parent f3465c72
...@@ -80,7 +80,6 @@ export default { ...@@ -80,7 +80,6 @@ export default {
'hasError', 'hasError',
]), ]),
...mapGetters([ ...mapGetters([
'headerActions',
'headerTime', 'headerTime',
'shouldRenderCalloutMessage', 'shouldRenderCalloutMessage',
'shouldRenderTriggeredLabel', 'shouldRenderTriggeredLabel',
...@@ -202,7 +201,6 @@ export default { ...@@ -202,7 +201,6 @@ export default {
:item-id="job.id" :item-id="job.id"
:time="headerTime" :time="headerTime"
:user="job.user" :user="job.user"
:actions="headerActions"
:has-sidebar-button="true" :has-sidebar-button="true"
:should-render-triggered-label="shouldRenderTriggeredLabel" :should-render-triggered-label="shouldRenderTriggeredLabel"
:item-name="__('Job')" :item-name="__('Job')"
......
import _ from 'underscore'; import _ from 'underscore';
import { isScrolledToBottom } from '~/lib/utils/scroll_utils'; 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 headerTime = state => (state.job.started ? state.job.started : state.job.created_at);
export const shouldRenderCalloutMessage = state => export const shouldRenderCalloutMessage = state =>
......
...@@ -8,22 +8,6 @@ describe('Job Store Getters', () => { ...@@ -8,22 +8,6 @@ describe('Job Store Getters', () => {
localState = state(); 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('headerTime', () => {
describe('when the job has started key', () => { describe('when the job has started key', () => {
it('returns started key', () => { it('returns started key', () => {
......
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