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

Decide which functional/e2e test framework to use #38

Open
lfilho opened this issue Jun 12, 2020 · 5 comments
Open

Decide which functional/e2e test framework to use #38

lfilho opened this issue Jun 12, 2020 · 5 comments

Comments

@lfilho
Copy link
Owner

lfilho commented Jun 12, 2020

See #6

Jest will be used for unit testing. Later on we need to investigate if Jest can be a driver for playwright and the e2e tests.

@lfilho
Copy link
Owner Author

lfilho commented Jun 12, 2020

For future ref: https://jestjs.io/docs/en/puppeteer

@lfilho
Copy link
Owner Author

lfilho commented Jun 13, 2020

To answer my own question above, yes, Jest can easily be used together with playwright or puppeteer.

I have stumbled upon a different blocker preventing me from using playwright or puppeteer. I need them to connect to web-ext firefox and that's failing. I have described the issue in detail in mozilla/web-ext#1927, puppeteer/puppeteer#6016 and microsoft/playwright#558 (comment)

Path forward: I must avoid spending more time in that rabbit hole and keep the project on track. Here's my plan:

  1. Move on with my current deliverables without automated functional tests, instead I will
  2. Continue to add unit / integration tests whenever possible
  3. Testing things manually on the browser and pasting screenshots / logs on Github issues and PRs
  4. 1 day before my submission time is up, I will revisit the above links for a possible solution that would unblock me and implement the missing tests retroactively. If no solution comes up:
  5. Use something like karma.js on our test_page.html and run the functional tests in-browser

Will you keep you posted :)

@lfilho
Copy link
Owner Author

lfilho commented Jun 14, 2020

Took a few minutes to contribute back to Mozilla and update their docs -- took me a good a while to find that option which was not on their official docs: mozilla/extension-workshop#649

@lfilho
Copy link
Owner Author

lfilho commented Jun 15, 2020

Turns out we also can't use jsdom for even basic DOM testing as they don't support ESM yet: jsdom/jsdom#2475

Path foward: keep doing manual tests + screenshots on every PR for now. Implement those basic DOM testing steps with playwright/puppetter whenever the issues highlighted in my previous commented get unblocked.

@lfilho
Copy link
Owner Author

lfilho commented Jun 17, 2020

Another small PR to Mozilla: mozilla/web-ext#1933

@lfilho lfilho changed the title Decide which e2e test framework to use Decide which functional/e2e test framework to use Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant