Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: running tests in playwright-test #846

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

lidel
Copy link
Member

@lidel lidel commented Feb 14, 2020

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

this does not work yet, maybe due to custom webpack config or somethign
else.

the goal for using playwright-test would be running tests in the same
web context, with real webextension APIs (right now we use mocks, which
not always match real world behavior)

this is something we may pick up in spare time

notes to self:

- for now playwright-test can only run Chromium extension mode,
  Firefox is not supported :-(
- no headless mode for running in extension context, browser window is
  always shown
@lidel lidel added the kind/maintenance Work required to avoid breaking changes or harm to project's status quo label Feb 14, 2020
@lidel lidel added the status/blocked/missing-api Blocked by missing API label May 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/maintenance Work required to avoid breaking changes or harm to project's status quo status/blocked/missing-api Blocked by missing API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant