Allow custom wsEndpoint for Playwright
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- angular, playwright, typescript
调研方向
首先阅读 browser-provider.ts 第 164-187 行附近的内容,尤其是 providerFactory,然后检查 plugins.ts 第 265-284 行附近对 provider 的覆盖。跟踪 Playwright 配置如何传递到 Angular builder,并确定适当的向后兼容选项。完成的标准是,显式配置的 wsEndpoint 会被保留,而不是被隐式覆盖。
由索引模型根据 Issue 内容生成。
描述
Command
build
Description
In our project, I've been trying to set up visual regression testing using Vitest, and to make the screenshot tests stable, we want to make those tests in the same environment, regardless of the developers' OS, which can impact the tests. When using Playwright as a browser provider, Vites allows for providing/overriding the WS endpoint, which is not respected & overridden in the unit test builder.
After a quick look at the code, presumably this is being dropped in browser-provider.ts:164-87 - providerFactory(..) function is called with only baseOptions, and also, plugins.ts:265-284 has some more overrides, and comments (// CLI provider browser options override, if present)
Describe the solution you'd like
Ideally, as a developer, I'd like to have better control over the browser provider configuration, instead of having it implicitly overridden on the builder side.
These are the options that I have on my mind, both of them backward compatible with the existing API:
- Allow full customization for the browser provider
The solution is as simple as not overriding the provider value if defined explicitly in vitetest-base.config.ts. This option would be backward compatible with the existing API, but might break the projects that've attempted to override the provider property and haven't noticed that it has no impact.
- Add
wsEndpointproperty to the builder schema, and allow overriding the value fromangular.json
Safer solution, but less flexible.
Describe alternatives you've considered
All other alternatives require significant efforts to support, and require bypassing the Angular builders, or using a different framework for the same purpose.
I'm also happy to make a contribution, but first, I'd like to get an opinion, and maybe get more context on why the browser config is overridden from Angular's side.
- 主要语言
- TypeScript
- 星标
- 27k
- 派生
- 11.8k
- 平均合并
- 16 小时 21 分钟
- 30 天内合并 PR
- 170
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
angular/angular-cli 的其他 Issue
-
area: @angular/build gemini-triaged
难度 2/5 1-3 小时 新手友好度 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
难度 2/5 1-3 小时 新手友好度 72/100
angular/angular-cli#33055 · 1 条评论 · 3 个 reaction ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 已指派 1 人 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 已指派 1 人 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34128 · 已指派 1 人 ·
查看 angular/angular-cli 的全部 Issue
相似的 Issue
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 95/100
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) 未关闭category/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
难度 1/5 1 小时以内 新手友好度 84/100
-
area:auth FE mvp P3
难度 2/5 1-3 小时 新手友好度 88/100
klasolsson81/jobbliggaren#1788 ·
-
难度 2/5 1-3 小时 新手友好度 74/100
get-convex/migrations#69 ·
-
accessibility angular bug good first issue typescript ux
难度 2/5 1-3 小时 新手友好度 88/100
apache/fineract-backoffice-ui#584 · 1 条评论 ·