refactor: cloak elements that need alpine loaded
This commit is contained in:
parent
7b70a10463
commit
231eee3e10
7 changed files with 16 additions and 17 deletions
|
|
@ -16,9 +16,7 @@ type UserFields = {
|
|||
};
|
||||
export const verifyCreateUser = async (page: Page, fields: UserFields) => {
|
||||
await page.getByRole('button', { name: /add contact/i }).click();
|
||||
await page.waitForResponse('/contact/new');
|
||||
|
||||
await expect(page.locator('#alpine-loaded')).not.toHaveAttribute('x-cloak');
|
||||
await page.waitForURL(/contact\/\d+\/edit$/);
|
||||
|
||||
const { names, ...simple } = fields;
|
||||
for (const name of (names ?? [])) {
|
||||
|
|
@ -31,6 +29,6 @@ export const verifyCreateUser = async (page: Page, fields: UserFields) => {
|
|||
}
|
||||
|
||||
await page.getByRole('button', { name: /save/i }).click();
|
||||
await page.waitForResponse(/\/contact\/\d+/);
|
||||
await page.waitForURL(/contact\/\d+$/);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue