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

Local and GitHub playwright testing improvements #1472

Merged
merged 4 commits into from
Sep 22, 2022

Conversation

myieye
Copy link
Collaborator

@myieye myieye commented Sep 20, 2022

Description

Various minor playwright improvements:

  • Cache playwright browsers in GHA (per playwright version as documented). Not a huge performance boost, but not a huge change either
  • Upload the playwright results as a GitHub artifact, which is then available for download (see screenshot)
  • Allow passing playwright params to make file. E.g. make playwright-tests params="--headed"
  • Allow running make files with npm (I find it very handy for the commands to be directory independent) E.g. npm run make playwright-tests params="--headed"
  • Wait for forgotten promise in globalSetup.ts and add ts-lint rule to watch for cases like this
  • Close browserContexts in globalSetup.ts, because: (1) it's documented as best practice, (2) it doesn't break anything and (3) it eliminates a potential culprit of "socket hang up" mentioned in bug: Race condition in Playwright webServer config #1402

Type of Change

  • New feature

Screenshots

image

Checklist

  • I have performed a self-review of my own code
  • I have reviewed the title/description of this PR which will be used as the squashed PR commit message
  • I have commented my code, particularly in hard-to-understand areas

…wright params

E.g. npm run make playwright-tests params="--headed"
@github-actions
Copy link

github-actions bot commented Sep 20, 2022

Unit Test Results

368 tests   368 ✔️  9s ⏱️
    1 suites      0 💤
    1 files        0

Results for commit ee6687a.

♻️ This comment has been updated with latest results.

- Save/Upload test results
- Save screenshots (these seems to be included in traces, so they may not add value)
- Show list of tests as they're executed (if uncaught exceptions are thrown in async functions in tests, this may make it easier to figure out where)
@myieye myieye marked this pull request as ready for review September 20, 2022 15:09
Copy link
Collaborator

@megahirt megahirt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are great additions, thanks @myieye !

.github/workflows/pull-request.yml Show resolved Hide resolved
.github/workflows/pull-request.yml Show resolved Hide resolved
docker/Makefile Show resolved Hide resolved
package.json Show resolved Hide resolved
test/e2e/utils/globalSetup.ts Show resolved Hide resolved
test/e2e/utils/globalSetup.ts Show resolved Hide resolved
@myieye myieye merged commit 0a66f3e into develop Sep 22, 2022
@myieye myieye deleted the chore/testing-improvements branch September 22, 2022 09:50
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

Successfully merging this pull request may close these issues.

3 participants