Skip to content

test(RoomView): drop duplicated RightButtons composed cases - #7676

Merged
diegolmello merged 2 commits into
native-34-roomview-hooksfrom
diegolmello/simpler-finding-8
Sep 11, 2026
Merged

test(RoomView): drop duplicated RightButtons composed cases#7676
diegolmello merged 2 commits into
native-34-roomview-hooksfrom
diegolmello/simpler-finding-8

Conversation

@diegolmello

@diegolmello diegolmello commented Sep 11, 2026

Copy link
Copy Markdown
Member

Proposed changes

The composed RightButtons suite at the components level repeated six cases that already lived elsewhere with the same inputs and assertions: three guard cases (missing rid, invited membership, queued omnichannel) covered by the routing suite, and three threads-button unread-label cases covered by the RoomRightButtons leaf suite. Their three null snapshot entries went with them, deleted by hand.

Before removing the guards, the routing suite's three matching cases gained an exact toJSON() null assertion, so the "renders an empty tree" proof the composed suite held is preserved rather than dropped. The stub-absence helper call stays alongside it.

The useSubscriptionUnreads mock in the composed suite remains because the self-DM case still reads isSelfDm from it.

Issue(s)

Follow-up to #7482; targets its native-34-roomview-hooks branch.

How to test or reproduce

  • pnpm format-lint passed.
  • TZ=UTC pnpm test passed: 315 suites, 2,896 tests, 423 snapshots, no obsolete snapshots.
  • Composed, routing and leaf RightButtons suites: 6 suites, 70 tests, 11 snapshots.

Screenshots

Not applicable; test-only change.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

Every other composed case and non-null snapshot is unchanged. Standards and specification reviews reported no defects.

Summary by CodeRabbit

  • Tests
    • Strengthened validation for scenarios where the room action controls should render nothing.
    • Removed redundant coverage for unavailable room actions and notification-label variations.
    • No user-facing behavior changes.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 7c6a4a7c-03fa-43c5-a67d-05e1e2eba709

📥 Commits

Reviewing files that changed from the base of the PR and between 9d2982a and 81ec283.

⛔ Files ignored due to path filters (1)
  • app/views/RoomView/components/__tests__/__snapshots__/RightButtons.test.tsx.snap is excluded by !**/*.snap
📒 Files selected for processing (2)
  • app/views/RoomView/components/RightButtons/__tests__/RightButtons.test.tsx
  • app/views/RoomView/components/__tests__/RightButtons.test.tsx

Walkthrough

The PR strengthens three null-render assertions in one RightButtons test suite and removes six tests from another suite, including null-render and thread accessibility-label coverage.

Changes

RightButtons test coverage

Layer / File(s) Summary
Null-render and accessibility test coverage
app/views/RoomView/components/RightButtons/__tests__/RightButtons.test.tsx, app/views/RoomView/components/__tests__/RightButtons.test.tsx
The nested suite now asserts toJSON() returns null for missing rid, invited rooms, and queued omnichannel rooms. The other suite removes these three cases and three thread accessibility-label tests.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Suggested labels: type: chore


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@diegolmello
diegolmello merged commit 4690a64 into native-34-roomview-hooks Sep 11, 2026
5 of 7 checks passed
@diegolmello
diegolmello deleted the diegolmello/simpler-finding-8 branch September 11, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant