fix(ui): make chapter bridge manual-only and add release gate
Remove auto chapter-bridge prompt on book/chapter open so users trigger it from the cockpit. Fix AiPanel duplicate import that broke dev builds, and add release smoke tests plus test:release/test:ci scripts. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -136,7 +136,7 @@ test.describe('Cockpit & Knowledge P5', () => {
|
||||
await app.close()
|
||||
})
|
||||
|
||||
test('E2E-BRIDGE-01: new chapter triggers bridge modal', async () => {
|
||||
test('E2E-BRIDGE-01: bridge modal opens from cockpit manually', async () => {
|
||||
const app = await launchApp(userDataDir)
|
||||
const page = await app.firstWindow()
|
||||
await skipOnboarding(page)
|
||||
@@ -150,6 +150,9 @@ test.describe('Cockpit & Knowledge P5', () => {
|
||||
await dismissCockpitIfOpen(page)
|
||||
await page.getByRole('button', { name: '+ 新章' }).click()
|
||||
await dismissCockpitIfOpen(page)
|
||||
await expect(page.locator('[data-testid="bridge-modal"]')).toBeHidden({ timeout: 3000 })
|
||||
await page.locator('[data-testid="topbar-cockpit"]').click()
|
||||
await page.locator('[data-testid="cockpit-bridge-check"]').click()
|
||||
await expect(page.locator('[data-testid="bridge-modal"]')).toBeVisible({ timeout: 10_000 })
|
||||
await expect(page.locator('[data-testid="bridge-previous-tail"]')).toBeVisible({ timeout: 60_000 })
|
||||
await expect(page.locator('[data-testid="bridge-previous-tail"]')).not.toHaveText('(无)')
|
||||
@@ -187,6 +190,9 @@ test.describe('Cockpit & Knowledge P5', () => {
|
||||
await dismissCockpitIfOpen(page)
|
||||
await page.getByRole('button', { name: '+ 新章' }).click()
|
||||
await dismissCockpitIfOpen(page)
|
||||
await expect(page.locator('[data-testid="bridge-modal"]')).toBeHidden({ timeout: 3000 })
|
||||
await page.locator('[data-testid="topbar-cockpit"]').click()
|
||||
await page.locator('[data-testid="cockpit-bridge-check"]').click()
|
||||
await expect(page.locator('[data-testid="bridge-modal"]')).toBeVisible({ timeout: 15_000 })
|
||||
await expect(page.locator('[data-testid="bridge-ai-suggestion"]')).not.toBeEmpty({ timeout: 240_000 })
|
||||
await app.close()
|
||||
|
||||
Reference in New Issue
Block a user