summaryrefslogtreecommitdiff
path: root/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js
diff options
context:
space:
mode:
Diffstat (limited to 'spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js')
-rw-r--r--spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js
index 3364c61d155..6fb6a8bc33b 100644
--- a/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js
+++ b/spec/frontend/ci/pipeline_schedules/components/table/cells/pipeline_schedule_actions_spec.js
@@ -25,6 +25,7 @@ describe('Pipeline schedule actions', () => {
const findAllButtons = () => wrapper.findAllComponents(GlButton);
const findDeleteBtn = () => wrapper.findByTestId('delete-pipeline-schedule-btn');
const findTakeOwnershipBtn = () => wrapper.findByTestId('take-ownership-pipeline-schedule-btn');
+ const findPlayScheduleBtn = () => wrapper.findByTestId('play-pipeline-schedule-btn');
afterEach(() => {
wrapper.destroy();
@@ -61,4 +62,14 @@ describe('Pipeline schedule actions', () => {
showTakeOwnershipModal: [[mockTakeOwnershipNodes[0].id]],
});
});
+
+ it('play button emits playPipelineSchedule event and schedule id', () => {
+ createComponent();
+
+ findPlayScheduleBtn().vm.$emit('click');
+
+ expect(wrapper.emitted()).toEqual({
+ playPipelineSchedule: [[mockPipelineScheduleNodes[0].id]],
+ });
+ });
});