diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 13:49:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-20 13:49:51 +0000 |
commit | 71786ddc8e28fbd3cb3fcc4b3ff15e5962a1c82e (patch) | |
tree | 6a2d93ef3fb2d353bb7739e4b57e6541f51cdd71 /spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js | |
parent | a7253423e3403b8c08f8a161e5937e1488f5f407 (diff) | |
download | gitlab-ce-15.9.0-rc42.tar.gz |
Add latest changes from gitlab-org/gitlab@15-9-stable-eev15.9.0-rc42
Diffstat (limited to 'spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js')
-rw-r--r-- | spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js b/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js index 2fb824a8fa5..1ff60ff1a9d 100644 --- a/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js +++ b/spec/frontend/ci/runner/components/cells/runner_status_cell_spec.js @@ -10,6 +10,7 @@ import { INSTANCE_TYPE, STATUS_ONLINE, STATUS_OFFLINE, + JOB_STATUS_IDLE, } from '~/ci/runner/constants'; describe('RunnerStatusCell', () => { @@ -18,16 +19,18 @@ describe('RunnerStatusCell', () => { const findStatusBadge = () => wrapper.findComponent(RunnerStatusBadge); const findPausedBadge = () => wrapper.findComponent(RunnerPausedBadge); - const createComponent = ({ runner = {} } = {}) => { + const createComponent = ({ runner = {}, ...options } = {}) => { wrapper = mount(RunnerStatusCell, { propsData: { runner: { runnerType: INSTANCE_TYPE, active: true, status: STATUS_ONLINE, + jobExecutionStatus: JOB_STATUS_IDLE, ...runner, }, }, + ...options, }); }; @@ -74,4 +77,14 @@ describe('RunnerStatusCell', () => { expect(wrapper.text()).toBe(''); }); + + it('Displays "runner-job-status-badge" slot', () => { + createComponent({ + scopedSlots: { + 'runner-job-status-badge': ({ runner }) => `Job status ${runner.jobExecutionStatus}`, + }, + }); + + expect(wrapper.text()).toContain(`Job status ${JOB_STATUS_IDLE}`); + }); }); |