Skip to content

Commit

Permalink
docs: how to ui-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ManonMarchand committed May 2, 2024
1 parent e34b0de commit 4c8cba8
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions js/ui-tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Testing ipyaladin interactively

## Setup and run the tests

At the root of the repo (not here):

```sh
npm install
pip install .
pip install jupyterlab
npx playwright install chromium
npx playwright test
```

There is also a GUI to see the tests execute steps by steps:

```sh
npx playwright test --ui
```

## How to extend the tests

We have access to [Playwright](https://playwright.dev/docs/intro) and
[Galata](https://github.com/jupyterlab/jupyterlab/tree/main/galata)' s APIs.

The interactive tests generation of playwright can be useful:

```sh
npx playwright codegen playwright.dev
```

but it does not know about all the helpers methods that Galata introduces to help with
notebooks testing.

## Debug

```sh
npx playwright test my_test.spec.js --debug
```

0 comments on commit 4c8cba8

Please sign in to comment.