castwrightv0.3.0

← All examples

Keys and jitter

Tab completion, a changed prompt, and seeded per-character jitter that still compiles to the same bytes every time.

Keys and jitter

examples/interactive.terminal.yaml
version: 1
seed: 1

terminal:
  title: interactive prompt
  cols: 70
  rows: 20

defaults:
  speed: 35
  pause: 250

steps:
  - type: npm inst
    jitter: 0.15
  - key: tab
  - wait: 150
  - key: enter
  - output: "Installing…\n"
  - wait: 600
  - prompt: "{green}➜{/} "
  - run: npm run build
  - output: |
      {green}✓{/} Build complete
  - wait: 1000
npm inst	
Installing…
➜ npm run build
✓ Build complete
  • type
  • key
  • jitter
  • prompt