Closed nielthiart closed 4 months ago
Realised my first commit for this was not the right solution.
There was already a --wait-for
test, so replacing the --wait
test with --wait-for
was a bad idea.
This commit reuses the --wait-for
test's HTML with a delayed div instead.
This way --wait
with --selector
is still tested. I also added this test to the multi
test.
Running
./tests/run_examples.sh
on my network often fails at theSelector with a wait
test. This happens because sometimes two seconds isn't enough for the selected element to load.Steps to reproduce
./tests/run_examples.sh
Alternatively, run the test directly:
Expected result
All tests pass.
Actual result
The
Selector with a wait
test fails with the following output.Proposed fix
Replace the
--wait 2000
argument with--wait-for "!!document.querySelector('section.secondary')"
, which should pass if the selected element loads within 30 seconds, but the test runner only waits until the element loads.