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

Aperta
#1,419 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@aryanpatil-07 ci sta già lavorando.

Dal 12/11/2026.

  • #1420 di @aryanpatil-07 — aperta

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
javascript, node.js, react

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
JavaScript
Stelle
170
Fork
397
Merge medio
12g 14h
PR unite (30g)
6

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di RocketChat/EmbeddedChat

Tutte le issue di RocketChat/EmbeddedChat

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.