angular / angular/components

bug(mat-autocomplete): async mat-autocomplete drop-down items do not render when using Cypress

Abierto
#26,227 5 comentarios 0 reacciones 0 asignados Ver en GitHub
area: material/autocomplete P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

When using mat-autocomplete in our application normally, everything works as expected.
When running our e2e tests in a cypress chrome runner, the options fail to render in the HTML, and the autocomplete presents no options.

Sorry if this isn't the right place to file this bug, but we're very unsure of the cause.

### Reproduction

Steps to reproduce:
1. Have mat-autocomplete that loads async data for it's mat-options
2. Run cypress e2e test that focuses the input that triggers the mat-autocomplete
3. Notice that the mat-autocomplete drop down does not show
4. Notice that the mat-options are not rendered when inspecting the HTML

### Expected Behavior

We expect to see the dropdown as pictured below, with content in it

![ships-blurred](https://user-images.githubusercontent.com/1770326/206749261-c0facc49-7c27-4cbe-9d44-ee1fbe10e75c.png)

### Actual Behavior

When in the cypress test runner, the drop down does not render.

![image](https://user-images.githubusercontent.com/1770326/206749618-343b51bf-30d8-4fbf-99b0-08c195b25524.png)

![image (2)](https://user-images.githubusercontent.com/1770326/206749173-88a4950f-15cb-4749-ad69-90bad4da80ac.png)

### Environment

- Angular: 14.2.1
- CDK/Material: 14.2.1
- Browser(s): Cypress Chrome 108
- Operating System (e.g. Windows, macOS, Ubuntu): macOS

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Reproduce el caso reportado de async mat-autocomplete en Cypress Chrome 108 usando Angular/CDK Material 14.2.1 y compáralo con el mismo autocomplete fuera del runner de Cypress. Investiga por qué las mat-options están ausentes del HTML renderizado; el trabajo estará terminado cuando el dropdown y las opciones cargadas de forma asíncrona se rendericen durante la prueba de Cypress.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, cypress, typescript
Área
frontend, testing-qa
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.