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

docs: update Playwright automated-testing guide #41081

Merged
merged 1 commit into from
Jan 24, 2024

Conversation

mxschmitt
Copy link
Contributor

@mxschmitt mxschmitt commented Jan 23, 2024

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 in the last 24 hours labels Jan 23, 2024
unnecessary browser downloads when testing an Electron app.

```sh npm2yarn
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm install --save-dev playwright
Copy link
Contributor Author

@mxschmitt mxschmitt Jan 23, 2024

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

[Playwright's releases][playwright-releases] page to learn about
changes that might affect the code below.
:::

:::info Using third-party test runners
Copy link
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.

### Write your tests

Playwright launches your app in development mode through the `_electron.launch` API.
To point this API to your Electron app, you can pass the path to your main process
entry point (here, it is `main.js`).

```js {5} @ts-nocheck
const { _electron: electron } = require('playwright')
Copy link
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
Copy link
Member

@ckerr ckerr left a comment

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 in the last 24 hours label Jan 24, 2024
@ckerr ckerr merged commit 5ced88a into electron:main Jan 24, 2024
33 checks passed
Copy link

release-clerk bot commented Jan 24, 2024

No Release Notes

@trop
Copy link
Contributor

trop bot commented Jan 24, 2024

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
Copy link
Contributor

trop bot commented Jan 24, 2024

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

@trop
Copy link
Contributor

trop bot commented Jan 24, 2024

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

@trop
Copy link
Contributor

trop bot commented Jan 24, 2024

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