mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-28 21:12:16 +00:00
* Update jupyter dependencies to mitigate the vulnerabilities * Upgrade JupyterLab version * Upgrade jupyterlab dependencies * Update the package.json with the up-to-date jupyterlab version * Explicitly resolve the latest version of the json-schema module * Upgrade extension lock files * Upgrade playwright and it's dependencies
Test
The test will produce a video to help debugging and check what happened.
To execute integration tests, you have two options:
- use docker-compose (cons: needs to know and use docker) - this is a more reliable solution.
- run tests locally (cons: will interact with your JupyterLab user settings)
Test locally
- Compile the extension:
jlpm install
jlpm run build:prod
- Start JupyterLab with the extension installed without any token or password
jupyter lab --ServerApp.token= --ServerApp.password=
- Execute in another console the Playwright tests:
cd ui-tests
jlpm install
npx playwright install
npx playwright test
Create tests
To create tests, the easiest way is to use the code generator tool of playwright:
- Compile the extension:
jlpm install
jlpm run build:prod
- Start JupyterLab with the extension installed without any token or password:
Using local installation
jupyter lab --ServerApp.token= --ServerApp.password=
- Launch the code generator tool:
cd ui-tests
jlpm install
npx playwright install
npx playwright codegen localhost:8888
Debug tests
To debug tests, a good way is to use the inspector tool of playwright:
- Compile the extension:
jlpm install
jlpm run build:prod
Note: When compiling the extension execute the commands in the extension root (gst) folder and not the gst/ui-tests folder.
- Start JupyterLab with the extension installed without any token or password:
Using local installation
jupyter lab --ServerApp.token= --ServerApp.password=
- Launch the code generator tool:
cd ui-tests
jlpm install
npx playwright install
PWDEBUG=1 npx playwright test --headed