feedBack/tests/browser/basic-load.spec.ts
2026-06-16 18:47:13 +02:00

26 lines
728 B
TypeScript

import { test, expect } from '@playwright/test';
test('app loads', async ({ page }) => {
await page.goto('/');
await page.waitForSelector('.screen.active', { timeout: 10000 });
// Check if the page loaded
const title = await page.title();
expect(title).toBe('Slopsmith');
});
test('check if window has any shortcuts', async ({ page }) => {
await page.goto('/');
await page.waitForSelector('.screen.active', { timeout: 10000 });
// Wait a bit for JS to load
await page.waitForTimeout(2000);
// Check if the keyboard shortcuts system is loaded
const hasShortcuts = await page.evaluate(() => {
return typeof window._listShortcuts === 'function';
});
expect(hasShortcuts).toBe(true);
});