Skip to content

Commit

Permalink
Update ui tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Dec 20, 2023
1 parent 3f7da9c commit a68f7c4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
7 changes: 5 additions & 2 deletions python/jupytercad_app/jupytercad_app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
except ImportError:
__version__ = "dev"

from typing import Dict
from jupyter_server.utils import url_path_join
from jupyterlab_server.config import get_page_config as gpc
from jupyter_server.config_manager import recursive_update
Expand Down Expand Up @@ -33,8 +34,10 @@ def get_page_config(base_url, app_name):
"@jupytercad/jupytercad-core",
"@jupyter/collaboration-extension",
]
federated_extensions = page_config["federated_extensions"]
federated_extensions: Dict[str, Dict] = page_config["federated_extensions"]
page_config["federated_extensions"] = [
x for x in federated_extensions if x["name"] in required_extensions
x
for x in federated_extensions
if x["name"] in required_extensions or x["name"].startswith("@jupytercad/")
]
return page_config
4 changes: 2 additions & 2 deletions ui-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"private": true,
"scripts": {
"start": "jupyter lab --config jupyter_server_test_config.py",
"test": "npx playwright test",
"test": "npx playwright test --workers 1",
"test:update": "npx playwright test --update-snapshots",
"test:debug": "PWDEBUG=1 npx playwright test"
"test:debug": "PWDEBUG=1 npx playwright test --workers 1"
},
"devDependencies": {
"@jupyterlab/galata": "^5.0.8",
Expand Down
5 changes: 5 additions & 0 deletions ui-tests/playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ module.exports = {
reuseExistingServer: false
},
retries: 1,
use: {
...baseConfig.use,
trace: 'off',

},
expect: {
toMatchSnapshot: {
maxDiffPixelRatio: 0.02,
Expand Down

0 comments on commit a68f7c4

Please sign in to comment.