Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: nix shell to support playwright e2e tests#12917

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Emyrk merged 8 commits intomainfromstevenmasley/playwright-nix
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletionsflake.lock
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.

9 changes: 8 additions & 1 deletionflake.nix
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -58,6 +58,7 @@
pango
pixman
pkg-config
playwright-driver.browsers
postgresql_13
protobuf
protoc-gen-go
Expand DownExpand Up@@ -86,7 +87,13 @@
in
{
defaultPackage = formatter; # or replace it with your desired default package.
devShell = pkgs.mkShell { buildInputs = devShellPackages; };
devShell = pkgs.mkShell {
buildInputs = devShellPackages;
shellHook = ''
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
'';
};
packages.all = allPackages;
}
);
Expand Down
26 changes: 26 additions & 0 deletionssite/e2e/README.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -20,3 +20,29 @@ pnpm playwright:test
# Run a specific test (`-g` stands for grep. It accepts regex).
pnpm playwright:test -g '<your test here>'
```

# Using nix
Copy link
Member

Choose a reason for hiding this comment

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

I think it's probably worth linking tohttps://search.nixos.org/packages?channel=unstable&type=packages&query=playwright-driver somewhere in this section as a quick way to figure out what the "right" Playwright version is

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

👍


If this breaks, it is likely because the flake chromium version and playwright
are no longer compatible. To fix this, update the flake to get the latest
chromium version, and adjust the playwright version in the package.json.

You can see the playwright version here:
https://search.nixos.org/packages?channel=unstable&show=playwright-driver&from=0&size=50&sort=relevance&type=packages&query=playwright-driver

```shell
# Optionally add '--command zsh' to choose your shell.
nix develop
cd site
pnpm install
pnpm build
pnpm playwright:test
```

# Enterprise tests

Enterprise tests require a license key to run.

```shell
export CODER_E2E_ENTERPRISE_LICENSE=<license key>
```
2 changes: 1 addition & 1 deletionsite/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -95,7 +95,7 @@
},
"devDependencies": {
"@octokit/types": "12.3.0",
"@playwright/test": "1.42.1",
"@playwright/test": "1.40.1",
"@storybook/addon-actions": "8.0.5",
"@storybook/addon-essentials": "8.0.5",
"@storybook/addon-interactions": "8.0.5",
Expand Down
20 changes: 10 additions & 10 deletionssite/pnpm-lock.yaml
View file
Open in desktop

Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.


[8]ページ先頭

©2009-2025 Movatter.jp