INNER CODE UNIT · TypeScript
agentDetail
kagent-dev/kagent · ui/playwright/helpers/app.ts:106
export const agentDetail = (id: string) =>
`/agents/${id}`;
/**
* How the mock backend should behave for a navigation.
*
* The app reads this from the query string on every request (see
* `src/mocks/scenario.ts`), which is what makes the loading, empty and failure
* paths drivable from a test without a second build or a stubbed module.
*/
export type MockScenario = "ok" | "empty" | "error" | "slow";
/**
* Adds the scenario to a path.
*
* Always pass one explicitly: the app remembers the last scenario for the
* browsing session, so a bare path inherits whatever the previous step asked
* for — which is convenient in a browser and a trap in a test.