perf(test): test performance improvements
This commit is contained in:
parent
e74fe354d0
commit
e82b6167ef
5 changed files with 116 additions and 8 deletions
|
|
@ -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 ?? [])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue