Repository navigation
Commit d40b519
authored
test(DropdownMenuItem): the audit opens its menu and captures a row's highlight under load (#9495)
test(DropdownMenuItem): the audit opens its menu and captures a row's highlight under load
Two load causes in the item-states audit.
The capture. The focus and hover cases read the interacted row's
background right after the interaction, but the row transitions
background-color (Item's interactive rows, --duration-fast-min): a focus
draws the outline at once and starts the background's transition, and
the spec stopped motion only after the interaction, when a running
transition keeps its duration. With starved frames the capture read the
background before the transition started. Motion now stops before the
interaction, and instead of sleeping 40 ms the capture waits for fonts,
every finite animation and transition to finish, and an interacted row's
background to equal --color-overlay-hover resolved in its theme and color
scheme, then two rendered frames. That wait doesn't fail by itself: a row
that never paints still writes its receipt and screenshot, and the
receipt's check fails.
The opening. The story's play opened the menu with a click that carries
no coordinates, so its release landed at the page's corner. DropdownMenu
lets the release of the press that opened it act once the press has
lasted 300 ms, and on a loaded machine the open's own render takes that
long; a mouse release outside the trigger and the menu then closes the
menu it opened. The play now presses and releases at the trigger's
center, where a release never closes it.1 parent 45cc3fe commit d40b519
2 files changed
Lines changed: 80 additions & 9 deletions
File tree
- apps/storybook/stories
- packages/core/src/DropdownMenu/__tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
95 | 106 | | |
96 | 107 | | |
97 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
146 | 148 | | |
147 | 149 | | |
148 | 150 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
153 | 202 | | |
154 | 203 | | |
155 | 204 | | |
| |||
211 | 260 | | |
212 | 261 | | |
213 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
214 | 267 | | |
215 | 268 | | |
216 | 269 | | |
217 | 270 | | |
218 | 271 | | |
219 | 272 | | |
220 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
221 | 281 | | |
222 | 282 | | |
223 | 283 | | |
| |||
0 commit comments