The tree carried uncommitted work from several areas (web push, mobile screens, admin charts, test-hygiene cleanup, CI and map docs). It is landed as one commit so the release pipeline can start from a clean tree; the desktop transcript-correction behaviour shipped in the previous commit and is unchanged here.
33 lines
1.4 KiB
TypeScript
33 lines
1.4 KiB
TypeScript
// apps/desktop/tests/e2e/onboarding.spec.ts
|
|
// 첫 실행 온보딩 계약: 우회하지 않은 첫 실행은 진행을 강제하고, 사용 방식 두 가지를 제시하며,
|
|
// 온라인을 고르면 로그인/회원가입 폼이 나타난다.
|
|
// 로그인 실패/성공 결과는 백엔드(Supabase)에 달려 있어 E2E 에서 단정하지 않는다 — 그 계약은 Edge/웹 테스트가 맡는다.
|
|
|
|
import { expect, expectNoRuntimeErrors, test } from './support/electron-app'
|
|
|
|
test.describe('첫 실행 온보딩', () => {
|
|
test.use({ onboardingCompleted: false })
|
|
|
|
test('사용 방식 두 가지를 제시한다', async ({ mainWindow }) => {
|
|
const dialog = mainWindow.window.getByRole('dialog')
|
|
|
|
await expect(dialog).toBeVisible()
|
|
await expect(dialog.getByTestId('onboarding-mode-local')).toBeVisible()
|
|
await expect(dialog.getByTestId('onboarding-mode-online')).toBeVisible()
|
|
|
|
expectNoRuntimeErrors(mainWindow)
|
|
})
|
|
|
|
test('온라인을 고르면 로그인·회원가입 폼이 열린다', async ({ mainWindow }) => {
|
|
const dialog = mainWindow.window.getByRole('dialog')
|
|
await expect(dialog).toBeVisible()
|
|
|
|
await dialog.getByTestId('onboarding-mode-online').click()
|
|
|
|
await expect(dialog.getByRole('tab')).toHaveCount(2)
|
|
await expect(dialog.locator('input[type="email"]')).toBeVisible()
|
|
await expect(dialog.locator('input[type="password"]')).toBeVisible()
|
|
|
|
expectNoRuntimeErrors(mainWindow)
|
|
})
|
|
})
|