Skip to content
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
730 changes: 361 additions & 369 deletions dashboard/package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,29 @@
"test:e2e": "playwright test"
},
"dependencies": {
"@iconify-json/logos": "^1.2.11",
"@radix-ui/react-dialog": "1.1.23",
"@radix-ui/react-popover": "1.1.23",
"@iconify-json/logos": "^1.2.21",
"@radix-ui/react-dialog": "1.3.1",
"@radix-ui/react-popover": "1.3.1",
"@types/qrcode": "^1.5.6",
"cmdk": "1.1.1",
"mermaid": "^11.13.0",
"next": "^15.5.29",
"qrcode": "^1.5.4",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"react": "^19.3.1",
"react-dom": "^19.3.1",
"react-markdown": "^10.1.0",
"recharts": "^3.8.1",
"recharts": "^3.11.2",
"remark-gfm": "^4.0.1",
"shiki": "4.5.0"
"shiki": "4.6.0"
},
"devDependencies": {
"@fontsource/dejavu-mono": "5.3.0",
"@fontsource/dejavu-sans": "5.3.0",
"@playwright/test": "^1.64.0",
"@tailwindcss/postcss": "^4.1.0",
"@playwright/test": "^1.65.1",
"@tailwindcss/postcss": "^4.3.5",
"@types/node": "^26.6.11",
"@types/react": "^19.1.0",
"@types/react-dom": "^19.1.0",
"@types/react": "^19.3.3",
"@types/react-dom": "^19.3.0",
"tailwindcss": "^4.1.0",
"typescript": "^5.8.0"
},
Expand Down
30 changes: 25 additions & 5 deletions docs/e2e/site.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,33 @@ test('an endpoint page shows its scope, parameters, response fields and samples
await expect(main.getByText('Runs per page, 1 to 100. Default 50.')).toBeVisible();
// Response fields with types and descriptions.
await expect(main.getByText('How many runs were read to fill this page', { exact: false })).toBeVisible();
// cURL, TypeScript and Python, and no other languages.
for (const tab of ['cURL', 'TypeScript', 'Python']) await expect(main.getByRole('tab', { name: tab }).first()).toBeVisible();
await expect(main.getByRole('tab', { name: 'Go' })).toHaveCount(0);
// cURL, TypeScript and Python, and no other languages. fumadocs-openapi
// offers them in a "Code language" picker on the request sample (a
// listbox of options, not a row of tabs), cURL first. The picker is in the
// static HTML before React takes the page over, and a click before then
// opens nothing, so the page's scripts load first. Choosing a language
// highlights the new sample in the background and keeps the old block (and
// its picker) on screen until it is ready, so each step waits for the one
// picker that shows the chosen language. The list then closes with an
// animation and hands focus back to the picker; a click before that opens
// nothing, so the next choice waits for the focus.
const pickers = main.getByRole('combobox', { name: 'Code language' });
const language = pickers.first();
await expect(pickers).toHaveCount(1);
await expect(language).toHaveText('cURL');
await expect(main.getByText('Authorization: Bearer $CODERHELM_API_KEY').first()).toBeVisible();
await main.getByRole('tab', { name: 'TypeScript' }).first().click();
await page.waitForLoadState('networkidle');
await language.click();
await expect(page.getByRole('option')).toHaveText(['cURL', 'TypeScript', 'Python']);
await page.getByRole('option', { name: 'TypeScript' }).click();
await expect(pickers).toHaveCount(1);
await expect(language).toHaveText('TypeScript');
await expect(main.getByText('process.env.CODERHELM_API_KEY', { exact: false }).first()).toBeVisible();
await main.getByRole('tab', { name: 'Python' }).first().click();
await expect(language).toBeFocused();
await language.click();
await page.getByRole('option', { name: 'Python' }).click();
await expect(pickers).toHaveCount(1);
await expect(language).toHaveText('Python');
await expect(main.getByText("os.environ['CODERHELM_API_KEY']", { exact: false }).first()).toBeVisible();
// Example response from the schema's own examples.
await expect(main.getByText('"01JB8X6F4M2C9QZ3T7V5W1K0HA"', { exact: false }).first()).toBeAttached();
Expand Down
Loading
Loading