Skip to content

[WIP] Fix all CI errors#1057

Merged
hotlong merged 2 commits intomainfrom
copilot/fix-ci-errors-daffb37d-4d46-4e26-845b-77aa68f3d102
Mar 10, 2026
Merged

[WIP] Fix all CI errors#1057
hotlong merged 2 commits intomainfrom
copilot/fix-ci-errors-daffb37d-4d46-4e26-845b-77aa68f3d102

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 10, 2026

  • Fix ObjectDataTable.test.tsx — "should show error state on fetch failure": waitFor uses toBeDefined() on querySelector result, but null !== undefined so it always passes without waiting. Changed to toBeTruthy().
  • Fix RecordDetailEdit.test.tsx — "renders highlight fields for key field types": test objectsWithStatus lacks views.detail.highlightFields, so highlight banner never renders. Added the missing config.
  • Verify both fixes pass locally
  • Run full test suite to confirm no regressions (375 files, 7120 tests passed)
Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/22844754908/job/66258364541#step:6:1

fix all ci errors


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Mar 10, 2026 4:12am
objectui-demo Ready Ready Preview, Comment Mar 10, 2026 4:12am
objectui-storybook Ready Ready Preview, Comment Mar 10, 2026 4:12am

Request Review

… RecordDetailEdit highlight fields config

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
@hotlong hotlong marked this pull request as ready for review March 10, 2026 03:45
Copilot AI review requested due to automatic review settings March 10, 2026 03:45
@hotlong hotlong merged commit 5b1dad0 into main Mar 10, 2026
2 of 4 checks passed
Copilot stopped work on behalf of hotlong due to an error March 10, 2026 03:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes CI failures by correcting two tests whose assertions/configuration prevented them from exercising the intended UI states.

Changes:

  • Updated ObjectDataTable fetch-failure test assertions to avoid a false-positive toBeDefined() check on a querySelector result.
  • Added missing views.detail.highlightFields to the RecordDetailEdit test fixture so the highlight banner renders during the test.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/plugin-dashboard/src/tests/ObjectDataTable.test.tsx Fixes a flaky/incorrect assertion so the error state is actually awaited and asserted.
apps/console/src/tests/RecordDetailEdit.test.tsx Adds required object metadata so highlight fields render as expected in the test.

Comment on lines 49 to +54
await waitFor(() => {
const errorEl = container.querySelector('[data-testid="table-error"]');
expect(errorEl).toBeDefined();
expect(errorEl).toBeTruthy();
});

expect(screen.getByText('Connection refused')).toBeDefined();
expect(screen.getByText('Connection refused')).toBeTruthy();
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this test, querySelector(...) returns Element | null, so the most precise assertion is toBeInTheDocument() (or using screen.getByTestId/getByText directly) rather than toBeTruthy(). Also, the same toBeDefined() + querySelector(...) pattern still exists elsewhere in this file (e.g., loading/empty-state checks) and will still pass even when the element is null, so those assertions should be updated too for the tests to actually wait for the UI state.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants