Skip to content

Commit

Permalink
docs: better puppeteer documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kkalev committed Dec 8, 2023
1 parent 696cc2d commit e8c7929
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ console.log(url[0]);
- Example: `await gunet.casLogin(page, process.env.CAS_USER, process.env.CAS_PASSWORD,process.env.CAS_LANG);`

## Scripts
* `run_test.sh <scenario> <server URL>`: Run a specific specified scenario against the `<server URL>`. For example: `./run_test.sh cas https://host.docker.internal:8443/cas`
* `run_test.sh <scenario> <server URL>`: Run a specific specified scenario against the `<server URL>`. For example: `run_test.sh cas https://host.docker.internal:8443/cas`. The `scenario` is a folder under `scenarios/` containing a file `script.js`

## Usage
* Build: `docker compose -f docker-compose.build.yaml build`
Expand All @@ -134,9 +134,9 @@ COPY scenarios/ ${PUPPETEER_ROOT}/scenarios/
- `CAS_TYPE`: The CAS type. Can be one of `simple-cas` for typical CAS (default) or `gunet-cas` (for GUNet CAS)
* Show module version: `docker run --rm ghcr.io/gunet/puppeteer npm list`
* General Run: `docker run -it --cap-add=SYS_ADMIN --rm ghcr.io/gunet/puppeteer node --unhandled-rejections=strict <scenario + args>`
* Using the `run_test.sh`: `docker run -it --cap-add=SYS_ADMIN --rm ghcr.io/gunet/puppeteer ./run_test.sh <scenario> <url>`
* Specific scenarios:
- `cas`: `./login.js <SSO BASE URL>`
* Using the `run_test.sh` (scenarios ): `docker run -it --cap-add=SYS_ADMIN --rm ghcr.io/gunet/puppeteer bash run_test.sh <scenario> <url>`
* Arguments
- `<SSO BASE URL>`: An example might be `https://sso.uoi.gr` or `https://worker-01.dev.gunet.gr:8443/cas` (in the case of `simple-cas`)
* Automatic testig with docker compose stack: `docker compose -f <your docker compose stack yaml file> up --exit-code-from <puppeteer service> --attach <puppeteer service`
Expand Down

0 comments on commit e8c7929

Please sign in to comment.