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.
90 lines
3.7 KiB
TypeScript
90 lines
3.7 KiB
TypeScript
import { expect, test } from '../utils/workspace-test-base'
|
|
|
|
const preflightSuccessResponse = {
|
|
django: true,
|
|
redis: true,
|
|
plugins: true,
|
|
celery: true,
|
|
datastore: true,
|
|
kafka: true,
|
|
db: true,
|
|
initiated: true,
|
|
cloud: false,
|
|
demo: false,
|
|
realm: 'hosted-datastore',
|
|
region: null,
|
|
available_social_auth_providers: { github: false, gitlab: false, 'google-oauth2': false },
|
|
can_create_org: true,
|
|
email_service_available: true,
|
|
slack_service: { available: false, client_id: null },
|
|
object_storage: true,
|
|
}
|
|
|
|
test.describe('Preflight', () => {
|
|
test('Preflight experimentation', async ({ page }) => {
|
|
await page.route(/_preflight/, async (route) => {
|
|
await route.fulfill({ json: preflightSuccessResponse })
|
|
})
|
|
|
|
// Clear session cookies instead of logout for preflight tests
|
|
await page.context().clearCookies()
|
|
await page.goto('/preflight')
|
|
|
|
await page.locator('[data-attr=preflight-experimentation]').click()
|
|
|
|
await expect(page.locator('[data-attr=preflight-refresh]')).toBeVisible()
|
|
// expand rows
|
|
await page.locator('.Preflight__check-summary .Button').click()
|
|
await expect(page.locator('.PreflightItem [data-attr=caption]')).toContainText(
|
|
'Not required for experimentation mode'
|
|
)
|
|
await expect(page.locator('[data-attr=preflight-complete]')).toBeVisible()
|
|
await page.locator('[data-attr=preflight-complete]').click()
|
|
await expect(page).toHaveURL(/.*\/signup/)
|
|
})
|
|
|
|
test('Preflight live mode', async ({ page }) => {
|
|
await page.route(/_preflight/, async (route) => {
|
|
await route.fulfill({ json: preflightSuccessResponse })
|
|
})
|
|
|
|
// Clear session cookies instead of logout for preflight tests
|
|
await page.context().clearCookies()
|
|
await page.goto('/preflight')
|
|
|
|
await page.locator('[data-attr=preflight-live]').click()
|
|
await expect(page.locator('.PreflightItem')).toHaveCount(10)
|
|
await expect(page.locator('[data-attr="status-text"]:has-text("Validated")')).toHaveCount(9)
|
|
await expect(page.locator('[data-attr="status-text"]:has-text("Warning")')).toHaveCount(1)
|
|
await expect(page.locator('.PreflightItem [data-attr=caption]')).toContainText(
|
|
'Set up before ingesting real user data'
|
|
)
|
|
await expect(page.locator('[data-attr=preflight-complete]')).toBeVisible()
|
|
})
|
|
|
|
test('Preflight can have errors too', async ({ page }) => {
|
|
await page.route(/_preflight/, async (route) => {
|
|
await route.fulfill({ json: { ...preflightSuccessResponse, celery: false } })
|
|
})
|
|
|
|
// Clear session cookies instead of logout for preflight tests
|
|
await page.context().clearCookies()
|
|
await page.goto('/preflight')
|
|
|
|
await page.locator('[data-attr=preflight-live]').click()
|
|
await expect(page.locator('.PreflightItem')).toHaveCount(10)
|
|
await expect(page.locator('[data-attr="status-text"]:has-text("Validated")')).toHaveCount(8)
|
|
await expect(page.locator('[data-attr="status-text"]:has-text("Warning")')).toHaveCount(1)
|
|
await expect(page.locator('[data-attr="status-text"]:has-text("Error")')).toHaveCount(1)
|
|
await expect(page.locator('.PreflightItem [data-attr=caption]')).toContainText(
|
|
'Set up before ingesting real user data'
|
|
)
|
|
await expect(page.locator('[data-attr=preflight-complete]')).not.toBeVisible()
|
|
await expect(
|
|
page.locator(
|
|
'.Preflight__cannot-continue:has-text("All required checks must pass before you can continue")'
|
|
)
|
|
).toHaveCount(1)
|
|
})
|
|
})
|