agentleFS
jingsewujingsewu/open-wes/.claude/skills/smoke-test/SKILL.md

smoke-test

Skill339 starsChanged 10 days agoMITView on GitHub

Run end-to-end smoke tests for Open WES core business flows. Use when asked to run smoke tests, validate a deployment, check if the system is healthy after a change, or diagnose test failures.

24 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use debugging-difficult-bugs, pr-explainer and 2 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dzevsSkill

    debugging-difficult-bugs

    Use early when debugging a medium or hard bug, especially when tests alone may not reveal the real runtime failure. Trigger this before extended TDD iteration when a bug involves runtime state, PTY/terminal ordering, persistence, streaming, async/concurrency, the TUI/manual reproduction, the IPC socket layer, or when a red or newly passing test may not model the real issue. Skip only when the root cause is already directly proven by a stack trace or deterministic test that exercises the real runtime path.

    Also in 3 projects that use this

  • Mathews-TomSkill

    pr-explainer

    Use when a developer asks to explain a pushed PR, walk through a PR stack, understand one stack member, or explain what an AI agent just pushed so they can connect code changes to end-to-end functionality and update domain knowledge. Not for defect review, merge approval, PR-body authoring, or full-repository onboarding.

    Also in 3 projects that use this

  • dzevsSkill

    pr-splitter

    Use when breaking a large, complex, messy, or hard-to-review pull request into multiple smaller PRs; planning stacked PRs; extracting independent changes from a branch; splitting mixed refactor and behavior changes; managing drift after review feedback (operator gate, Codex/swarm second opinion); rebasing follow-up PRs as earlier PRs change; or preserving original branch intent while shipping incrementally.

    Also in 3 projects that use this

  • genomewalkerSkill

    learn

    Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.

    Also in 3 projects that use this

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. 0 are common, 10 are distinctive, and 9 are very specific to this project.

  • 0

    Common

    Most of the 21 edited versions we read keep these.

  • 10

    Distinctive

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Check if Docker services are running: docker compose ps

    line 30
  2. Very specific:

    If not running: HOST_IP=$(hostname -I | awk '{print $1}') docker compose up -d

    line 31
  3. Very specific:

    Wait for health checks: ./e2e-tests/scripts/wait-for-services.sh

    line 32
  4. Very specific:

    If --ci, output JUnit XML path

    line 35
  5. Distinctive:

    Read the current state of relevant frontend pages (AMIS schemas, route paths)

    line 42
  6. Distinctive:

    Read the relevant station handlers and API interfaces

    line 43
  7. Very specific:

    Update the .spec.js file(s) with correct selectors and flow

    line 44
  8. Distinctive:

    Run a dry-run to verify the script is syntactically valid

    line 45
  9. Very specific:

    Read e2e-tests/playwright-report/ or e2e-tests/test-results/

    line 60
  10. Distinctive:

    Check the screenshot at failure point

    line 62
  11. Distinctive:

    Check the error message and stack trace

    line 63
  12. Distinctive:

    If selector changed: find the new selector in the current page source

    line 65
  13. Distinctive:

    If timeout: check if the service is responding

    line 66
  14. Distinctive:

    If data issue: check pre-conditions

    line 67
  15. Very specific:

    Search identities: WStocktakeOrder, WStocktakeOrderDetail, WStocktakeTask, WStocktakeRecord

    line 115
  16. Very specific:

    Test data: All test-created data uses TEST_ prefix, safe for cleanup

    line 122
  17. Distinctive:

    Do NOT hardcode real credentials in test files — use env vars

    line 128
  18. Distinctive:

    Do NOT commit debug screenshots or videos

    line 129
  19. Very specific:

    When updating selectors via /smoke-test generate, read the actual page source first — never guess AMIS selectors

    line 130

“Common” is measured: kept by at least 6 in 10 of the 21 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Smoke Test Skill

Purpose

Validate that the Open WES system's core business flows work end-to-end. Backed by standalone Playwright scripts in e2e-tests/ that can run with or without Claude.

When to Use

  • "run smoke test" / "run the smoke tests"
  • "is the system healthy?"
  • "validate the deployment"
  • "the smoke test failed, help me figure out why"
  • "generate smoke test for [scenario]"

Sub-Commands

/smoke-test run [--ci] [--scenario <name>]

Execute smoke tests.

  • --ci: Run in headless mode with JUnit reporter (for CI)
  • --scenario <name>: Run only a specific scenario (inbound-receiving, outbound-management, station-picking, stocktake-counting)

Steps:

  1. Check if Docker services are running: docker compose ps
  2. If not running: HOST_IP=$(hostname -I | awk '{print $1}') docker compose up -d
  3. Wait for health checks: ./e2e-tests/scripts/wait-for-services.sh
  4. Run Playwright: cd e2e-tests && npx playwright test [--reporter=list]
  5. Report results — pass/fail summary with durations
  6. If --ci, output JUnit XML path

/smoke-test generate [--scenario <name>]

Generate or update Playwright test scripts for given scenarios.

Steps:

  1. Read the current state of relevant frontend pages (AMIS schemas, route paths)
  2. Read the relevant station handlers and API interfaces
  3. Update the .spec.js file(s) with correct selectors and flow
  4. Run a dry-run to verify the script is syntactically valid
  5. Report what was changed

Scenarios available:

  • inbound-receiving — Station receive flow: seed order → scan LPN → SKU → container → accept → "满箱" complete
  • outbound-management — Management outbound order lifecycle
  • station-picking — Station outbound picking flow
  • stocktake-counting — Stocktake: management UI create + execute → station receive → scan SKU → submit qty → order DONE
  • all — All four (default)

/smoke-test diagnose

Analyze the most recent test failure.

Steps:

  1. Read e2e-tests/playwright-report/ or e2e-tests/test-results/
  2. For each failed test:
    • Check the screenshot at failure point
    • Check the error message and stack trace
    • Determine root cause category: selector change, timeout, data issue, service down
  3. If selector changed: find the new selector in the current page source
  4. If timeout: check if the service is responding
  5. If data issue: check pre-conditions
  6. Propose fix — offer to apply it automatically

Project Context

The E2E tests are in e2e-tests/:

e2e-tests/
├── package.json              # Playwright + TypeScript deps
├── playwright.config.js      # Config: chromium, 2-min timeout, sequential
├── tsconfig.json
├── SELECTOR_NOTES.md         # AMIS DOM patterns and known quirks
├── fixtures/
│   └── test-data-factory.js  # TEST_ prefix data creation/cleanup
├── utils/
│   ├── api-client.js         # REST API client for setup/verification
│   └── auth.js               # Token management
├── scenarios/
│   ├── inbound-receiving.spec.js
│   ├── outbound-management.spec.js
│   ├── station-outbound-picking.spec.js
│   └── stocktake-counting.spec.js
└── scripts/
    ├── seed-inbound.js        # Inbound order + target container + RECEIVE mode
    ├── seed-stocktake.js      # Stock container + CONTAINER spec + STOCKTAKE mode
    ├── restore-station-mode.js# Revert workstation 1 to PICKING after inbound/stocktake
    └── wait-for-services.sh   # Health check script for CI

Key Architecture Facts

  • Frontend: React 17 + AMIS 6.5 on port 4001 (dev) or 80 (prod nginx)
  • Gateway: Spring Boot on port 8090, REST API
  • Station API: PUT /api?apiCode=<ApiCodeEnum> with JSON body
  • API codes for outbound: INPUT, UNBIND, TAP_PUT_WALL_SLOT, SPLIT_TASKS, REPORT_ABNORMAL
  • Inbound receive (no station apiCode — the receive UI calls WES inbound REST directly):
    • POST /wms/inbound/plan/query/{identifyNo}/{warehouseCode} — scan LPN/customer order no
    • POST /wms/inbound/plan/accept — accept a line (AcceptRecordDTO)
    • POST /wms/inbound/accept/completeByContainer?containerCode= — "满箱完成收货"
    • POST /wms/basic/container/get — target container lookup (spec + slot)
  • Stocktake:
    • Management wizard: POST /wms/stocktake/order/create — container tab sends containerCode (array); the backend DTO field is containerCode, not containerCodes. A container is only listable in the wizard when its spec type is CONTAINER.
    • POST /wms/stocktake/order/execute — {warehouseCode, orderNos, taskCount} splits the order into tasks
    • POST /wms/stocktake/order/receive — {stocktakeTaskIds, workStationId} (station "领用单据")
    • Station apiCodes: SCAN_BARCODE (SKU), STOCKTAKE_SUBMIT ({detailId, stocktakeQty} where detailId is the stocktake record id)
    • Search identities: WStocktakeOrder, WStocktakeOrderDetail, WStocktakeTask, WStocktakeRecord
    • Station mode: the stocktake page only mounts when the station cache mode is STOCKTAKE; flip w_work_station.work_station_mode and clear both station caches before ONLINE(STOCKTAKE), then restore PICKING afterwards
    • Container arrival is simulated with the station API (CONTAINER_ARRIVED); records are generated per container face by the station cache refresh
  • AMIS page selectors: .cxd-Modal (dialogs; .cxd-Dialog is not emitted by AMIS 6), .cxd-Form, .cxd-Button, .cxd-TextControl-input
  • Test data: All test-created data uses TEST_ prefix, safe for cleanup

Constraints

  • Tests run sequentially (shared state in WMS)
  • Max 2 minutes per test (configured in playwright.config.js)
  • Do NOT hardcode real credentials in test files — use env vars
  • Do NOT commit debug screenshots or videos
  • When updating selectors via /smoke-test generate, read the actual page source first — never guess AMIS selectors

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.