diff options
Diffstat (limited to 'spec/frontend/analytics')
-rw-r--r-- | spec/frontend/analytics/devops_report/components/service_ping_disabled_spec.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/frontend/analytics/devops_report/components/service_ping_disabled_spec.js b/spec/frontend/analytics/devops_report/components/service_ping_disabled_spec.js index 75ef9d9db94..c5c40e9a360 100644 --- a/spec/frontend/analytics/devops_report/components/service_ping_disabled_spec.js +++ b/spec/frontend/analytics/devops_report/components/service_ping_disabled_spec.js @@ -1,6 +1,6 @@ import { GlEmptyState, GlSprintf } from '@gitlab/ui'; import { TEST_HOST } from 'helpers/test_constants'; -import { shallowMountExtended } from 'helpers/vue_test_utils_helper'; +import { mountExtended } from 'helpers/vue_test_utils_helper'; import ServicePingDisabled from '~/analytics/devops_report/components/service_ping_disabled.vue'; describe('~/analytics/devops_report/components/service_ping_disabled.vue', () => { @@ -11,21 +11,19 @@ describe('~/analytics/devops_report/components/service_ping_disabled.vue', () => }); const createWrapper = ({ isAdmin = false } = {}) => { - wrapper = shallowMountExtended(ServicePingDisabled, { + wrapper = mountExtended(ServicePingDisabled, { provide: { isAdmin, svgPath: TEST_HOST, - docsLink: TEST_HOST, primaryButtonPath: TEST_HOST, }, - stubs: { GlEmptyState, GlSprintf }, }); }; const findEmptyState = () => wrapper.findComponent(GlEmptyState); const findMessageForRegularUsers = () => wrapper.findComponent(GlSprintf); - const findDocsLink = () => wrapper.findByTestId('docs-link'); - const findPowerOnButton = () => wrapper.findByTestId('power-on-button'); + const findDocsLink = () => wrapper.findByRole('link', { name: 'service ping' }); + const findPowerOnButton = () => wrapper.findByRole('link', { name: 'Turn on service ping' }); it('renders empty state with provided SVG path', () => { createWrapper(); @@ -45,7 +43,7 @@ describe('~/analytics/devops_report/components/service_ping_disabled.vue', () => it('renders docs link', () => { expect(findDocsLink().exists()).toBe(true); - expect(findDocsLink().attributes('href')).toBe(TEST_HOST); + expect(findDocsLink().attributes('href')).toBe('/help/development/service_ping/index.md'); }); }); |