6e584adfc5
In the scripting integration tests we use a few different typing delays, mostly 100 or 200 milliseconds. According to for example https://www.typingpal.com/en/documentation/school-edition/pedagogical-resources/typing-speed, a fast typing speed is around 300 characters per minute, which is 5 characters per second and therefore a delay of 200 milliseconds between each keystroke. Note that this is already above average, so in practice the delay will be even larger. Therefore the 100 milliseconds variant is unrealistically fast and therefore not suitable for the integration tests which aim to simulate the average user behavior. On top of that, the quick typing speeds are problematic for the tests that involve validation alert dialogs appearing during typing. In those tests a handler is registered to close the dialog once it pops up, but it takes time for Puppeteer to notice the dialog, trigger the handler and close it. If the typing delay, which is the delay between the key down and key up events according to the Puppeteer source code at https://github.com/puppeteer/puppeteer/blob/master/packages/puppeteer-core/src/cdp/Input.ts#L209-L215, is too short, the key up event will be fired before the dialog is closed. In that time the text box we're typing in is not focused, so when the dialog is closed the `page.type()` call on the text box will never resolve because the key up event never reached the text box. This commit aims to fix the issues by converting all 100 millisecond delays to 200 milliseconds. For instance the "must check input for US zip format" failed pretty consistently locally before and hasn't failed anymore with a 200 millisecond delay. |
||
---|---|---|
.. | ||
accessibility_spec.js | ||
annotation_spec.js | ||
copy_paste_spec.js | ||
find_spec.js | ||
freetext_editor_spec.js | ||
ink_editor_spec.js | ||
scripting_spec.js | ||
stamp_editor_spec.js | ||
test_utils.js |