Skip to content

Commit 2f96d87

Browse files
test(example-showcase): the related-heavy detail case pins the record page's tabbed tier (#27174)
Part of #27114 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:showcase 浏览器冒烟里 Contoso 详情页那条用例,开页前把视口定在 1200 px,让记录页留在「标签页」档。 - 为什么改:#26758 按维护者裁决把默认记录页改成按容器宽度分档,Desktop Chrome 1280 视口减去侧栏落在两栏档,没有标签条,用例找不到 Details 标签,夜间 live 档因此变红。 - 风险与回滚:只改一个 e2e 用例(+8 行,无产品代码);回滚即撤这一个 commit。 - 先看:`examples/app-showcase/e2e/detail-shapes.spec.ts` 中 Contoso 用例开头新加的 `setViewportSize` 与注释。 - 两分钟验证:`cd examples/app-showcase && CI=1 OS_TEST_TIERS=nightly pnpm exec vitest run test/showcase-smoke.live.test.ts`,预期 53/53 通过(需先 `pnpm console:build`)。 - 需要你做的:无,席位落地。 ## What changes `examples/app-showcase/e2e/detail-shapes.spec.ts`, the case "ungrouped + related-heavy: flat details and related-list tabs on Contoso": it now pins a 1200 x 800 viewport before opening the record. That keeps the synthesized record page in its tabbed tier. No assertion is removed, skipped, retried or moved to another tier. **Bisect.** The last green nightly ran on `b53322d5`. The first red commit is `0d07de2f` (#26758, "the default record page is one page at two widths — resident columns on a wide page, the tabs in a drawer"). Both legs ran under the nightly invocation, each on a full tree at that commit: - `1f1eda4d` (`0d07de2f^`): 53/53 passed. - `0d07de2f`: 52/53, the same case failing at the same assertion (`getByRole('tab', { name: /Details/i })`, L165). **Why the spec follows, not the product.** #26758 implements the maintainer's ruling 1 on epic #26676, verbatim: 「抽屉和整页是同一张页在两个宽度。」 Its table rules it: a container of 1024 – 1279 px gets "Details · timeline; the related column folds into a rail opened from a **Related (N)** toggle", and only below 1024 px does it get "The tab strip, exactly as before". The red screenshot on `origin/main` shows exactly that tier: two columns, a **Related 5** toggle, no tablist. Desktop Chrome's 1280 px viewport, less the console sidebar, gives the record view about 1024 px. #26758 handled the same thing in `ui/e2e/live/detail-related-list.spec.ts` and `record-history-display.spec.ts` with a 1200 px viewport ("each now pins a 1200 px viewport to stay in the tabbed tier they test"). This PR does the same for the showcase case, which that PR missed. ADR-0085's prominence rule (related lists as tabs) still holds in the tabbed tier, and that tier is the one this case asserts. The viewport is pinned per case, not per file. The other three cases in the file pass at the default viewport, so their coverage stays as it was. ## Tests The showcase live tier ran under the nightly invocation (`CI=1 OS_TEST_TIERS=nightly`, `vitest run test/showcase-smoke.live.test.ts`, with the dependency closure and `pnpm console:build` built first): <details><summary>Readings</summary> - `origin/main` `24351cfe` (reproduction): 1 failed, 52 passed. The failure is `detail-shapes.spec.ts:156` at `getByRole('tab', { name: /Details/i })`, failed on its retry too. Lock VERDICT `command-exit 1`. - `9bfc7e48` (fix on `24351cfe`): 53 passed, Test Files 1 passed. VERDICT `command-exit 0`. - `f81fbddd` (fix merged with `origin/main` `3346da26`, whose `RecordDetailView.tsx` change is why this ran again): 53 passed, Test Files 1 passed. VERDICT `command-exit 0`. - `pnpm --filter @objectstack/example-showcase typecheck` (its tsconfig includes `e2e/**/*`, and `--listFiles` counts the spec once): exit 0. </details> ## Acceptance notes - The private package `@objectstack/example-showcase` gets a test-only edit, so it carries `skip-changeset`. - No ablation: the diff adds no tested behaviour. It moves an e2e case onto the tier it asserts. The bisect legs above are the before/after proof. ## Verification <details><summary>Derived gates at f81fbdd</summary> `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 37 commands over the 1 changed path. All 37 exit 0, each exit captured before any pipe. `pnpm check:dual-build-cjs-loads` first answered `PREREQUISITE NOT MET` (exit 3: seven packages outside the showcase closure had no `dist/`). After building them it exits 0. `--ran` reports "37 derived famil(ies) accounted for — 37 run, 0 NOT-MEASURED (a DERIVED zero)". Every family CI runs beyond these is read from this PR's check-runs. </details> Session: `session_01QSeKYobVx7yTf1SUMMbKnP`, dispatched by `session_01QSeKYmTYfaPbLQD4BJfomW` (claim 6463869260). --- _Generated by [Claude Code](https://claude.ai/code/session_01QSeKYobVx7yTf1SUMMbKnP)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent edb72d9 commit 2f96d87

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎examples/app-showcase/e2e/detail-shapes.spec.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ test('stageField:false: status renders as a plain field, no stepper', async ({ p
154154
});
155155

156156
test('ungrouped + related-heavy: flat details and related-list tabs on Contoso', async ({ page }) => {
157+
// The synthesized record page lays itself out by the width of the view it
158+
// occupies (objectstack#26678): the tab strip this case opens exists only
159+
// below the two-column floor (`RECORD_PAGE_TWO_COLUMN_MIN_WIDTH` in
160+
// `@object-ui/plugin-detail`). The Desktop Chrome viewport leaves the record
161+
// view right at that floor once the console sidebar takes its share — two
162+
// columns and a "Related" toggle, no tablist — so the case pins a viewport
163+
// that keeps the page in its tabbed tier.
164+
await page.setViewportSize({ width: 1200, height: 800 });
157165
const errors = await openRecord(page, recordUrl('showcase_account', contosoId));
158166

159167
// Heuristic stepper (account.status is a select named "status").

0 commit comments

Comments
 (0)