Skip to content

Commit db08348

Browse files
committed
test(plugin-list): the inlineFlsNoop UNAUTHORED case waits for the object-schema headers
The case took the first non-empty header set, which on a slow runner is the inline-data render painted before the object schema loads (`Id` shown, `Amount` dropped by the inline-data FLS gate). It now waits until the headers equal the object-schema set before asserting the mechanism; a grid that stays on the inline-data path never reaches that set and reds the wait. Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L9qibwRxn1J7oT4Lx22UxZ
1 parent 0b539b6 commit db08348

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

‎ui/packages/plugin-list/src/__tests__/ListView.inlineFlsNoop-6723.test.tsx‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,14 @@ describe('ListView-hosted grid — the #6723 inline-data FLS gate is a no-op her
156156
const { container } = renderList(listSchema(), DENY_AMOUNT);
157157

158158
await waitFor(() => expect(screen.getByText('Acme expansion')).toBeInTheDocument());
159-
const headers = await waitFor(() => {
160-
const h = dataHeaders(container);
161-
expect(h.length).toBeGreaterThan(0);
162-
return h;
163-
});
159+
// The rows can paint before the object schema arrives. Until it does,
160+
// `objectSchema` is null, so the grid answers from the row keys on the
161+
// inline-data path (`Id` shown, `Amount` dropped by the #6723 gate). The
162+
// first non-empty header set is therefore NOT the mechanism under test:
163+
// wait for the object-schema set itself. A grid that stays on the
164+
// inline-data path never reaches it, so this wait is what reds that case.
165+
await waitFor(() => expect(dataHeaders(container)).toEqual(['Opportunity Name']));
166+
const headers = dataHeaders(container);
164167

165168
expect(headers).toContain('Opportunity Name');
166169
// The pre-existing object-schema gate dropped it.

0 commit comments

Comments
 (0)