Compare commits
3 Commits
920a246d77
...
fix/e2e-te
| Author | SHA1 | Date | |
|---|---|---|---|
| 37c4e0c99e | |||
| f27f671fe6 | |||
| d6218f2e07 |
@@ -16,6 +16,14 @@ from app.main import app
|
|||||||
from app.core.database import Base, get_db
|
from app.core.database import Base, get_db
|
||||||
from app.core.admin_database import get_admin_db
|
from app.core.admin_database import get_admin_db
|
||||||
from app.core.config import settings
|
from app.core.config import settings
|
||||||
|
# Import every model module so all tables are registered with Base.metadata
|
||||||
|
# before the test_db fixture calls create_all. app.main imports models lazily
|
||||||
|
# (inside scheduler functions and route modules), which is fine at runtime
|
||||||
|
# but leaves the metadata incomplete at fixture-setup time — surfacing as
|
||||||
|
# "relation X does not exist" errors for any model whose route/scheduler
|
||||||
|
# hasn't been loaded yet. The `from app import models` form avoids
|
||||||
|
# shadowing the `app` FastAPI instance imported just above.
|
||||||
|
from app import models as _models # noqa: F401
|
||||||
|
|
||||||
# Disable invite code requirement for tests
|
# Disable invite code requirement for tests
|
||||||
settings.REQUIRE_INVITE_CODE = False
|
settings.REQUIRE_INVITE_CODE = False
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ test.describe('command palette smoke tests', () => {
|
|||||||
|
|
||||||
await flowpilotOption.click()
|
await flowpilotOption.click()
|
||||||
|
|
||||||
await expect(page).toHaveURL(/\/assistant/)
|
// Phase 1 of the FlowPilot migration renamed /assistant to /pilot.
|
||||||
|
// /assistant still 301-redirects to /pilot, so accept either landing URL.
|
||||||
|
await expect(page).toHaveURL(/\/(pilot|assistant)/)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -24,9 +24,13 @@ test.describe('session history smoke tests', () => {
|
|||||||
await page.goto('/sessions')
|
await page.goto('/sessions')
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('heading', { name: 'Sessions', exact: true }),
|
page.getByRole('heading', { name: 'Session History', exact: true }),
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
|
|
||||||
|
// Default tab on /sessions is "AI Sessions"; flow sessions live behind
|
||||||
|
// the "Flow Sessions" tab and only that tab exposes ticket/client filters.
|
||||||
|
await page.getByRole('button', { name: 'Flow Sessions' }).click()
|
||||||
|
|
||||||
await page.getByPlaceholder('Search by ticket number...').fill(ticketNumber)
|
await page.getByPlaceholder('Search by ticket number...').fill(ticketNumber)
|
||||||
await page.getByPlaceholder('Search by client name...').fill(clientName)
|
await page.getByPlaceholder('Search by client name...').fill(clientName)
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ test.describe('authenticated navigation smoke tests', () => {
|
|||||||
await page.goto('/sessions')
|
await page.goto('/sessions')
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('heading', { name: 'Sessions', exact: true }),
|
page.getByRole('heading', { name: 'Session History', exact: true }),
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ test.describe('authenticated navigation smoke tests', () => {
|
|||||||
await page.goto('/account')
|
await page.goto('/account')
|
||||||
|
|
||||||
await expect(
|
await expect(
|
||||||
page.getByRole('heading', { name: 'Account Settings' }),
|
page.getByRole('heading', { name: 'Account Management' }),
|
||||||
).toBeVisible()
|
).toBeVisible()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -18,9 +18,17 @@ test.describe('session resume smoke tests', () => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await page.goto('/trees')
|
// Resume flow moved off /trees onto the Flow Sessions tab of /sessions
|
||||||
|
// during the FlowPilot migration. The destination (/trees/:id/navigate)
|
||||||
|
// is unchanged — only the entry point shifted.
|
||||||
|
await page.goto('/sessions')
|
||||||
|
await expect(
|
||||||
|
page.getByRole('heading', { name: 'Session History', exact: true }),
|
||||||
|
).toBeVisible()
|
||||||
|
await page.getByRole('button', { name: 'Flow Sessions' }).click()
|
||||||
|
// Active sub-tab is the default and surfaces in-progress sessions.
|
||||||
|
|
||||||
const resumeCard = page.locator('.bg-card').filter({ hasText: tree.name }).filter({ hasText: 'Resume' }).first()
|
const resumeCard = page.locator('.bg-card').filter({ hasText: tree.name }).first()
|
||||||
await expect(resumeCard).toBeVisible()
|
await expect(resumeCard).toBeVisible()
|
||||||
await resumeCard.getByRole('button', { name: 'Resume' }).first().click()
|
await resumeCard.getByRole('button', { name: 'Resume' }).first().click()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user