Files
OpenBB/jupyterlab/openbb/ui-tests/README.md
jmaslek b71abcfbf4 Updating some names (#1575)
* quick econ fix

* black

* keys and feature flags

* terminal name 👀

* some more replacements

* some more replacements

* edit pyproject

* gst -> openbb

* add example portfolios back to git

* Update api from gst

* sorry.  skipping some tests

* another round of names

* another round of test edits

* Missed some .gst refs and update timezone

* water mark stuff

* Fixing Names in terminal.spec and name of GTFF_DEFAULTS to OBBFF_DEFAULTS

* fix more GST to OpenBB Terminal

* Logging : merge conflicts with main

* Revert wrong files

Co-authored-by: Andrew <andrew.kenreich@gmail.com>
Co-authored-by: DidierRLopes <dro.lopes@campus.fct.unl.pt>
Co-authored-by: Chavithra PARANA <chavithra@gmail.com>
2022-03-29 09:46:26 -04:00

1.7 KiB
Vendored

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

  1. Compile the extension:
jlpm install
jlpm run build:prod
  1. Start JupyterLab with the extension installed without any token or password
jupyter lab --ServerApp.token= --ServerApp.password=
  1. 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:

  1. Compile the extension:
jlpm install
jlpm run build:prod
  1. Start JupyterLab with the extension installed without any token or password:

Using local installation

jupyter lab --ServerApp.token= --ServerApp.password=
  1. 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:

  1. 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.

  1. Start JupyterLab with the extension installed without any token or password:

Using local installation

jupyter lab --ServerApp.token= --ServerApp.password=
  1. Launch the code generator tool:
cd ui-tests
jlpm install
npx playwright install
PWDEBUG=1 npx playwright test --headed