Make end-to-end tests wait for the extension to signal that it's ready
Background / User story
In #1588 (closed) we refactored the startup calls of the background page of the extension. However, this caused the automated tests to fail. Researching the issue suggests that the extension's startup now took longer, which caused the test runner to try to interact with the extension before it was ready. As a result, we had to revert the change that caused the startup delay.
In #1222 (closed) we introduced the capability that the extension can signal when it's ready to test. Making the end-to-end tests (also called "uitests") wait for this signal should resolve the problem with failing tests. This would also make the end-to-end tests more robust.
What to change
- Design: N/A
- Research: N/A
- Spec: N/A
- Legal: N/A
-
Development:
- Wait for the ready state signal before running tests
- If necessary, move signaling the ready state further down the bootstrapping process.
- The according function call is
setReadyState(ReadyState.started);
- Right now, it's hidden within
/adblockpluschrome/lib/subscriptionInit.js
, but to really make sure the extension is ready, it should be the last call in thebootstrap()
function in the/src/bootstrap/background/base.ts
file
- The according function call is
Hints for testers
TBD
Hints for translators
Nothing to translate.