summaryrefslogtreecommitdiff
path: root/spec/frontend/jobs/components/table/cells/actions_cell_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/jobs/components/table/cells/actions_cell_spec.js')
-rw-r--r--spec/frontend/jobs/components/table/cells/actions_cell_spec.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/spec/frontend/jobs/components/table/cells/actions_cell_spec.js b/spec/frontend/jobs/components/table/cells/actions_cell_spec.js
index 7cc008f332d..55fe534aa3b 100644
--- a/spec/frontend/jobs/components/table/cells/actions_cell_spec.js
+++ b/spec/frontend/jobs/components/table/cells/actions_cell_spec.js
@@ -37,6 +37,7 @@ describe('Job actions cell', () => {
const cancelableJob = findMockJob('cancelable');
const playableJob = findMockJob('playable');
const retryableJob = findMockJob('retryable');
+ const failedJob = findMockJob('failed');
const scheduledJob = findMockJob('scheduled');
const jobWithArtifact = findMockJob('with_artifact');
const cannotPlayJob = findMockJob('playable', mockJobsNodesAsGuest);
@@ -79,10 +80,6 @@ describe('Job actions cell', () => {
});
};
- afterEach(() => {
- wrapper.destroy();
- });
-
it('displays the artifacts download button with correct link', () => {
createComponent(jobWithArtifact);
@@ -191,6 +188,20 @@ describe('Job actions cell', () => {
expect(button().props('disabled')).toBe(true);
});
+ describe('Retry button title', () => {
+ it('displays retry title when job has failed and is retryable', () => {
+ createComponent(failedJob);
+
+ expect(findRetryButton().attributes('title')).toBe('Retry');
+ });
+
+ it('displays run again title when job has passed and is retryable', () => {
+ createComponent(retryableJob);
+
+ expect(findRetryButton().attributes('title')).toBe('Run again');
+ });
+ });
+
describe('Scheduled Jobs', () => {
const today = () => new Date('2021-08-31');