feat(e2e-react): Add standalone offline mock server with REST and DDP emulation

Open
#1,419 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@aryanpatil-07 is already working on this.

Since Nov 12, 2026.

  • #1420 by @aryanpatil-07 — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale

Research direction

Start with packages/e2e-react/src/App.tsx to trace the development server configuration, then inspect the package’s REST calls and Meteor/DDP WebSocket handling. The acceptance criteria require mock responses for the listed endpoints, DDP handshake and message broadcasts, and session persistence in localStorage; verify that yarn dev opens a functional offline chat. A linked open pull request and the implementation note indicate work is already underway.

Written by the indexing model from the issue text.

Description

enhancement
Problem Statement

In packages/e2e-react/src/App.tsx, the default development configuration points to https://demo.qa.rocket.chat/. This server is defunct (expired SSL certificate / 404 response), causing the browser to abort requests with Failed to fetch and displaying a connection error toast on login.

Additionally, testing UI components currently requires spinning up a heavy local Docker container with MongoDB and Rocket.Chat, which introduces a high barrier to entry for new contributors and leads to flaky E2E testing.


As an EmbeddedChat developer

I need to:
Run a standalone mock server inside the e2e-react package that intercepts REST authentication and emulates the real-time Meteor/DDP WebSocket protocol.

So That:
I can develop, interact with, and test EmbeddedChat features (login, message sending, room history, and session persistence) instantly and offline without requiring a live Rocket.Chat backend or Docker setup.


Acceptance Criteria

  • Intercept REST API endpoints (/api/v1/login, rooms.info, channels.messages, chat.sendMessage) with valid mock payloads.
  • Emulate the Meteor/DDP WebSocket handshake (connect ➔ connected, sub ➔ ready) and message event broadcasting.
  • Persist mock authentication sessions in localStorage across page reloads.
  • Allow yarn dev to run out-of-the-box in a functional chat playground without network errors.

Demo / Screen Recording

https://github.com/user-attachments/assets/a4067913-0756-4f0a-bc43-201b0d347f2c


Implementation Note

I am working on the solution implementing both the REST and WebSocket/DDP interception layers and will link the pull request immediately.

Dominant language
JavaScript
Stars
170
Forks
397
Avg merge
12d 14h
Merged PRs (30d)
6

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from RocketChat/EmbeddedChat

All issues in RocketChat/EmbeddedChat

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.