Skip to content

SCM — Samples

These are the samples for the SCM — Screen Connectivity guide. See also Short info and the tutorial.

Begin with Search → Results → Reservation details → Confirmation.

  1. Name each edge: submit search, select flight and confirm reservation.
  2. Add an Empty results state or destination appropriate to the application design.
  3. Add a return move from the empty result to Search, preserving the previous search criteria where intended.
  4. Walk the example “no seats found” without inventing an unmodelled navigation step.

The result is an explicit recovery journey. Whether the app preserves input and renders the correct message belongs in linked requirements and implementation tests.

For a concrete model file, download the travel-booking checkpoint and follow the travel-booking tutorial. The checkpoint is cumulative and may contain earlier model stages.

These four exercises are lesson briefs. Their dedicated CtxBazaar recipes and browser launch actions are planned; see Learning with models for available downloads and the meaning of each result.

Exercise Try this Expected observation
Three-screen booking Connect Search, Results and Confirmation with labelled navigation. Trace a complete route through the three destinations.
Recover from an empty result Add an empty-results destination and a way to change the search. The traveler has a recovery path instead of a dead end.
Parameterized detail Represent a booking detail route containing a booking identifier. Different bookings share one screen contract.
Access boundary Connect an account screen to an ACM rule and inspect both models. Navigation and permission remain explicit, distinct concerns.
Artifact Description
E2E navigation tests Verify users can navigate between connected screens
Route tests Verify each route resolves correctly with valid and invalid parameters
Accessibility audits WCAG compliance checks for each screen
OpenAPI path specs API endpoint definitions derived from screen routes

From the screens above, ContextBrew generates:

describe("Navigation: Book Catalog -> Book Details", () => {
it("navigates from catalog to details when user clicks a book card", async () => {
await page.goto("/books");
await page.click('[data-testid="book-card-1"]');
await expect(page).toHaveURL(/\/books\/[a-f0-9-]+/);
});
});