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

未关闭
#1,419 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@aryanpatil-07 已经在做这个了。

开始于 2026年11月12日。

  • #1420 来自 @aryanpatil-07 —— 未关闭

评估

难度
4/5
预计耗时
3-5 天
新手友好度
20/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
停滞

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
JavaScript
星标
170
派生
397
平均合并
12 天 14 小时
30 天内合并 PR
6

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

RocketChat/EmbeddedChat 的其他 Issue

查看 RocketChat/EmbeddedChat 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。