Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-02-02 15:07:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-02-02 15:07:33 +0300
commitae9f43a2c4bda0ee7dae59ea9a7d412068f6f7ff (patch)
tree0617cf9d21ee7b8cf0ba7c120781475050c6a7a6 /spec/frontend/pipelines
parent4fbfae83afa1ea64ba4969bff2b459b4562944e4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/pipelines')
-rw-r--r--spec/frontend/pipelines/graph/job_item_spec.js14
-rw-r--r--spec/frontend/pipelines/graph/mock_data.js22
2 files changed, 35 insertions, 1 deletions
diff --git a/spec/frontend/pipelines/graph/job_item_spec.js b/spec/frontend/pipelines/graph/job_item_spec.js
index 7b3ee276b91..3224c87ab6b 100644
--- a/spec/frontend/pipelines/graph/job_item_spec.js
+++ b/spec/frontend/pipelines/graph/job_item_spec.js
@@ -12,6 +12,7 @@ import {
mockJob,
mockJobWithoutDetails,
mockJobWithUnauthorizedAction,
+ mockFailedJob,
triggerJob,
triggerJobWithRetryAction,
} from './mock_data';
@@ -64,7 +65,6 @@ describe('pipeline graph job item', () => {
afterEach(() => {
mockAxios.restore();
- wrapper.destroy();
});
describe('name with link', () => {
@@ -131,6 +131,18 @@ describe('pipeline graph job item', () => {
expect(actionComponent.props('actionIcon')).toBe('stop');
expect(actionComponent.attributes('disabled')).toBe('disabled');
});
+
+ it('action icon tooltip text when job has passed but can be ran again', () => {
+ createWrapper({ props: { job: mockJob } });
+
+ expect(findActionComponent().props('tooltipText')).toBe('Run again');
+ });
+
+ it('action icon tooltip text when job has failed and can be retried', () => {
+ createWrapper({ props: { job: mockFailedJob } });
+
+ expect(findActionComponent().props('tooltipText')).toBe('Retry');
+ });
});
describe('job style', () => {
diff --git a/spec/frontend/pipelines/graph/mock_data.js b/spec/frontend/pipelines/graph/mock_data.js
index fc6dfe9ec03..f949ca9564d 100644
--- a/spec/frontend/pipelines/graph/mock_data.js
+++ b/spec/frontend/pipelines/graph/mock_data.js
@@ -1055,3 +1055,25 @@ export const triggerJobWithRetryAction = {
},
},
};
+
+export const mockFailedJob = {
+ id: 3999,
+ name: 'failed job',
+ kind: BUILD_KIND,
+ status: {
+ id: 'failed-3999-3999',
+ icon: 'status_failed',
+ tooltip: 'failed - (stuck or timeout failure)',
+ hasDetails: true,
+ detailsPath: '/root/ci-project/-/jobs/3999',
+ group: 'failed',
+ label: 'failed',
+ action: {
+ id: 'Ci::BuildPresenter-failed-3999',
+ buttonTitle: 'Retry this job',
+ icon: 'retry',
+ path: '/root/ci-project/-/jobs/3999/retry',
+ title: 'Retry',
+ },
+ },
+};