coffeeshop-acceptance-tests
БесплатноБез исполняемых скриптовНе проверен**WORKFLOW SKILL** — Run the coffeeshop-jev WebApp UI acceptance tests (WebApp/acceptance, scenarios A1-A8, driven with playwright-cli against a live `aspire…
от thangchung★ 27 звёзд на GitHubОб этом скилле
coffeeshop-jev acceptance tests
Executable UI spec for WebApp/: WebApp/acceptance/A1..A8_*.js, run by WebApp/acceptance/run.sh. Scenario meanings and per-provider results: jev_routing_research.md §17.10 (the single source of truth). UX of record: ui-prototypes/.
Run all commands from the repo root coffeeshop-jev/ unless said otherwise. Keep command output short: pipe through cut -c1-260, tail, or grep, and never print API keys.
0. Preconditions (check, don't assume)
- Tools:
aspire --version,playwright-cli --help | head -3,dotnet --list-sdks(needs11.0.100-rc.2…or newer,global.jsonpins it). - Config:
src/AppHost/appsettings.Development.json(gitignored, may start with a BOM: read it withencoding='utf-8-sig') hasParameterswithdecision-model-providerand that provider'sdecision-model-{provider}-url/-api-key(-modelformicrosoft), plusopenai-base-url,openai-model,openai-api-key. Print only the names and the provider value, never the keys. - The provider is reachable:
layaneedslaya-serveon:8002(GET /health),openjeva LAN host (often unreachable from a sandbox),microsofta Foundry deployment (az cognitiveservices account deployment list -g <rg> -n <account>shows the deployment name to use),typesafemodeljev-latest. - Offline gate first (fast, catches most regressions):
dotnet build CoffeeShop.slnx -warnaserrorthendotnet test tests/CoffeeShop.Tests. If these fail, fix them before any UI run.
1. Run
aspire stop >/dev/null 2>&1; sleep 2 # no stale stack
aspire run --detach --non-interactive --nologo --format Json >/dev/null 2>&1
sleep 35 # catalog, counter, web
aspire describe --format Json | python3 -c "import sys,json;t=sys.stdin.read();d=json.loads(t[t.index('{'):]);print([(r['name'][:8],r.get('healthStatus')) for r in d['resources'] if r['name'].startswith(('web','counter','catalog'))])"
( cd "$TMPDIR" 2>/dev/null || cd /tmp; playwright-cli close >/dev/null 2>&1; playwright-cli open http://localhost:5200 >/dev/null 2>&1 )
WebApp/acceptance/run.sh # A1..A8 (a few minutes: real decision model + LLM)
WebApp/acceptance/run.sh A1 A4 # or only some
- Web is
http://localhost:5200, counter APIhttp://localhost:5100. If a resource is not Healthy after ~60 s, go to section 3 before running anything. playwright-cli openmust have run (it writes.playwright-cli/in the current directory: use a scratch directory, not the repo). Ifrun.shprints no result lines, the browser session is closed: reopen it.- Success per scenario:
"A1 ok". Failure:### Errorand one line, e.g.ASSERT: all 5 ticket steps doneorTimeoutError: locator.waitFor.run.shexits non-zero on any failure. - When finished (pass or give up):
aspire stop,playwright-cli close.
2. Pass → report
State per scenario ok/failed, the provider and model used (from the order details provider / model), and the offline test count. Do not claim a provider "passes" for scenarios you did not run. Unknowns stay unknown.
3. Failure workflow: collect, diagnose, fix, re-run
Do these in order for each failed scenario, stop at the first step that explains it, and keep a short note of what you saw.
3.1 Re-run alone, to rule out flakiness
WebApp/acceptance/run.sh A4 (twice if the failure was a TimeoutError). Known flaky classes are in 3.4. A scenario that passes alone but fails in the suite usually depends on state left by a previous one (guest id, cart).
3.2 Collect evidence (all cheap, run them before reading any code)
| Evidence | Command |
|---|---|
| Resource health | aspire describe --format Json (as above) |
| Counter logs (decision-model failures, workflow errors) | aspire logs counter -n 80 2>&1 | grep -iE "warn|fail|error|decision" | cut -c1-300 |
| Web logs (Blazor circuit crashes, render exceptions) | aspire logs web -n 80 2>&1 | grep -iE "exception|error|fail| at " | cut -c1-300 |
| Order traces (what the counter decided and why) | GET http://localhost:5100/orders and /orders/{n}: print result.status and each trace.audit row (gate, gate-error, clarify, result) and trace.agUi. A gate-error row carries provider / model: HTTP <status> (POST <url>) <server message>. Use ctx_execute / a short script, not curl, if your shell blocks curl |
| What the page showed | playwright-cli screenshot --filename=fail.png, then look at it; playwright-cli snapshot; playwright-cli console (browser errors; [ERROR] … unhandled exception on the current circuit means a server render crash: read the web logs) |
| The failing assertion's inputs | re-run the scenario's steps by hand with playwright-cli run-code "async (page) => { … return text }", printing .innerText() of the ticket ([data-testid=order-ticket]), the chat (`.sc- |
Установить coffeeshop-acceptance-tests в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл coffeeshop-acceptance-tests?
**WORKFLOW SKILL** — Run the coffeeshop-jev WebApp UI acceptance tests (WebApp/acceptance, scenarios A1-A8, driven with playwright-cli against a live `aspire run` stack) and, when one fails, collect logs, order traces and screenshots, find the cause, fix it and re-run. WHEN: "run the acceptance tests", "run A1", "UI acceptance", "check the WebApp end to end", "an acceptance scenario failed", "verify a decision model provider", "smoke test the coffee shop". INVOKES: aspire CLI, playwright-cli, dotnet test, the counter API. FOR SINGLE OPERATIONS: use the aspire or playwright-cli skills directly.
Как установить скилл coffeeshop-acceptance-tests?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл coffeeshop-acceptance-tests запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic