Allow custom wsEndpoint for Playwright
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- angular, playwright, typescript
- Domínio
- build-system, testing-qa, tooling
Direção de pesquisa
Comece lendo browser-provider.ts por volta das linhas 164-187, especialmente providerFactory, e depois inspecione as sobrescritas do provider em plugins.ts por volta das linhas 265-284. Acompanhe como a configuração do Playwright chega ao Angular builder e determine qual opção compatível com versões anteriores é apropriada. Considera-se concluído quando um wsEndpoint configurado explicitamente é respeitado em vez de ser substituído implicitamente.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 27k
- Forks
- 11.8k
- Merge médio
- 16h 35min
- PRs com merge (30d)
- 176
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de angular/angular-cli
-
area: @angular/build gemini-triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
angular/angular-cli#33955 ·
-
area: @angular/cli gemini-triaged
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
angular/angular-cli#33055 · 1 comentário · 3 reações ·
-
unit-test: with --coverage, a setup file's hooks reach only the first spec file of each worker Abertaarea: @angular/build gemini-triaged
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 72/100
angular/angular-cli#34137 ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34131 · 1 responsável ·
-
angular/build:library area: @angular/build gemini-triaged
angular/angular-cli#34130 · 1 responsável ·
Todas as issues de angular/angular-cli
Issues semelhantes
-
comp/desktop P3 type/bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 85/100
getsentry/sentry-javascript#24577 · 1 comentário ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
-
Add 2021 Cup data to website Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
chrisparsons83/flexspotff#153 ·