From db08348070c1e1cd57a6f50af9595be81f39dd86 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 27 Nov 2026 13:45:37 +0000 Subject: [PATCH] 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 Claude-Session: https://claude.ai/code/session_01L9qibwRxn1J7oT4Lx22UxZ --- .../__tests__/ListView.inlineFlsNoop-6723.test.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ui/packages/plugin-list/src/__tests__/ListView.inlineFlsNoop-6723.test.tsx b/ui/packages/plugin-list/src/__tests__/ListView.inlineFlsNoop-6723.test.tsx index 9cd3043de86..06a55b0e7a8 100644 --- a/ui/packages/plugin-list/src/__tests__/ListView.inlineFlsNoop-6723.test.tsx +++ b/ui/packages/plugin-list/src/__tests__/ListView.inlineFlsNoop-6723.test.tsx @@ -156,11 +156,14 @@ describe('ListView-hosted grid — the #6723 inline-data FLS gate is a no-op her const { container } = renderList(listSchema(), DENY_AMOUNT); await waitFor(() => expect(screen.getByText('Acme expansion')).toBeInTheDocument()); - const headers = await waitFor(() => { - const h = dataHeaders(container); - expect(h.length).toBeGreaterThan(0); - return h; - }); + // The rows can paint before the object schema arrives. Until it does, + // `objectSchema` is null, so the grid answers from the row keys on the + // inline-data path (`Id` shown, `Amount` dropped by the #6723 gate). The + // first non-empty header set is therefore NOT the mechanism under test: + // wait for the object-schema set itself. A grid that stays on the + // inline-data path never reaches it, so this wait is what reds that case. + await waitFor(() => expect(dataHeaders(container)).toEqual(['Opportunity Name'])); + const headers = dataHeaders(container); expect(headers).toContain('Opportunity Name'); // The pre-existing object-schema gate dropped it.