Skip to content

Commit

Permalink
Backport PR #15117 on branch 3.6.x (Install playwright browser in jup…
Browse files Browse the repository at this point in the history
…yterlab.browser_check) (#15122)

* Install playwright browser in jupyterlab.browser_check (#15117)

* Install playwright browser in jupyterlab.check_browser

* Install all the browsers

(cherry picked from commit c040532)

* Pin node for docs job on 3.6.x

---------

Co-authored-by: Nicolas Brichet <32258950+brichet@users.noreply.github.com>
  • Loading branch information
krassowski and brichet committed Sep 25, 2023
1 parent 136bf64 commit 7d06b49
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ dependencies:
- pytest-tornasync
- pytest-check-links
- pip
- nodejs
- nodejs=18
- jsx-lexer
- myst-parser
2 changes: 2 additions & 0 deletions jupyterlab/browser_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ async def run_browser(url):
os.makedirs(osp.join(target))
await run_async_process(["jlpm", "init", "-y"], cwd=target)
await run_async_process(["jlpm", "add", "playwright@^1.9.2"], cwd=target)
await run_async_process(["npx", "playwright", "install"], cwd=target)
shutil.copy(osp.join(here, "browser-test.js"), osp.join(target, "browser-test.js"))
await run_async_process(["node", "browser-test.js", url], cwd=target)

Expand All @@ -155,6 +156,7 @@ def run_browser_sync(url):
os.makedirs(target)
subprocess.call(["jlpm", "init", "-y"], cwd=target)
subprocess.call(["jlpm", "add", "playwright@^1.9.2"], cwd=target)
subprocess.call(["npx", "playwright", "install"], cwd=target)
shutil.copy(osp.join(here, "browser-test.js"), osp.join(target, "browser-test.js"))
return subprocess.check_call(["node", "browser-test.js", url], cwd=target)

Expand Down

0 comments on commit 7d06b49

Please sign in to comment.