perf(test): test performance improvements

This commit is contained in:
Robert Perce 2026-04-07 22:58:28 -05:00
parent e74fe354d0
commit e82b6167ef
5 changed files with 116 additions and 8 deletions

View file

@ -1,3 +1,4 @@
import { expect } from '@playwright/test';
import type { Page } from '@playwright/test';
export const login = async (page: Page) => {
@ -15,9 +16,9 @@ type UserFields = {
};
export const verifyCreateUser = async (page: Page, fields: UserFields) => {
await page.getByRole('button', { name: /add contact/i }).click();
await page.waitForResponse('/contact/new');
// TODO this is stupid but playwright kept filling while alpine was initializing
await page.waitForTimeout(200);
await expect(page.locator('#alpine-loaded')).not.toHaveAttribute('x-cloak');
const { names, ...simple } = fields;
for (const name of (names ?? [])) {