The gate app
The test app that slice gates, ExUnit and the browser suites run on.
apps/gate is an app of RecTypes in YAML alone. It proves that a RecType with no frontend code works in the desk, and it gives every platform feature something to test against. Production releases never contain it.
| Build | Has gate |
|---|---|
Dev and test builds of the umbrella in platform/, such as mix test | Yes |
Images built with CARDINAL_DEV_BUILD=1, such as the e2e and load stacks | Yes |
MIX_ENV=prod mix release | No. CI checks that Gate is not loaded |
What it ships
| Part | Used by |
|---|---|
| 49 RecTypes, such as Gate Item, Gate Invoice, Gate Offer, Gate Task and Gate Settings | Record, permission, naming, workflow and list tests |
| 16 roles, such as Gate User, Gate Editor, Gate Manager and the Lead and Matrix roles | Permission tests |
Fixtures: the Gate Bill Classic print format, four Code Reports, the xx and xx-rtl pseudo-languages, a Gate Billing dashboard | Print, report, translation and dashboard tests |
www/hello.html.j2, www/plain.html.j2, a redirect from /old-hello/(.*) and a route rule from /greet/<path:n> | Website routing tests |
/api/gate/echo and the streamed /api/gate/proxy | App api_routes tests |
cardinal gate:hello [NAME] | App CLI command tests |
Automation steps, a workspace widget, chart sources, a principal set, an assignment pool, the GV series part | Contract tests for each extension point |
frontend/: a "Gate" button on ToDo's form, and its own frontend at /gate/ | Desk plugin and app frontend tests |
cardinal gate:hello AdaWhere it runs
ExUnit tests in platform/ install gate on throwaway sites and add test-only controllers for its RecTypes.
scripts/e2e.sh builds an image with gate and seeds e2e.localhost with it. The Playwright suites work on Gate RecTypes.
scripts/load.sh has k6 clerks enter Gate Invoices with five rows each.
Its RecTypes started as copies of the native/cardinal_meta/tests/corpus/gate/ fixtures and may change independently of them. To see how a real app is laid out, see Build.