diff --git a/__tests__/utils.spec.js b/__tests__/utils.spec.js index 7c5b48c2..8ca71a94 100644 --- a/__tests__/utils.spec.js +++ b/__tests__/utils.spec.js @@ -33,9 +33,19 @@ describe('Utils', () => { it('links to the action workflow', () => { const attachments = buildSlackAttachments({ status: 'STARTED', color: 'good', github: GITHUB_PUSH_EVENT }); - expect(attachments[0].fields.find(a => a.title === 'Action')).toEqual({ - title: 'Action', - value: ``, + expect(attachments[0].fields.find(a => a.title === 'Workflow')).toEqual({ + title: 'Workflow', + value: ``, + short: true, + }); + }); + + it('links to the action job', () => { + const attachments = buildSlackAttachments({ status: 'STARTED', color: 'good', github: GITHUB_PUSH_EVENT }); + + expect(attachments[0].fields.find(a => a.title === 'Job')).toEqual({ + title: 'Job', + value: ``, short: true, }); }); @@ -65,9 +75,9 @@ describe('Utils', () => { it('links to the action workflow', () => { const attachments = buildSlackAttachments({ status: 'STARTED', color: 'good', github: GITHUB_PR_EVENT }); - expect(attachments[0].fields.find(a => a.title === 'Action')).toEqual({ - title: 'Action', - value: ``, + expect(attachments[0].fields.find(a => a.title === 'Workflow')).toEqual({ + title: 'Workflow', + value: ``, short: true, }); }); diff --git a/fixtures.js b/fixtures.js index db97e326..dff1e9d4 100644 --- a/fixtures.js +++ b/fixtures.js @@ -14,6 +14,8 @@ export const GITHUB_PUSH_EVENT = { workflow: 'CI', eventName: 'push', sha: 'abc123', + job: 'build and push', + runId: 12345, }, }; @@ -33,5 +35,7 @@ export const GITHUB_PR_EVENT = { workflow: 'CI', eventName: 'pull_request', sha: 'abc123', + job: 'build and push', + runId: 12345, }, };