A long table lay straight across the gap between two sheets with a row cut in half, and a shorter one jumped to the next sheet whole leaving the rest of the first blank. Tables are broken between their rows now, which is where a table breaks on paper. The spacer there is a tr with one borderless cell: a div inside a tbody is not something the browser keeps. Its own spacer rows are subtracted again on the next measurement and counted into the shift every block below inherits — miss that and everything under a broken table is measured a page too high. A dialog closed in the middle of an edit if a selection was dragged past its edge: the click lands on the nearest common ancestor of press and release, which is the backdrop, and every dialog read that as "clicked beside me". They remember where the press began now. All ten. A note and a chapter can wear a mark of their own beside the name, chosen from a short list searched by what a thing is for rather than from the system emoji keyboard — a different thing on every machine, and three thousand pictures for a decision that is "which of these is the invoice notebook". A separator takes its own colour and one of five shapes, and a chapter can be divided like the notebook it sits in: both places a chapter is shown draw it with one component now, so it cannot be divisible in the column and not in the unfolded block. Also: a chapter's colour could not be cleared, because the update rode on COALESCE and null there means "leave it alone". A table's header row is legible on the dark theme. Three entries in the table's own menu were still German. Opening a notebook opens its first note, on a wide screen only — on a phone the list is the screen. Fourteen suites green: 364 browser checks, 241 unit tests. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
49 lines
1.5 KiB
Bash
Executable File
49 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Runs the browser suites against a running InkNote.
|
|
#
|
|
# ./e2e/run.sh # all suites
|
|
# ./e2e/run.sh editor drawing # only these
|
|
#
|
|
# Needs the dev stack up (docker compose -f docker-compose.dev.yml up -d) and an
|
|
# admin account to create throwaway users with — marc/geheim123 by default,
|
|
# override with INKNOTE_ADMIN / INKNOTE_ADMIN_PASS.
|
|
set -uo pipefail
|
|
cd "$(dirname "$0")"
|
|
|
|
IMAGE="mcr.microsoft.com/playwright:v1.49.0-noble"
|
|
URL="${INKNOTE_URL:-http://localhost:3000}"
|
|
SUITES=("$@")
|
|
[ ${#SUITES[@]} -eq 0 ] && SUITES=(admin editor search-attachments history drawing export conflict pdf attachments-lifecycle organise chapters tables offline sync)
|
|
|
|
mkdir -p shots
|
|
if [ ! -d node_modules ]; then
|
|
echo "→ installing playwright once"
|
|
docker run --rm -v "$PWD:/w" -w /w "$IMAGE" npm install --no-audit --no-fund >/dev/null
|
|
fi
|
|
|
|
if ! curl -sf -o /dev/null "$URL"; then
|
|
echo "✗ $URL is not answering — start the stack first:"
|
|
echo " docker compose -f docker-compose.dev.yml up -d --build"
|
|
exit 1
|
|
fi
|
|
|
|
failed=()
|
|
for s in "${SUITES[@]}"; do
|
|
echo
|
|
echo "═══ $s ═══"
|
|
docker run --rm --network host \
|
|
-v "$PWD:/w" -v "$PWD/shots:/out" -w /w \
|
|
-e INKNOTE_URL="$URL" \
|
|
-e INKNOTE_ADMIN="${INKNOTE_ADMIN:-marc}" \
|
|
-e INKNOTE_ADMIN_PASS="${INKNOTE_ADMIN_PASS:-geheim123}" \
|
|
"$IMAGE" node "$s.mjs" || failed+=("$s")
|
|
done
|
|
|
|
echo
|
|
if [ ${#failed[@]} -eq 0 ]; then
|
|
echo "═══ all suites passed ═══"
|
|
else
|
|
echo "═══ FAILED: ${failed[*]} ═══"
|
|
exit 1
|
|
fi
|