Skip to content

Commit

Permalink
Fix tests page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdrumgod committed Mar 22, 2024
1 parent 14ec6fb commit 6ef2ed5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/starlight-openapi-rapidoc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "starlight-openapi-rapidoc",
"version": "0.6.0",
"version": "0.7.0",
"license": "MIT",
"description": "Starlight plugin to generate documentation from OpenAPI/Swagger specifications + RapiDoc..",
"author": "HiDeoo <[email protected]> (https://hideoo.dev)",
Expand Down
4 changes: 2 additions & 2 deletions packages/starlight-openapi-rapidoc/tests/operation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import { expect, test } from './test'
test('uses the operation summary for title', async ({ docPage }) => {
await docPage.goto('/v3/petstore-simple/operations/listpets/')

await docPage.expectToHaveTitle('Petstore v3.0 (simple) - List all pets')
await docPage.expectToHaveTitle('Petstore v3.0 (simple) / pets / List all pets')
})

test('falls back to the operation ID for title', async ({ docPage }) => {
await docPage.goto('/petstore/operations/findpets/')

await docPage.expectToHaveTitle('Petstore - findPets')
await docPage.expectToHaveTitle('Petstore / Operations / findPets')
})

test('displays basic informations', async ({ docPage }) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/starlight-openapi-rapidoc/tests/overview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { expect, test } from './test'
test('displays a basic overview', async ({ docPage }) => {
await docPage.goto('/v3/petstore-simple/')

await docPage.expectToHaveTitle('Petstore v3.0 (simple) - Overview')
await docPage.expectToHaveTitle('Petstore v3.0 (simple) / Overview')

await expect(docPage.getByRole('heading', { level: 2, name: 'Swagger Petstore (1.0.0)' })).toBeVisible()

Expand All @@ -16,7 +16,7 @@ test('displays a basic overview', async ({ docPage }) => {
test('displays advanced overviews', async ({ docPage }) => {
await docPage.goto('/petstore/')

await docPage.expectToHaveTitle('Petstore - Overview')
await docPage.expectToHaveTitle('Petstore / Overview')

await expect(docPage.getByRole('heading', { level: 2, name: 'Swagger Petstore (1.0.0)' })).toBeVisible()

Expand Down
4 changes: 2 additions & 2 deletions packages/starlight-openapi-rapidoc/tests/webhooks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import { test } from './test'
test('uses the operation summary for title', async ({ docPage }) => {
await docPage.goto('/v3/animals/webhooks/newanimal/')

await docPage.expectToHaveTitle('Animals v3.0 - New animal')
await docPage.expectToHaveTitle('Animals v3.0 / New animal')
})

test('falls back to the operation ID for title', async ({ docPage }) => {
await docPage.goto('/v3/animals/webhooks/newcat/')

await docPage.expectToHaveTitle('Animals v3.0 - newCat')
await docPage.expectToHaveTitle('Animals v3.0 / newCat')
})

0 comments on commit 6ef2ed5

Please sign in to comment.