Skip to content

Update mattermost-channels spec for streaming fetchers#777

Merged
feruzm merged 1 commit into
developfrom
fix/mattermost-channels-spec
May 8, 2026
Merged

Update mattermost-channels spec for streaming fetchers#777
feruzm merged 1 commit into
developfrom
fix/mattermost-channels-spec

Conversation

@feruzm
Copy link
Copy Markdown
Member

@feruzm feruzm commented May 8, 2026

After #776, fetchAllChannelPages calls /users/me/channels once (no pagination) and fetchAllChannelMemberPages calls
/users/me/channel_members?page=-1 via mmUserFetchNdjson. The previous spec asserted multi-page pagination and imported the removed pageSize / maxPages constants, so all three test cases failed (NaN length assertions from the missing imports).

Replace with tests that match the new behaviour:

  • /channels: one mmUserFetch call to /users/me/channels, returns the streamed array; non-array upstream responses return [].
  • /channel_members: one mmUserFetchNdjson call to /users/me/channel_members?page=-1, returns the parsed array.

Verified locally: vitest run mattermost — 13/13 pass; full suite — 965/965 pass.

After #776, fetchAllChannelPages calls /users/me/channels once (no
pagination) and fetchAllChannelMemberPages calls
/users/me/channel_members?page=-1 via mmUserFetchNdjson. The previous
spec asserted multi-page pagination and imported the removed pageSize /
maxPages constants, so all three test cases failed (NaN length
assertions from the missing imports).

Replace with tests that match the new behaviour:
- /channels: one mmUserFetch call to /users/me/channels, returns the
  streamed array; non-array upstream responses return [].
- /channel_members: one mmUserFetchNdjson call to
  /users/me/channel_members?page=-1, returns the parsed array.

Verified locally: vitest run mattermost — 13/13 pass; full suite —
965/965 pass.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 8, 2026

Warning

Rate limit exceeded

@feruzm has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 26 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0541665a-26c5-42b6-a864-85f524e8ee6e

📥 Commits

Reviewing files that changed from the base of the PR and between e13e2fb and 4781726.

📒 Files selected for processing (1)
  • apps/web/src/specs/api/mattermost-channels.spec.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/mattermost-channels-spec

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 and usage tips.

@feruzm feruzm merged commit 8afc85a into develop May 8, 2026
1 check passed
@feruzm feruzm deleted the fix/mattermost-channels-spec branch May 8, 2026 17:32
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.

1 participant