Skip to content

Commit

Permalink
README
Browse files Browse the repository at this point in the history
  • Loading branch information
neongreen committed Jun 18, 2023
1 parent 6831847 commit 96bb011
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

* [Feature status](docs/feature-status.md)

## Local development
## Local development setup

Install Docker, if you don't have it yet.

Expand All @@ -28,6 +28,20 @@ You should also run the GraphQL codegen watcher, at least until https://github.c
npm run gql:watch
```

## Local development - running the app

Check that the services are running:

```bash
docker compose ps
```

Then:

```bash
npm run dev
```

## Local development - Tauri

```
Expand Down Expand Up @@ -71,18 +85,25 @@ npm run tauri icon public/icon-macos.png

## Running tests locally

```
```bash
npx playwright install # install browsers; only needed once
```

To run:

```
```bash
dotenv -e .env.development -- npx playwright test --workers=1
```

The server must be running for the tests to work. `--workers=1` runs tests without parallelism — this is necessary because otherwise hot reloading messes things up.

Tests use the following users:

* `alice@woc.test`, password `test`
* `bob@woc.test`, password `test`

As of Jun 2023, the tests are flaky. You might be getting `waiting for locator('text=Account') to be visible` and then you try again several times and suddenly it works.

## Upgrading Tiptap

```bash
Expand Down
6 changes: 5 additions & 1 deletion tests/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ import { hashPassword } from '../lib/password'
import { filterSync } from '../lib/array'

// A helper for Bootstrap modals. Waits for the modal to appear & disappear fully. Should help w/ flaky tests.
export async function withBootstrapModal(page: Page, open: () => Promise<void>, action: () => Promise<void>) {
export async function withBootstrapModal(
page: Page,
open: () => Promise<void>,
action: () => Promise<void>
) {
// Unfortunately this is still flaky, so I'm using a timeout instead

// await Promise.all([
Expand Down

0 comments on commit 96bb011

Please sign in to comment.