Skip to content

fix: correct aria-label assertion in ObjectView chatter panel test#1129

Merged
hotlong merged 3 commits intomainfrom
copilot/fix-ci-build-test-errors-yet-again
Mar 26, 2026
Merged

fix: correct aria-label assertion in ObjectView chatter panel test#1129
hotlong merged 3 commits intomainfrom
copilot/fix-ci-build-test-errors-yet-again

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

CI test failure in ObjectView.test.tsx — the RecordChatterPanel drawer test queried for a non-existent aria-label.

  • Root cause: Test used getByLabelText('Show discussion') but RecordChatterPanel renders aria-label={t('detail.showDiscussion', { count: items.length })} which resolves to 'Show Discussion (0)' via default translations (capital D, includes count).
- const showBtn = screen.getByLabelText('Show discussion');
+ const showBtn = screen.getByLabelText('Show Discussion (0)');
  • Storybook failures: All 6 are page.goto: Timeout 60000ms exceeded — CI infrastructure timeouts, not code issues.
Original prompt

fix all ci build and test errors


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 26, 2026

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

Project Deployment Actions Updated (UTC)
objectui-demo Ready Ready Preview, Comment Mar 26, 2026 6:01am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
objectui Ignored Ignored Mar 26, 2026 6:01am
objectui-storybook Ignored Ignored Mar 26, 2026 6:01am

Request Review

The test used getByLabelText('Show discussion') but the actual
aria-label rendered by RecordChatterPanel is 'Show Discussion (0)'
(from i18n default translation with count parameter).

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Agent-Logs-Url: https://github.com/objectstack-ai/objectui/sessions/e52cb32e-6402-44bb-876a-f0658356524a
Copilot AI changed the title [WIP] Fix all CI build and test errors fix: correct aria-label assertion in ObjectView chatter panel test Mar 26, 2026
Copilot AI requested a review from hotlong March 26, 2026 06:01
@hotlong hotlong marked this pull request as ready for review March 26, 2026 06:10
Copilot AI review requested due to automatic review settings March 26, 2026 06:10
@hotlong hotlong merged commit 92eb366 into main Mar 26, 2026
6 checks passed
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 a CI test failure in the console’s ObjectView test suite by aligning the test query with the actual accessible label produced by RecordChatterPanel’s default i18n translation (which includes a count).

Changes:

  • Update ObjectView.test.tsx to query the correct aria-label for the collapsed discussion button (Show Discussion (0)).
  • Add a corresponding “Fixed” entry to CHANGELOG.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
apps/console/src/tests/ObjectView.test.tsx Corrects the getByLabelText query to match RecordChatterPanel’s translated aria-label including count.
CHANGELOG.md Documents the CI test fix under “Unreleased → Fixed”.

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