angular / angular/components

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

オープン
#26,227 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/autocomplete P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Angular/CDK Material 14.2.1を使用してCypress Chrome 108で報告されたasync mat-autocompleteのケースを再現し、Cypress runnerの外部で同じautocompleteを実行した場合と比較します。レンダリングされたHTMLにmat-optionsが存在しない理由を調査します。Cypressテスト中にdropdownと非同期で読み込まれたoptionsがレンダリングされれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, cypress, typescript
領域
frontend, testing-qa
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。