feat(w5): ship v2.0.0 platform sync, undo persistence, and updates
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
import { mkdtempSync, rmSync, existsSync } from 'fs'
|
||||
import { join } from 'path'
|
||||
import { tmpdir } from 'os'
|
||||
import { test, expect } from '@playwright/test'
|
||||
import { launchApp, skipOnboarding } from './helpers'
|
||||
|
||||
test.describe('Auto update', () => {
|
||||
let userDataDir: string
|
||||
|
||||
test.beforeEach(() => {
|
||||
userDataDir = mkdtempSync(join(tmpdir(), 'bilin-e2e-update-'))
|
||||
})
|
||||
|
||||
test.afterEach(() => {
|
||||
if (userDataDir && existsSync(userDataDir)) {
|
||||
try {
|
||||
rmSync(userDataDir, { recursive: true, force: true, maxRetries: 3, retryDelay: 200 })
|
||||
} catch {
|
||||
/* ignore */
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
test('E2E-UPDATE-02: mock update shows banner and download flow', async () => {
|
||||
const app = await launchApp(userDataDir, {
|
||||
BILIN_MOCK_UPDATE: '1',
|
||||
BILIN_MOCK_UPDATE_VERSION: '9.9.9'
|
||||
})
|
||||
const page = await app.firstWindow()
|
||||
await skipOnboarding(page)
|
||||
await expect(page.getByTestId('update-banner')).toBeVisible({ timeout: 15_000 })
|
||||
await page.getByTestId('update-download').click()
|
||||
await expect(page.getByTestId('update-install')).toBeVisible({ timeout: 15_000 })
|
||||
await app.close()
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user