feat(e2e-react): Add standalone offline mock server with REST and DDP emulation
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript, node.js, react
- Domain
- backend-api-design, full-stack, testing
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
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
localStorageacross page reloads. - Allow
yarn devto 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/EmbeddedChat
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RocketChat/EmbeddedChat#1429 ·
Maintainers usually reply within 1 day
-
docs: README says Node 22 is required, but .nvmrc pins v24 and preinstall enforces itPossibly taken @Veerpratapgupta claimed this 29 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
RocketChat/EmbeddedChat#1377 · 1 comment ·
Maintainers usually reply within 1 day
-
test: isMessageSequential in layout_editor has no coverageMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RocketChat/EmbeddedChat#1373 ·
Maintainers usually reply within 1 day
-
Permissions change-detection in useFetchChatData is dead — applyPermissions re-runs on every callPossibly taken @yash113gadia claimed this 166 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
RocketChat/EmbeddedChat#1317 ·
Maintainers usually reply within 1 day
-
Only the last emoji shortname in a message is converted to unicodePossibly taken @yash113gadia claimed this 166 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
RocketChat/EmbeddedChat#1315 ·
Maintainers usually reply within 1 day
All issues in RocketChat/EmbeddedChat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Bug: Table layout and date column are cut off on mobile screens on the Tournaments -> History pageOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
hexlet-codebattle/codebattle#2375 ·
-
intake mcp-intake needs-human-review priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Ikalus1988/MisakaNet#5041 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
nicobailon/pi-web-access#682 ·
Maintainers usually reply within 1 day
-
nip27: long hashtag swallows the rest of the content, lone # gives an empty hashtagPossibly taken @bardrop claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
nbd-wtf/nostr-tools#578 ·