mirror of
https://github.com/hanzoai/insights.git
synced 2026-10-30 16:15:31 +00:00
The rule table mapped HOG_ -> FN_ ahead of any POSTHOG rule, so POSTHOG_FOO split into POST + HOG_ and came out POSTFN_FOO. Nothing sets that. The live pods set INSIGHTS_SKIP_MIGRATION_CHECKS, which bin/migrate-check reads on the container entrypoint, so the misspelling does not degrade a feature -- it runs migrate --check against a database whose history this tree does not share and the container never starts. Both replacements are measured against the shipped tree rather than chosen: every HOG_ name with a counterpart there is spelled INSIGHTS_ (HOG_QL -> INSIGHTS_QL, HOG_FUNCTION_TEMPLATES -> INSIGHTS_FUNCTION_TEMPLATES, 12 of 12 determinate cases), and FN_ appears in it nowhere. Upstream carries 95 HOG_ tokens and zero FN_ ones, so repairing FN_ back out is exactly the inverse of the bad rule and cannot collide with an upstream name. The rule is fixed for the next convergence, and the tree it already produced is repaired in the same commit -- the codemod is idempotent against its own output, so it cannot undo this itself.
42 lines
1.6 KiB
TypeScript
42 lines
1.6 KiB
TypeScript
import { PlaywrightWorkspaceSetupResult, expect, test } from '../utils/workspace-test-base'
|
|
|
|
test.describe('Toolbar', () => {
|
|
let workspace: PlaywrightWorkspaceSetupResult | null = null
|
|
|
|
test.beforeAll(async ({ playwrightSetup }) => {
|
|
workspace = await playwrightSetup.createWorkspace({ use_current_time: true, skip_onboarding: true })
|
|
})
|
|
|
|
test.beforeEach(async ({ page, playwrightSetup }) => {
|
|
await playwrightSetup.login(page, workspace!)
|
|
})
|
|
|
|
test('Toolbar loads', async ({ page }) => {
|
|
await page.goToMenuItem('toolbar')
|
|
await page.getByText('Add authorized URL').click()
|
|
|
|
const loc = await page.evaluate(() => window.location)
|
|
await page.locator('[data-attr="url-input"]').fill(`http://${loc.host}/demo`)
|
|
await page.locator('[data-attr="url-save"]').click()
|
|
|
|
const href = await page.locator('[data-attr="toolbar-open"]').first().getAttribute('href')
|
|
if (href) {
|
|
await page.goto(href)
|
|
}
|
|
|
|
await expect(page.locator('#__INSIGHTS_TOOLBAR__ .Toolbar')).toBeVisible({ timeout: 5000 })
|
|
})
|
|
|
|
test('Toolbar item in sidebar has launch options', async ({ page }) => {
|
|
await page.goToMenuItem('toolbar')
|
|
await page.getByText('Add authorized URL').click()
|
|
await expect(page).toHaveURL(/.*\/toolbar/)
|
|
})
|
|
|
|
test('Can open add authorized URL form', async ({ page }) => {
|
|
await page.goToMenuItem('toolbar')
|
|
await page.locator('[data-attr="toolbar-add-url"]').click()
|
|
await expect(page.locator('[data-attr="url-input"]')).toBeVisible()
|
|
})
|
|
})
|