Files
2026-07-13 13:20:22 +08:00

28 lines
876 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* App Launch basic smoke tests.
*
* Verifies the Electron window opens, the renderer loads, and no
* critical console errors are thrown on startup.
*/
import { test, expect } from '../fixtures';
import { createErrorCollector, waitForSettle } from '../helpers';
test.describe('App Launch', () => {
test('window opens and has a title', async ({ page }) => {
const title = await page.title();
expect(title).toBeTruthy();
});
test('renderer loads successfully', async ({ page }) => {
await page.waitForSelector('body', { state: 'visible' });
const body = await page.locator('body').textContent();
expect(body).toBeTruthy();
});
test('no uncaught console errors on load', async ({ page }) => {
const collector = createErrorCollector(page);
await waitForSettle(page);
expect(collector.critical()).toHaveLength(0);
});
});