Parcours Playwright (make test-browser), toast qui ne bloque plus les touches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
41d5e44daa
commit
e02d8f315a
@@ -55,6 +55,25 @@ lint: $(TSC) ## Vérifie les types (JSDoc), la syntaxe et les scripts shell
|
||||
else docker run --rm -v "$(CURDIR):/mnt:ro" -w /mnt $(SHELLCHECK_IMAGE) scripts/*.sh tests/*.sh; fi
|
||||
@echo "Lint : OK"
|
||||
|
||||
# Parcours dans un vrai navigateur (ADR 0007) : Chromium de l'image Playwright,
|
||||
# le paquet playwright (Apache-2.0) installé dans build/browser-tools, jamais
|
||||
# publié. Captures 412×915 et poids transféré dans build/shots/.
|
||||
PLAYWRIGHT_VERSION := 1.48.2
|
||||
PLAYWRIGHT_IMAGE := mcr.microsoft.com/playwright:v$(PLAYWRIGHT_VERSION)-noble
|
||||
BROWSER_TOOLS := build/browser-tools
|
||||
PLAYWRIGHT := $(BROWSER_TOOLS)/node_modules/playwright/package.json
|
||||
|
||||
$(PLAYWRIGHT):
|
||||
npm install --silent --no-audit --no-fund --prefix $(BROWSER_TOOLS) playwright@$(PLAYWRIGHT_VERSION)
|
||||
|
||||
.PHONY: test-browser
|
||||
test-browser: $(PLAYWRIGHT) ## Parcours Playwright de l'app, captures dans build/shots/ (Docker)
|
||||
@mkdir -p build/shots
|
||||
@docker run --rm --init --ipc=host -u "$$(id -u):$$(id -g)" -e HOME=/tmp \
|
||||
-v "$(CURDIR)/$(APP_DIR):/app:ro" -v "$(CURDIR)/tests/browser:/tests:ro" \
|
||||
-v "$(CURDIR)/$(BROWSER_TOOLS):/tools:ro" -v "$(CURDIR)/build/shots:/shots" \
|
||||
$(PLAYWRIGHT_IMAGE) node /tests/parcours.cjs /app /shots
|
||||
|
||||
test-site: ## Construit l'image de production en local et vérifie ce qu'elle sert (Docker)
|
||||
@tests/test_site.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user