Skip to content

Fix link #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion web/site/app/tests/unit/components/SbcDocsProductCard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,21 @@ import { enI18n } from '~/tests/mocks/i18n'
const { navigateToMock } = vi.hoisted(() => ({ navigateToMock: vi.fn() }))
mockNuxtImport('navigateTo', () => navigateToMock)

const queryContentMockData = {
_path: '/products/test-dir/test-file',
_dir: 'get-started',
title: 'Test Title',
body: { toc: { links: [{ id: '1', text: 'Introduction', href: '#introduction' }] } }
}

const { queryContentMock } = vi.hoisted(() => ({
queryContentMock: vi.fn(() => ({
where: vi.fn().mockReturnThis(),
findOne: vi.fn(() => Promise.resolve(queryContentMockData))
}))
}))
mockNuxtImport('queryContent', () => queryContentMock)

describe('SbcDocsProductCard', () => {
const props = {
name: 'Test Product',
Expand Down Expand Up @@ -40,6 +55,6 @@ describe('SbcDocsProductCard', () => {
})

await wrapper.trigger('click')
expect(navigateTo).toHaveBeenCalledWith('/en-CA/products/test-product/overview')
expect(navigateTo).toHaveBeenCalledWith('/en-CA' + queryContentMockData._path)
})
})
2 changes: 1 addition & 1 deletion web/site/app/tests/unit/composables/docPageData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('useDocPageData', () => {
// assert current dir
expect(composable.currentDir.value).toEqual(queryContentMockData._path)
// assert generated page head
expect(composable.createPageHead()).toBe('Get Started - Test Title')
expect(composable.createPageHead()).toBe('Get Started - Test Title - Service BC Connect API Gateway')
})

// TODO: figure out how to test the watcher reacting to route changes
Expand Down
2 changes: 1 addition & 1 deletion web/site/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Example:

## Images and Files

To add images or files to your documentation, place them in the corresponding sub-directory inside the [public](https://github.com/deetz99/sbc-apigw/tree/main/web/site/public) directory.
To add images or files to your documentation, place them in the corresponding sub-directory inside the [public](https://github.com/bcgov/developer.connect/tree/main/web/site/public) directory.

Refer to the [Nuxt Content documentation on images](https://content.nuxt.com/usage/markdown#images) for details on referencing images in your markdown.

Expand Down
Loading