/** * AI Software Factory — E2E: Confluence P2 T-155 (search sorts) * * Covers spec §10's "Sorting by relevance, creation date, and modification * date." The DETERMINISTIC ordering is proven in `search.integration.test.ts` * (real OpenSearch: `sortBy=createdAt` returns the indexed docs newest-first); * this E2E verifies the WEB surface + the API contract: * * - The /search page offers a sort control (Relevance / Newest / Recently * updated); selecting a non-default order is reflected in the shareable * URL (`?sort=createdAt`), and switching back to Relevance cleans it. * - `POST /search` accepts `sortBy` (200 for the three modes) and rejects an * unknown value (400 VALIDATION_ERROR). * * Selector convention (new control, no pinned ids to preserve): * data-testid="search-sort" the sort