The sheet was not what it wanted to be, so writing is plain text again: about 73 characters to the line, centred, no border and no shadow. The fixed page belongs to the canvas — a stroke has to land in the same place on every screen, which needs one agreed page — so it appears exactly when something is on it or about to be: in Draw, or when the note already has a drawing. The cap lives in the stylesheet rather than on a container, so it holds on a page as well as off one. Emoji are gone from the note rows and the sidebar. They are drawn by the operating system, so they looked different on every machine and were loud enough that a row's picture caught the eye before its title did. Rows are tighter by three pixels of padding. The trash button no longer stands permanently in the danger colour beside the star, which made the most destructive control the loudest thing on screen. It sits behind a divider and turns red under the pointer, when it is about to be used. On a phone the toolbar's fourteen controls scrolled sideways, so the ones at the end could only be reached by dragging the bar and nothing said they were there. Nine remain, plus a menu holding the headings, quote, code and undo. A new `sync` suite proves what was assumed: a PDF written on one device — the document, the drawing and the pinned notes — reaches a second one. Two browser contexts are two devices. Both search suites read a row's title as the second line of its text, which only worked while the icon was itself a text emoji; they read it by name now. 218 unit tests, 249 browser checks across twelve suites. 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 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
|