chore: land in-progress workspace changes before 1.16.2

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.
This commit is contained in:
Yun Chan 2026-11-05 21:58:44 +09:00
parent 9c2b6a9782
commit 7fe49c437e
144 changed files with 3760 additions and 4523 deletions

View file

@ -1,74 +1,33 @@
import { test, expect, _electron as electron } from '@playwright/test';
// apps/desktop/tests/e2e/onboarding.spec.ts
// 첫 실행 온보딩 계약: 우회하지 않은 첫 실행은 진행을 강제하고, 사용 방식 두 가지를 제시하며,
// 온라인을 고르면 로그인/회원가입 폼이 나타난다.
// 로그인 실패/성공 결과는 백엔드(Supabase)에 달려 있어 E2E 에서 단정하지 않는다 — 그 계약은 Edge/웹 테스트가 맡는다.
test.describe('Electron Application', () => {
test.describe.configure({ mode: 'serial' });
let electronApp: any;
let window: any;
import { expect, expectNoRuntimeErrors, test } from './support/electron-app'
test.beforeAll(async () => {
electronApp = await electron.launch({
args: ['out/main/index.js', '--user-data-dir=C:/Users/encep/AppData/Local/Temp/playwright-d3ro-test-1786110374422-312'],
env: {
...process.env,
NODE_ENV: 'test',
},
});
let found = false;
for (const w of electronApp.windows()) {
await w.waitForLoadState('domcontentloaded');
const t = await w.title();
console.log('Window title:', t);
if (t === 'D3RO Voice' || t === 'd3ro-voice') {
window = w;
found = true;
break;
}
}
if (!found) {
window = await electronApp.waitForEvent('window', {
predicate: async (page: any) => {
await page.waitForLoadState('domcontentloaded');
const t = await page.title();
console.log('New window title:', t);
return t === 'D3RO Voice' || t === 'd3ro-voice';
}
});
}
});
test.describe('첫 실행 온보딩', () => {
test.use({ onboardingCompleted: false })
test.afterAll(async () => {
if (electronApp) {
await electronApp.close();
}
});
test('사용 방식 두 가지를 제시한다', async ({ mainWindow }) => {
const dialog = mainWindow.window.getByRole('dialog')
test('should display Onboarding Modal on first run', async () => {
// Wait for the modal to be visible
const isModalVisible = await window.locator('text="D3RO Voice 시작하기"').isVisible();
expect(isModalVisible).toBeTruthy();
await expect(dialog).toBeVisible()
await expect(dialog.getByTestId('onboarding-mode-local')).toBeVisible()
await expect(dialog.getByTestId('onboarding-mode-online')).toBeVisible()
const emailInput = window.locator('input[type="email"]');
const passwordInput = window.locator('input[type="password"]');
await expect(emailInput).toBeVisible();
await expect(passwordInput).toBeVisible();
});
expectNoRuntimeErrors(mainWindow)
})
test('should show error when login fails', async () => {
const emailInput = window.locator('input[type="email"]');
const passwordInput = window.locator('input[type="password"]');
const submitBtn = window.locator('button:has-text("로그인 완료")');
test('온라인을 고르면 로그인·회원가입 폼이 열린다', async ({ mainWindow }) => {
const dialog = mainWindow.window.getByRole('dialog')
await expect(dialog).toBeVisible()
await emailInput.fill('fake@example.com');
await passwordInput.fill('wrongpassword');
await submitBtn.click();
await dialog.getByTestId('onboarding-mode-online').click()
// In a real e2e test, we either expect success or error depending on backend.
// For now, we wait for an error message or success phase.
const errorMsg = window.locator('text="인증에 실패하였습니다"');
if (await errorMsg.isVisible()) {
expect(await errorMsg.isVisible()).toBeTruthy();
}
});
});
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)
})
})