diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-25 21:09:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-25 21:09:47 +0300 |
commit | 99a6475e08172adc2c300273e81fccb04b0a8b0e (patch) | |
tree | 10a4c856ae83546ebe2c9fae2c3b3fb1236acd5a /spec/frontend/ci | |
parent | d1c0c1c4c3241eae6795562d8a0c22def6771238 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/ci')
4 files changed, 9 insertions, 5 deletions
diff --git a/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js b/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js index a4ba9815c8d..c4ed6d1bdb5 100644 --- a/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js +++ b/spec/frontend/ci/runner/admin_runner_show/admin_runner_show_app_spec.js @@ -34,6 +34,7 @@ jest.mock('~/lib/utils/url_utility', () => ({ const mockRunner = runnerData.data.runner; const mockRunnerGraphqlId = mockRunner.id; const mockRunnerId = `${getIdFromGraphQLId(mockRunnerGraphqlId)}`; +const mockRunnerSha = mockRunner.shortSha; const mockRunnersPath = '/admin/runners'; Vue.use(VueApollo); @@ -89,7 +90,7 @@ describe('AdminRunnerShowApp', () => { }); it('displays the runner header', () => { - expect(findRunnerHeader().text()).toContain(`Runner #${mockRunnerId}`); + expect(findRunnerHeader().text()).toContain(`#${mockRunnerId} (${mockRunnerSha})`); }); it('displays the runner edit and pause buttons', () => { diff --git a/spec/frontend/ci/runner/components/runner_header_spec.js b/spec/frontend/ci/runner/components/runner_header_spec.js index c851966431d..f5091226eaa 100644 --- a/spec/frontend/ci/runner/components/runner_header_spec.js +++ b/spec/frontend/ci/runner/components/runner_header_spec.js @@ -17,6 +17,7 @@ import RunnerStatusBadge from '~/ci/runner/components/runner_status_badge.vue'; import { runnerData } from '../mock_data'; const mockRunner = runnerData.data.runner; +const mockRunnerSha = mockRunner.shortSha; describe('RunnerHeader', () => { let wrapper; @@ -71,7 +72,7 @@ describe('RunnerHeader', () => { }, }); - expect(wrapper.text()).toContain('Runner #99'); + expect(wrapper.text()).toContain(`#99 (${mockRunnerSha})`); }); it('displays the runner locked icon', () => { @@ -100,7 +101,7 @@ describe('RunnerHeader', () => { }, }); - expect(wrapper.text()).toContain('Runner #99'); + expect(wrapper.text()).toContain(`#99 (${mockRunnerSha})`); expect(wrapper.text()).not.toMatch(/created .+/); expect(findTimeAgo().exists()).toBe(false); }); diff --git a/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js b/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js index 5a4c34fc374..120388900b5 100644 --- a/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js +++ b/spec/frontend/ci/runner/group_runner_show/group_runner_show_app_spec.js @@ -34,6 +34,7 @@ jest.mock('~/lib/utils/url_utility', () => ({ const mockRunner = runnerData.data.runner; const mockRunnerGraphqlId = mockRunner.id; const mockRunnerId = `${getIdFromGraphQLId(mockRunnerGraphqlId)}`; +const mockRunnerSha = mockRunner.shortSha; const mockRunnersPath = '/groups/group1/-/runners'; const mockEditGroupRunnerPath = `/groups/group1/-/runners/${mockRunnerId}/edit`; @@ -91,7 +92,7 @@ describe('GroupRunnerShowApp', () => { }); it('displays the runner header', () => { - expect(findRunnerHeader().text()).toContain(`Runner #${mockRunnerId}`); + expect(findRunnerHeader().text()).toContain(`#${mockRunnerId} (${mockRunnerSha})`); }); it('displays the runner edit and pause buttons', () => { diff --git a/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js b/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js index 79bbf95f8f0..ee4bd9ccc92 100644 --- a/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js +++ b/spec/frontend/ci/runner/runner_edit/runner_edit_app_spec.js @@ -21,6 +21,7 @@ jest.mock('~/ci/runner/sentry_utils'); const mockRunner = runnerFormData.data.runner; const mockRunnerGraphqlId = mockRunner.id; const mockRunnerId = `${getIdFromGraphQLId(mockRunnerGraphqlId)}`; +const mockRunnerSha = mockRunner.shortSha; const mockRunnerPath = `/admin/runners/${mockRunnerId}`; Vue.use(VueApollo); @@ -62,7 +63,7 @@ describe('RunnerEditApp', () => { it('displays the runner id and creation date', async () => { await createComponentWithApollo({ mountFn: mount }); - expect(findRunnerHeader().text()).toContain(`Runner #${mockRunnerId}`); + expect(findRunnerHeader().text()).toContain(`#${mockRunnerId} (${mockRunnerSha})`); expect(findRunnerHeader().text()).toContain('created'); }); |