UNCLASSIFIED

README.md 1.85 KB
Newer Older
Graham Smith's avatar
Graham Smith committed
1
# launchboard
ckwolff's avatar
ckwolff committed
2

Graham Smith's avatar
Graham Smith committed
3 4
Static site for https://launchboard.dsop.io (coming soon)
(staging available now: https://launchboard.preprod.dsop.io)
graham.smith's avatar
graham.smith committed
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23

## Project setup

```
npm install
```

### Compiles and hot-reloads for development

```
npm run serve
```

### Compiles and minifies for production

```
npm run build
```

graham.smith's avatar
graham.smith committed
24 25 26
## Testing

### Unit Tests
graham.smith's avatar
graham.smith committed
27 28 29 30 31

```
npm run test:unit
```

graham.smith's avatar
graham.smith committed
32
### End-to-End Tests
graham.smith's avatar
graham.smith committed
33

graham.smith's avatar
graham.smith committed
34
The e2e tests require the use of SSO to work properly. Until Platform One figures out a way to run cypress with a SSO Non-person Entity (NPE), this process will include a manual step. Before running the tests we first have to obtain a cookie value from the Launchboard FE instance we want to test.
graham.smith's avatar
graham.smith committed
35

graham.smith's avatar
graham.smith committed
36 37 38 39 40 41
1. In a browser, open dev tools and go to the Launchboard FE instance you want to test (https://localhost:3333 for dev, https://launchboard.staging.apps.il2.dsop.io for staging, etc). Log in to Platform One SSO if prompted.
2. On the `Network` tab of dev tools, click on one of the Launchboard requests, then find the `Cookie` value under `Response Headers`.
3. The piece of the cookie that handles your SSO session depends on the environment and how Keycloak is configured. Copy the authentication cookie (omit the trailing `;` if present). The following cookie formats have been observed:
    - In dev: `connect.sid=s%3A9w7jaTiFm...`
    - In staging: `__Host-launchboard-staging-authservice-session-id-cookie=lzs...`
4. Use the copied authentication cookie as the `SSO_COOKIE_VALUE` environment variable and run the tests. Example:
graham.smith's avatar
graham.smith committed
42

graham.smith's avatar
graham.smith committed
43 44 45 46 47 48
```bash
# example in dev (using launchboard-local-dev) which runs against https://localhost:3333 by default
SSO_COOKIE_VALUE=connect.sid=s%3A9w7jaTiFm... npm run test:e2e

# pipeline ci example which runs against https://launchboard.staging.apps.il2.dsop.io by default
SSO_COOKIE_VALUE=__Host-launchboard-staging-authservice-session-id-cookie=lzs... npm run test:e2e-ci
graham.smith's avatar
graham.smith committed
49
```