cd78f72f33
Complete rename of all technical identifiers across the codebase: Package names (11 packages): - @planarchy/* → @capakraken/* in all package.json, tsconfig, imports Import statements: 277 files, 548 occurrences replaced Database & Docker: - PostgreSQL user/db: planarchy → capakraken - Docker volumes: planarchy_pgdata → capakraken_pgdata - Connection strings updated in docker-compose, .env, CI CI/CD: - GitHub Actions workflow: all filter commands updated - Test database credentials updated Infrastructure: - Redis channel: planarchy:sse → capakraken:sse - Logger service name: planarchy-api → capakraken-api - Anonymization seed updated - Start/stop/restart scripts updated Test data: - Seed emails: @planarchy.dev → @capakraken.dev - E2E test credentials: all 11 spec files updated - Email defaults: @planarchy.app → @capakraken.app - localStorage keys: planarchy_* → capakraken_* Documentation: 30+ .md files updated Verification: - pnpm install: workspace resolution works - TypeScript: only pre-existing TS2589 (no new errors) - Engine: 310/310 tests pass - Staffing: 37/37 tests pass Co-Authored-By: claude-flow <ruv@ruv.net>
43 lines
1.8 KiB
TypeScript
43 lines
1.8 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
test.describe("Staffing", () => {
|
|
test.beforeEach(async ({ page }) => {
|
|
await page.goto("/auth/signin");
|
|
await page.fill('input[type="email"]', "admin@capakraken.dev");
|
|
await page.fill('input[type="password"]', "admin123");
|
|
await page.click('button[type="submit"]');
|
|
await expect(page).toHaveURL(/\/(dashboard|resources)/);
|
|
await page.goto("/staffing");
|
|
});
|
|
|
|
test("staffing page loads with search form", async ({ page }) => {
|
|
await page.waitForLoadState("networkidle");
|
|
await expect(page.locator("h1", { hasText: /Staffing Suggestions/i })).toBeVisible({ timeout: 10000 });
|
|
// Search form should have skill input, date fields, and a search button
|
|
await expect(page.locator("text=How scoring works")).toBeVisible({ timeout: 10000 });
|
|
});
|
|
|
|
test("search form has default skill tags", async ({ page }) => {
|
|
await page.waitForLoadState("networkidle");
|
|
// The StaffingPanel pre-populates with TypeScript and React skill tags
|
|
await expect(
|
|
page.locator("text=TypeScript").or(page.locator("text=React")),
|
|
).toBeVisible({ timeout: 10000 });
|
|
});
|
|
|
|
test("submitting search returns suggestions or empty state", async ({ page }) => {
|
|
await page.waitForLoadState("networkidle");
|
|
// Click the search/submit button
|
|
const searchBtn = page.locator("button", { hasText: /Search|Find|Suggest/i }).first();
|
|
await expect(searchBtn).toBeVisible({ timeout: 10000 });
|
|
await searchBtn.click();
|
|
await page.waitForTimeout(1000);
|
|
// After search, should show either suggestion cards or a "no suggestions" message
|
|
await expect(
|
|
page.locator("text=/Score|Availability|No suggestions|No matching/i").first()
|
|
.or(page.locator("[data-suggestion]").first())
|
|
.or(page.locator("table").first()),
|
|
).toBeVisible({ timeout: 15000 });
|
|
});
|
|
});
|