Funnel FuturistFunnel Futurist
← Return to C17
0%
── OPTIONAL READING · AIOS DEEP OPERATOR CERTIFICATION ──

Exercise starter: Example Cycle Works job board (fictional)

About 1 min read

The starting point for the practical exercise. Python 3.9 or later, standard library only.

FileWhat it is
`jobs.json`Twelve fictional jobs, three mechanics, one snapshot time
`job_board.py`Renders `index.html` from the data. This is the file you redesign
`test_job_board.py`The functional contract. Seven tests. Do not edit them
python3 job_board.py            # writes index.html beside it
python3 -m unittest -v          # the contract: 7 tests, all must pass before and after your redesign

For the empty state, render an empty list: copy `jobs.json`, set `"jobs": []`, and run `python3 job_board.py empty.json empty.html`.

The tests read stable hooks (`data-job-id`, `data-status`, `data-count`, `data-external`, `data-blocker`, `data-mechanic`, `data-open-count`, `data-empty`, `data-snapshot`), not layout. Three pieces of visible text are part of the contract too:

  • each blocked job's element contains the word "Blocked" (a coloured chip with no word fails);
  • each quote link's text names the quote tool, "QuoteDesk";
  • no link, button or input says "approve", because approval happens in QuoteDesk.

Keep those and you can change the layout, grouping, type, colour and density freely. That is also why the tests cannot tell you whether the result looks right.

Starter source files