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-11-09 21:13:03 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-11-09 21:13:03 +0300
commit519f46346b22c1b7c1f4c2a4ce902e829354cb62 (patch)
tree568e97ac17a509445e9e6cf926ebaf47beeba9fb /spec/frontend/ci/pipelines_page/components/pipeline_labels_spec.js
parent07f3c9525c1df3ae1da995ea4fe6dd66bb61b9fd (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ci/pipelines_page/components/pipeline_labels_spec.js')
-rw-r--r--spec/frontend/ci/pipelines_page/components/pipeline_labels_spec.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/frontend/ci/pipelines_page/components/pipeline_labels_spec.js b/spec/frontend/ci/pipelines_page/components/pipeline_labels_spec.js
index 4377acb9041..a660994ac8b 100644
--- a/spec/frontend/ci/pipelines_page/components/pipeline_labels_spec.js
+++ b/spec/frontend/ci/pipelines_page/components/pipeline_labels_spec.js
@@ -10,6 +10,7 @@ describe('Pipeline label component', () => {
let wrapper;
const findScheduledTag = () => wrapper.findByTestId('pipeline-url-scheduled');
+ const findTriggeredTag = () => wrapper.findByTestId('pipeline-url-triggered');
const findLatestTag = () => wrapper.findByTestId('pipeline-url-latest');
const findYamlTag = () => wrapper.findByTestId('pipeline-url-yaml');
const findStuckTag = () => wrapper.findByTestId('pipeline-url-stuck');
@@ -43,6 +44,7 @@ describe('Pipeline label component', () => {
expect(findAutoDevopsTag().exists()).toBe(false);
expect(findFailureTag().exists()).toBe(false);
expect(findScheduledTag().exists()).toBe(false);
+ expect(findTriggeredTag().exists()).toBe(false);
expect(findForkTag().exists()).toBe(false);
expect(findTrainTag().exists()).toBe(false);
expect(findMergedResultsTag().exists()).toBe(false);
@@ -133,6 +135,20 @@ describe('Pipeline label component', () => {
expect(findScheduledTag().text()).toContain('scheduled');
});
+ it('should render triggered badge when pipeline was triggered by a trigger', () => {
+ const triggeredPipeline = {
+ ...defaultProps.pipeline,
+ source: 'trigger',
+ };
+
+ createComponent({
+ pipeline: triggeredPipeline,
+ });
+
+ expect(findTriggeredTag().exists()).toBe(true);
+ expect(findTriggeredTag().text()).toBe('trigger token');
+ });
+
it('should render the fork badge when the pipeline was run in a fork', () => {
const forkedPipeline = defaultProps.pipeline;
forkedPipeline.project.full_path = '/test/forked';