kflorence / beaming

Beaming is a free, open source puzzle game that involves directing beams through a hexagonal grid.
https://kflorence.github.io/beaming/
Other
1 stars 0 forks source link

Fix flaky selenium tests #10

Closed kflorence closed 8 months ago

kflorence commented 8 months ago

Sometimes tests fail on the first test, and then the rest pass.

 1) Puzzle 001
       "before all" hook: bound before for "should be solved":
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/home/runner/work/beaming/beaming/test/puzzles/001.js)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

I get a similar error locally if I shut the server down before running tests. So maybe it can't connect right away?

kflorence commented 7 months ago

It was found in https://github.com/kflorence/beaming/pull/17 that the implementation of the "waiting for element to have class" method was not correct. This has eliminated additional flakiness.