Refactor: [combobox]: rework pageUp/down scroll test to do away with the fixed delay. #4391
Labels
0 - new
New issues that need assignment.
estimate - 3
A day or two of work, likely requires updates to tests.
needs milestone
Planning workflow - pending milestone assignment, has priority and/or estimate.
p - low
Issue is non core or affecting less that 10% of people using the library
refactor
Issues tied to code that needs to be significantly reworked.
Description
Follow up to issue #4304
Specifically Keyboard Navigation test "when the combobox is focused & closed, Page up/down (fn arrow up/down) scrolls up and down the page"
PageDown/Up scroll test fails if not delayed. Implemented page.waitForTimeout(500) to make it pass. WaitForChanges() won’t work either.
Needs to be revisited because we want to avoid delays with magic numbers in tests and keep the tests running as fast as possible.
Proposed Advantages
Using fixed delays makes the test brittle, since the time it takes for what we're waiting for to happen could change. It might be better to rework it to use waitForSelector. Waiting for something to appear will make the amount of time variable and test more stable.
Which Component
combobox
Relevant Info
No response
The text was updated successfully, but these errors were encountered: