Some checks failed
CI Pipeline / Code Quality & Typecheck (push) Waiting to run
CI Pipeline / Test Suite (macos-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (ubuntu-latest) (push) Blocked by required conditions
CI Pipeline / Test Suite (windows-latest) (push) Blocked by required conditions
CI Pipeline / Build Validation (admin) (push) Blocked by required conditions
CI Pipeline / Build Validation (desktop) (push) Blocked by required conditions
Deploy Landing Page / deploy (push) Blocked by required conditions
Deploy Landing Page / build (push) Waiting to run
Release & Packaging Pipeline / Build & Publish Admin Docker Image (push) Failing after 8s
Release & Code Signing CA Pipeline / build-and-sign-windows (push) Failing after 1m51s
Build macOS / Build & Package (macOS) (push) Failing after 4s
Build macOS / Build & Package (macOS)-1 (push) Failing after 5s
Release & Code Signing CA Pipeline / build-and-sign-macos (push) Failing after 3s
Release & Packaging Pipeline / Package macOS Desktop App (push) Failing after 4s
Release & Packaging Pipeline / Package Windows Desktop App (push) Failing after 2m28s
Release & Packaging Pipeline / Publish Official GitHub Release (push) Has been skipped
36 lines
1.5 KiB
JavaScript
36 lines
1.5 KiB
JavaScript
const fs = require('fs');
|
|
const path = require('path');
|
|
const files = fs.readdirSync('tests/e2e').filter(f => f.endsWith('.spec.ts') && f !== 'onboarding.spec.ts');
|
|
|
|
files.forEach(file => {
|
|
const p = path.join('tests/e2e', file);
|
|
let content = fs.readFileSync(p, 'utf8');
|
|
content = content.replace(
|
|
/\/\/ Bypass onboarding by filling it if visible[\s\S]*?\} catch\(e\) \{\n \/\/ Ignore if not found\n \}/g,
|
|
`// Bypass onboarding by filling it if visible
|
|
try {
|
|
const emailInput = window.locator('input[type="email"]');
|
|
await emailInput.waitFor({ state: 'visible', timeout: 3000 });
|
|
|
|
// Mock the login API to always succeed
|
|
await window.evaluate(() => {
|
|
if (window.electronAPI && window.electronAPI.onlineAuth) {
|
|
window.electronAPI.onlineAuth.login = async () => ({ success: true, data: { user: { email: 't@t.com' }, token: 'm' } });
|
|
}
|
|
});
|
|
|
|
await emailInput.fill('test@test.com');
|
|
await window.locator('input[type="password"]').fill('password');
|
|
await window.locator('button', { hasText: '로그인 완료' }).click();
|
|
const startBtn = window.locator('button', { hasText: '앱 시작하기' });
|
|
await startBtn.waitFor({ state: 'visible', timeout: 3000 });
|
|
await startBtn.click();
|
|
|
|
// Wait for the modal to disappear
|
|
await startBtn.waitFor({ state: 'hidden', timeout: 3000 });
|
|
} catch(e) {
|
|
// Ignore if not found
|
|
}`
|
|
);
|
|
fs.writeFileSync(p, content);
|
|
});
|