fix(fields): await async data load in renderGrid slot test + fix Vercel build#1279
Conversation
The test asserted renderGrid was called with populated records immediately, but the component renders initially with empty state before the async fetch resolves. Changed to toHaveBeenLastCalledWith inside waitFor to properly await the data-loaded render. Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/bd086065-c65e-4f73-9b25-4fd3976d67e2 Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@copilot vercel build failed Command "cd ../.. && pnpm --filter @object-ui/app-shell... build && cd apps/console && pnpm msw:init && NODE_OPTIONS=--max-old-space-size=4096 VITE_USE_MOCK_SERVER=false VITE_BASE_PATH=/ vite build" exited with 254 |
The buildCommand in vercel.json referenced `pnpm msw:init` but no such script exists in apps/console/package.json, causing exit code 254. Since VITE_USE_MOCK_SERVER=false in the Vercel deploy (server mode), MSW is not needed and the step can be safely removed. Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/debc340f-7dee-423b-a14b-beddf51c85dc Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Fixed in a4de8a7. The |
RecordPickerDialogrenderGrid slot test was flaky because it asserted on allrenderGridcalls including the initial render (empty state before async fetch resolves).toHaveBeenCalledWith→toHaveBeenLastCalledWithinsidewaitForto assert on the post-fetch renderAny<Function>matcher issuespnpm msw:initstep fromapps/console/vercel.jsonbuildCommand that caused Vercel deployment failures (exit code 254). Since the deploy usesVITE_USE_MOCK_SERVER=false(server mode), MSW initialization is unnecessary.