ipfs-companion
ipfs-companion copied to clipboard
wip: running tests in playwright-test
this PR draft is something we may pick up in spare time it does not work yet, maybe due to custom webpack config or something else
This PR adds playwright-test which enables us to run mocha tests in real WebExtension context.
Motivation
Right now we use mocks, which not always match real world behavior, which is known to be different in Firefox and Chromium (APIs diverge slightly).
Running in real WebExtension context would let us catch those discrepancies.
Caveats
- for now playwright-test can only run Chromium extension mode,
Firefox is not supported due to missing
this.browser.targets is not a function- without this we don't get real benefit on top of existing mocks, as we are unable to tell if Firefox really works (all we have are mocks)
- no headless mode for running in extension context, browser window is always shown
- this means we need set up or fix X11 for linux tests to pass