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:
Diffstat (limited to 'spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js')
-rw-r--r--spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js b/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js
index dacee556030..e8e178ed148 100644
--- a/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js
+++ b/spec/frontend/ci/pipeline_details/header/pipeline_details_header_spec.js
@@ -94,6 +94,7 @@ describe('Pipeline details header', () => {
failureReason: 'pipeline failed',
badges: {
schedule: true,
+ trigger: false,
child: false,
latest: true,
mergeTrainPipeline: false,
@@ -179,6 +180,7 @@ describe('Pipeline details header', () => {
expect(findAllBadges()).toHaveLength(2);
expect(wrapper.findByText('latest').exists()).toBe(true);
expect(wrapper.findByText('Scheduled').exists()).toBe(true);
+ expect(wrapper.findByText('trigger token').exists()).toBe(false);
});
it('displays ref text', () => {
@@ -203,6 +205,21 @@ describe('Pipeline details header', () => {
});
});
+ describe('with triggered pipeline', () => {
+ beforeEach(async () => {
+ createComponent(defaultHandlers, {
+ ...defaultProps,
+ badges: { ...defaultProps.badges, trigger: true },
+ });
+
+ await waitForPromises();
+ });
+
+ it('displays triggered badge', () => {
+ expect(wrapper.findByText('trigger token').exists()).toBe(true);
+ });
+ });
+
describe('without pipeline name', () => {
it('displays commit title', async () => {
createComponent(defaultHandlers, { ...defaultProps, name: '' });