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

Ouverte
#1,419 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@aryanpatil-07 y travaille déjà.

Depuis le 12/11/2026.

  • #1420 par @aryanpatil-07 — ouverte

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
20/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
À l'abandon
Stack technique
javascript, node.js, react

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

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.

Langage dominant
JavaScript
Étoiles
170
Forks
397
Merge moyen
12 j 14 h
PR mergées (30 j)
6

Préparer son environnement

  • Aucun Dockerfile ni fichier Docker Compose
  • Propose un modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de RocketChat/EmbeddedChat

Toutes les issues de RocketChat/EmbeddedChat

Issues similaires

Plus d'issues JavaScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.