Skip to content

docs: update Playwright automated-testing guide - #41081

Merged
ckerr merged 1 commit into
electron:mainfrom
mxschmitt:update-playwright-docs
Jan 24, 2024
Merged

ckerr merged 1 commit into
electron:mainfrom
mxschmitt:update-playwright-docs

Conversation

@mxschmitt

@mxschmitt mxschmitt commented Jan 23, 2024 •

Copy link
Copy Markdown
Contributor

Description of Change

This PR refreshes the Playwright automated-testing guide for 2024. Relevant comments are attached on the files tab.

cc @codebytere

Checklist

  • PR description included and stakeholders cc'd
  • relevant documentation, tutorials, templates and examples are changed or added

Release Notes

Notes: none

@electron-cation electron-cation Bot added documentation 📓 semver/patch backwards-compatible bug fixes new-pr 🌱 PR opened recently labels Jan 23, 2024
unnecessary browser downloads when testing an Electron app.

```sh npm2yarn
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install --save-dev playwright

@mxschmitt mxschmitt Jan 23, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't install the browsers automatically anymore, so the environment variable is not required.
Updating ours: microsoft/playwright#29121
See the announcement: https://playwright.dev/docs/release-notes#breaking-changes-playwright-no-longer-downloads-browsers-automatically

changes that might affect the code below.
:::

:::info Using third-party test runners

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We discourage other test-runners and removed the guide a couple of releases ago.

entry point (here, it is `main.js`).

```js {5} @ts-nocheck
const { _electron: electron } = require('playwright')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@playwright/test re-exports everything inside the playwright package.

@ckerr ckerr added target/26-x-y PR should also be added to the "26-x-y" branch. target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. target/29-x-y PR should also be added to the "29-x-y" branch. labels Jan 23, 2024

@ckerr ckerr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label Jan 24, 2024
@ckerr
ckerr merged commit 5ced88a into electron:main Jan 24, 2024
@release-clerk

release-clerk Bot commented Jan 24, 2024

Copy link
Copy Markdown

No Release Notes

@trop

trop Bot commented Jan 24, 2024

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "26-x-y", please check out #41095

@trop trop Bot removed the target/26-x-y PR should also be added to the "26-x-y" branch. label Jan 24, 2024
@trop

trop Bot commented Jan 24, 2024

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "27-x-y", please check out #41096

@trop

trop Bot commented Jan 24, 2024

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "28-x-y", please check out #41097

@trop

trop Bot commented Jan 24, 2024

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "29-x-y", please check out #41098

@trop trop Bot added in-flight/27-x-y in-flight/28-x-y in-flight/29-x-y and removed target/27-x-y PR should also be added to the "27-x-y" branch. target/28-x-y PR should also be added to the "28-x-y" branch. labels Jan 24, 2024
@trop trop Bot added merged/28-x-y PR was merged to the "28-x-y" branch. merged/29-x-y PR was merged to the "29-x-y" branch. merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. and removed target/29-x-y PR should also be added to the "29-x-y" branch. in-flight/28-x-y in-flight/29-x-y in-flight/26-x-y in-flight/27-x-y labels Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📓 merged/26-x-y PR was merged to the "26-x-y" branch. merged/27-x-y PR was merged to the "27-x-y" branch. merged/28-x-y PR was merged to the "28-x-y" branch. merged/29-x-y PR was merged to the "29-x-y" branch. semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants