Repository navigation
Commit 9a274e6
test(plugin-list): the inlineFlsNoop UNAUTHORED case waits for the object-schema headers, not the first render (#37981)
<!-- claude-projects-attribution: {"github_login":"os-tesla"} -->
_Requested by **Tesla** · [project
thread](https://claude.ai/code/project/chan_01AXsQkLFKRdQCqQ3RTr6Jao?thread=cmsg_01AXsQkLFKRdQCqQ3RTr6JaoKVUc6H29jLDJsTfYRni5MR)_
Fixes #37972
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 用户无感:只改了列表页的一个自动化测试,产品行为不变。
- 这个测试在慢的检查机上会偶发失败,挡住了与界面无关的修复合并;修好后这类合并不再被它卡住。
- 出错的话只是这个测试再次偶发失败,删掉本次改动即可撤回,不影响任何用户。
- 要你做什么:无。
## What changes
`ui/packages/plugin-list/src/__tests__/ListView.inlineFlsNoop-6723.test.tsx`,
the UNAUTHORED case only.
The rows can paint before the object schema arrives. Until it does,
`objectSchema` is null, so `generateColumns()` answers from the row keys
on the inline-data path
(`ui/packages/plugin-grid/src/objectGridGenerateColumns.tsx:783-784`):
`Id` shown, `Amount` dropped by the #6723 gate. The case took the first
non-empty header set, so on a slow runner it read that render and failed
with `expected [ 'Id', 'Opportunity Name' ] to not include 'Id'` (PR
#37948, jobs 140512339260 and 140529997984).
The case now waits until the headers equal the object-schema set,
`['Opportunity Name']`, before it asserts. The three assertions after
the wait (`toContain('Opportunity Name')`, `not.toContain('Amount')`,
`not.toContain('Id')`) are unchanged. No other case changes; the CONTROL
case's `toContain('Amount')` stays as it is. No source file changes. The
file is not published (test-only), so `skip-changeset`.
## Tests
All runs from `ui/`: `pnpm exec vitest run --maxWorkers=2
packages/plugin-list/src/__tests__/ListView.inlineFlsNoop-6723.test.tsx`,
under `scripts/pm/os-verify-lock.sh`, on head `db083480` (base
`origin/main` 0b539b6).
| Run | Result |
|:--|:--|
| This head, three runs | 3/3 passed, each time |
| Race forced: `getObjectSchema` delayed 300 ms, OLD case (0b539b6) |
red: `expected [ 'Id', 'Opportunity Name' ] to not include 'Id'` at
`:171`, the CI message exactly |
| Race forced: same 300 ms delay, this head | 3/3 passed |
| Ablation: `rowKeysWouldOutrankSchemaPolicy` forced to `false` (grid
stays on the inline-data path), this head | red: `expected [ 'Id',
'Opportunity Name' ] to deeply equal [ 'Opportunity Name' ]` at `:165`
(the new wait); the other two cases green |
Both mutations went through `scripts/ablation-replace.mjs` (anchor hit 1
-> 0, blob moved, restored to the HEAD blob with `git diff HEAD` empty).
`@object-ui/plugin-grid` resolves to `src` through the
`ui/vitest.config.mts` alias, so the ablation needs no build.
## Acceptance notes
- Seen, not fixed here (card #37972 names it out of scope):
`StudioRoute.metadataArea-28561.test.tsx` red `Test UI (13/16)` once on
PR #37962. Different test, no change.
## Verification
Two-minute check: run the command above from `ui/`; expected `Tests 3
passed (3)`. To see the race the old case lost, delay `getObjectSchema`
in the file's `makeDataSource()` by 300 ms: this head stays green.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01L9qibwRxn1J7oT4Lx22UxZ)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent ab04434 commit 9a274e6
1 file changed
Lines changed: 8 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| |||
0 commit comments