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

Commit7fd9a75

Browse files
Emyrkaslilac
andauthored
chore: nix shell to support playwright e2e tests (#12917)
* chore: nix shell to support playwright e2e testsnix is running an older version of chromium, so had to reduce theplaywright version.* Add to e2e readme* add enterprise test comment* add note about install to readme* make fmt* remove shellhook messageCo-authored-by: Kayla Washburn-Love <mckayla@hey.com>* add link to nixos playwright package to get version* formatting---------Co-authored-by: Kayla Washburn-Love <mckayla@hey.com>
1 parent566f8f2 commit7fd9a75

File tree

5 files changed

+51
-18
lines changed

5 files changed

+51
-18
lines changed

‎flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎flake.nix

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
pango
5959
pixman
6060
pkg-config
61+
playwright-driver.browsers
6162
postgresql_13
6263
protobuf
6364
protoc-gen-go
@@ -86,7 +87,13 @@
8687
in
8788
{
8889
defaultPackage=formatter;# or replace it with your desired default package.
89-
devShell=pkgs.mkShell{buildInputs=devShellPackages;};
90+
devShell=pkgs.mkShell{
91+
buildInputs=devShellPackages;
92+
shellHook=''
93+
export PLAYWRIGHT_BROWSERS_PATH=${pkgs.playwright-driver.browsers}
94+
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
95+
'';
96+
};
9097
packages.all=allPackages;
9198
}
9299
);

‎site/e2e/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,29 @@ pnpm playwright:test
2020
# Run a specific test (`-g` stands for grep. It accepts regex).
2121
pnpm playwright:test -g'<your test here>'
2222
```
23+
24+
#Using nix
25+
26+
If this breaks, it is likely because the flake chromium version and playwright
27+
are no longer compatible. To fix this, update the flake to get the latest
28+
chromium version, and adjust the playwright version in the package.json.
29+
30+
You can see the playwright version here:
31+
https://search.nixos.org/packages?channel=unstable&show=playwright-driver&from=0&size=50&sort=relevance&type=packages&query=playwright-driver
32+
33+
```shell
34+
# Optionally add '--command zsh' to choose your shell.
35+
nix develop
36+
cd site
37+
pnpm install
38+
pnpm build
39+
pnpm playwright:test
40+
```
41+
42+
#Enterprise tests
43+
44+
Enterprise tests require a license key to run.
45+
46+
```shell
47+
export CODER_E2E_ENTERPRISE_LICENSE=<license key>
48+
```

‎site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
},
9696
"devDependencies": {
9797
"@octokit/types":"12.3.0",
98-
"@playwright/test":"1.42.1",
98+
"@playwright/test":"1.40.1",
9999
"@storybook/addon-actions":"8.0.5",
100100
"@storybook/addon-essentials":"8.0.5",
101101
"@storybook/addon-interactions":"8.0.5",

‎site/pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp