Add React Testing Library component tests and expand Playwright regression coverage

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
javascript, playwright, react

调研方向

Start from existing vitest coverage in utils.spec.ts and the Playwright smoke tests, then map custom hooks such as useExtensionDetail, ExtensionRegistryService, and page-level conditional rendering. Add RTL/jsdom tests for project-owned logic (not MUI) and fill the most regression-prone UI flows. Extract testing and feature-implementation guidance from webui/AGENTS.md into skill files, including when to test and updating CHANGELOG.md under ## [next]. Done means new tests run in CI and the skill files are referenced instead of the inline blob.

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

描述

enhancement testing webui

Now that we've migrated to vitest (#1914), the groundwork is there but coverage is still limited to pure utility functions in utils.spec.ts. A contributor can refactor a hook, change business logic in a page component, or break how data flows through the registry service — and CI won't catch it.

Component/hook testing: vitest already supports jsdom, and with React Testing Library we could start covering the logic that's actually ours to own — custom hooks like useExtensionDetail, service layer behaviour in ExtensionRegistryService, and data-driven conditional rendering in page components. The goal wouldn't be testing MUI itself, but the decisions our code makes.

Playwright coverage: the existing smoke tests cover some critical paths, but there are likely flows that have broken in the past and gone undetected until someone noticed manually. It'd be worth identifying which areas feel most regression-prone and whether there are gaps worth filling.


Separately, webui/AGENTS.md currently embeds all agent guidance inline. As that grows it would be worth extracting the testing and feature implementation knowledge into dedicated skill files that agents can reference:

  • A testing skill — when to write tests and when not to (e.g. don't test MUI rendering, do test custom hooks and service logic), what tools to use, and how to structure test files.
  • A feature implementation skill — the general workflow for shipping a feature: when to add tests (referencing the testing skill), and the requirement to update CHANGELOG.md under ## [next].
主要语言
Java
星标
2.1k
派生
362
平均合并
1 天 3 小时
30 天内合并 PR
44

环境准备

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

从这里开始

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

eclipse-openvsx/openvsx 的其他 Issue

查看 eclipse-openvsx/openvsx 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

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