First stab at adding support for running tests in a headless browser#92
Draft
DmitrySharabin wants to merge 2 commits intomainfrom
Draft
First stab at adding support for running tests in a headless browser#92DmitrySharabin wants to merge 2 commits intomainfrom
DmitrySharabin wants to merge 2 commits intomainfrom
Conversation
✅ Deploy Preview for h-test ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
1e3bd67 to
0d086a9
Compare
460f9f7 to
94d9824
Compare
94d9824 to
57bc7eb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uses Playwright under the hood. To keep hTest small, none of the browser binaries are installed by default.
One can run
npx playwright installto install all the browsers, ornpm install @playwright/browser-chromium,npm install @playwright/browser-firefox,npm install @playwright/browser-webkitto install Chromium, Firefox, or Webkit browser, respectively. We should probably add a note on this in our docs.On the first run, if no browser binary is downloaded, Playwright will show a friendly message:
Down there is a small demo that shows all the tests we have successfully run in a headless browser. Console formatting tests are ignored since they (not dynamically) import the Chalk package, but the browser didn't choke on them. We should probably add a separate message about what tests were ignored and why.
In the video, you can see a (intentionally) falling test from these tests (not in the PR):
hTest.Run.in.Headless.Browser.mp4