Migrate from Cypress to Playwright

This commit is contained in:
Przemek Więch
2026-05-06 11:51:30 +02:00
parent 664ca69fb3
commit d427300ddf
28 changed files with 740 additions and 1403 deletions

22
tests/search.spec.ts Normal file
View File

@@ -0,0 +1,22 @@
import {expect, test} from '@playwright/test';
import {setupGedcomRoute} from './helpers';
test.describe('Search functionality', () => {
test.beforeEach(async ({context}) => {
await setupGedcomRoute(context);
});
test('Search works', async ({page}) => {
await page.goto('/#/view?url=https%3A%2F%2Fexample.org%2Ffamily.ged');
await expect(page.locator('#content')).not.toContainText('Chike');
const searchInput = page.getByPlaceholder('Search for people');
await searchInput.fill('chik');
// Wait for the debounced suggestion panel to render.
await expect(page.locator('.results')).toContainText('Chike');
await searchInput.press('Enter');
await expect(page.locator('#content')).toContainText('Chike');
});
});