refactor: break up web/contact

This commit is contained in:
Robert Perce 2026-02-01 21:56:20 -06:00
parent 2e1fbd00be
commit 57177612ec
8 changed files with 166 additions and 121 deletions

View file

@ -22,7 +22,6 @@ playwright:ui() {
--env DISPLAY="$DISPLAY" \
--volume /tmp/.X11-unix:/tmp/.X11-unix \
--volume "$SCRIPT_DIR":/e2e:rw --env BASE_URL="$BASE_URL" \
--env ASTRO_TELEMETRY_DISABLED=1 \
"mcr.microsoft.com/playwright:$(_playwright_version)" \
/bin/bash -c "cd /e2e && ./Taskfile _test --ui $*"
}
@ -31,7 +30,6 @@ playwright:ci() {
exec docker run \
--interactive --tty --rm --ipc=host --net=host \
--volume "$SCRIPT_DIR":/e2e:rw --env BASE_URL="$BASE_URL" \
--env ASTRO_TELEMETRY_DISABLED=1 \
"mcr.microsoft.com/playwright:$(_playwright_version)" \
bash -c "cd /e2e && ./Taskfile _test $*"
}

View file

@ -4,7 +4,7 @@
"description": "",
"main": "index.js",
"scripts": {
"test": "playwright test --project=firefox && playwright test"
"test": "echo use Taskfile instead"
},
"keywords": [],
"author": "",

View file

@ -16,6 +16,9 @@ type UserFields = {
export const verifyCreateUser = async (page: Page, fields: UserFields) => {
await page.getByRole('button', { name: /add contact/i }).click();
// TODO this is stupid but playwright kept filling while alpine was initializing
await page.waitForTimeout(200);
const { names, ...simple } = fields;
for (const name of (names ?? [])) {
await page.getByRole('textbox', { name: 'New name' }).fill(name);