Repository navigation
feat(e2e-react): Add offline mock server with REST and DDP emulation - #1420
Open
aryanpatil-07 wants to merge 2 commits into
Open
aryanpatil-07 wants to merge 2 commits into
aryanpatil-07 wants to merge 2 commits into
Conversation
… emulation (RocketChat#1419) Fixes RocketChat#1419 - Implemented mock REST endpoints for login, room info, message fetching, and message sending - Emulated Meteor/DDP WebSocket handshake and live message broadcasting - Enabled session persistence via localStorage (ec_token) - Pointed default e2e-react configuration away from defunct demo QA server Signed-off-by: Aryan Patil <[email protected]>
aryanpatil-07
marked this pull request as ready for review
November 12, 2026 15:52
aryanpatil-07
marked this pull request as draft
November 12, 2026 16:04
aryanpatil-07
marked this pull request as ready for review
November 14, 2026 06:30
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1419
Acceptance Criteria fulfillment
/api/v1/login,rooms.info,channels.messages,chat.sendMessage) with valid mock payloads.connect➔connected,sub➔ready) and live message broadcasting.localStorage(ec_token) across page reloads.yarn devinpackages/e2e-reactto run out-of-the-box in a functional chat playground without network errors.Description
In
packages/e2e-react/src/App.tsx, the default development configuration pointed tohttps://demo.qa.rocket.chat/. This server is defunct (expired SSL certificate / 404 response), causing the browser to abort requests withFailed to fetchand displaying a connection error toast on login.This PR adds
mockServer.tsintopackages/e2e-reactto intercept both RESTfetchrequests and WebSocket DDP connections. Developers can now run and interact with the React test app offline without spinning up a heavy local Rocket.Chat/MongoDB instance.PR Test Details
yarn --cwd packages/e2e-react dev.http://127.0.0.1:5173/.test_acc.