Skip to content
Draft
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
82 changes: 65 additions & 17 deletions genesis/webui/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions genesis/webui/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"server": "tsx server/index.ts",
"dev:all": "concurrently \"npm run dev\" \"npm run server\"",
"build": "tsc -b && oxlint . && vite build",
"test:e2e": "playwright test",
"lint": "eslint .",
"lint:oxc": "oxlint .",
"lint:fix": "eslint . --fix",
Expand Down Expand Up @@ -41,6 +42,7 @@
"react-dom": "^19.1.1",
"react-plotly.js": "^2.6.0",
"react-router-dom": "^7.9.4",
"tailwind-merge": "^3.3.1",
"tsx": "^4.20.6"
},
"devDependencies": {
Expand Down
35 changes: 35 additions & 0 deletions genesis/webui/frontend/tests/smoke.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { expect, test } from '@playwright/test';

test('loads the shell and empty state without a database', async ({ page }) => {
await page.route('http://localhost:8000/list_databases', async (route) => {
await route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify([]),
});
});

await page.route('http://localhost:8000/get_programs**', async (route) => {
await route.fulfill({
status: 200,
contentType: 'application/json',
body: JSON.stringify([]),
});
});

await page.goto('/');

await expect(
page.getByRole('heading', { name: 'Genesis', exact: true })
).toBeVisible();
await expect(
page.getByRole('button', { name: 'Search', exact: true })
).toBeVisible();
await expect(
page.getByRole('heading', { name: 'No Database Selected', exact: true })
).toBeVisible();

await page.getByRole('button', { name: 'Search', exact: true }).click();

await expect(page.getByRole('option', { name: 'Tree View' })).toBeVisible();
});