The Web-Component cypress test fails every now and again, randomly, and it turns out it's because server hasn't finished starting yet when Cypress starts to do the tests.
The problem is that wait-on: "http://localhost:3333/build/web-component.esm.js" is not sufficient: that tiny page is available quickly, but the other .js file it points to are not, but their name contains a hash so we can't wait on them.
Doing a sleep 15 is kinda ugly, but it's the best I could find. The runs I checked took 9 seconds.
Feedback sought?
rubber stamping, really, unless you have a better solution.
Priority?
medium
Tests added?
n/a
How to test?
Just see that CI is more reliable, but it was a sporadic problem, so it's only over time we'll see the difference.
PR Goal?
Stabilize the flaky web-component test in CI
Fixes?
The Web-Component cypress test fails every now and again, randomly, and it turns out it's because server hasn't finished starting yet when Cypress starts to do the tests.
The problem is that
wait-on: "http://localhost:3333/build/web-component.esm.js"
is not sufficient: that tiny page is available quickly, but the other .js file it points to are not, but their name contains a hash so we can't wait on them.Doing a
sleep 15
is kinda ugly, but it's the best I could find. The runs I checked took 9 seconds.Feedback sought?
rubber stamping, really, unless you have a better solution.
Priority?
medium
Tests added?
n/a
How to test?
Just see that CI is more reliable, but it was a sporadic problem, so it's only over time we'll see the difference.
Confidence?
pretty high
Version change?
no