Conversation
tests/selenium.spec.js
Outdated
|
|
||
| // clear all data | ||
| await clickByCss("#clear-all-data"); | ||
| await driver.sleep(1000); // wait for all collections to be cleared |
There was a problem hiding this comment.
Can we wait for a certain selector instead?
There was a problem hiding this comment.
The problem here is it marks the rows as busy/ready one at a time, so the waitForLoad call doesn't work reliably as it's a race condition. Maybe we could use DOMAttrModified events and give ourselves a debounce so we wait 200ms after the last busy is removed? 🤔
There was a problem hiding this comment.
Switched to a debounce timeout that relies on a MutationObserver. It's kinda ugly. It has to inject an element to work because I don't see a way to pipe those events out of the browser (there appears to be a chrome option but no firefox option).
But, it seems to work perfectly. I tried to make the code as readable as possible.
Resolves #207 - adding automated tests to CI pipeline.
This is adding selenium tests that we can run to have confidence in our changes before merging and/or running against a dev firefox branch.
ToDo:
Notes: