mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
The tree was a debranded snapshot of upstream taken around 2026-02-20, and upstream has moved about five months since. This replaces it with upstream master, mechanically re-derived: bin/debrand does the rename, and the pipeline and squashed migrations are restored from the shipped tree. Not a merge. The previous import replaced the tree wholesale in a single commit, so there is no shared content history to merge against. Reproducing the rename on the new tree is what actually converges. What survives: .hanzo/workflows, the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md, and insights/migrations. The squashed initial migration is load-bearing — the live database records it by name, so upstream's ~918 individual migrations cannot come back. Nine products are dropped as unreferenced. Twenty-one more that we do not run are kept anyway because the core app still imports them; unpicking those is a refactor and does not belong in a rebase. This base does not build yet, and the reasons are not in the rename: upstream now wants Python 3.13.13 against our 3.12.12 and Django 5.2 against our 4.2, and the dependency manifests still name upstream packages that we republish under our own names. Those are decisions, not renames.
60 lines
2.4 KiB
TypeScript
60 lines
2.4 KiB
TypeScript
import { Page, test as base } from '@playwright/test'
|
|
|
|
import { decideForTest, loadActiveEntries } from '../playwright.quarantine'
|
|
import { Identifier, Navigation } from './navigation'
|
|
|
|
// Read once per worker; a `mode: "skip"` match short-circuits the test below.
|
|
// `mode: "run"` is enforced separately by playwright.quarantine.reporter.ts.
|
|
const quarantineEntries = loadActiveEntries()
|
|
|
|
export const LOGIN_USERNAME = process.env.LOGIN_USERNAME || '[email protected]'
|
|
export const LOGIN_PASSWORD = process.env.LOGIN_PASSWORD || '12345678'
|
|
|
|
declare module '@playwright/test' {
|
|
interface Page {
|
|
goToMenuItem(name: string): Promise<void>
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Core Playwright test base with page extensions but NO automatic login
|
|
* Use this as the foundation for workspace-based tests
|
|
*/
|
|
export const test = base.extend<{ page: Page; _quarantine: void }>({
|
|
page: async ({ page }, use) => {
|
|
// Add custom methods to the page object
|
|
page.goToMenuItem = async function (name: Identifier): Promise<void> {
|
|
await new Navigation(page).openMenuItem(name)
|
|
}
|
|
|
|
// Pass the extended page to the test
|
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
await use(page)
|
|
},
|
|
|
|
// Auto fixture: skip a `mode: "skip"` quarantined test before its body runs.
|
|
// titlePath starts with the file name, so slice(1) is the describe/test name.
|
|
// Skip enforcement rides this base, so a spec must import `test` from here (or
|
|
// a base that extends it), not straight from `@playwright/test`, or its skip
|
|
// entries silently no-op. `mode: "run"` needs no base (the reporter sees all).
|
|
_quarantine: [
|
|
// eslint-disable-next-line no-empty-pattern -- Playwright fixtures require the deps arg; we use none.
|
|
async ({}, use) => {
|
|
if (quarantineEntries.length > 0) {
|
|
const info = test.info()
|
|
const decision = decideForTest(quarantineEntries, info.file, info.titlePath.slice(1))
|
|
if (decision?.mode === 'skip') {
|
|
// eslint-disable-next-line no-console
|
|
console.warn(`[quarantine] skipping ${decision.label}`)
|
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
test.skip(true, decision.label)
|
|
}
|
|
}
|
|
await use(undefined)
|
|
},
|
|
{ auto: true },
|
|
],
|
|
})
|
|
|
|
export { expect } from '@playwright/test'
|