Skip to content

Commit

Permalink
Merge branch 'develop' into hm/hackweek
Browse files Browse the repository at this point in the history
  • Loading branch information
arthyn committed Nov 14, 2023
2 parents 9e9ca3e + 0b4580b commit 4044f05
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
41 changes: 41 additions & 0 deletions ui/E2E.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# UI Tests

The ui app contains a suite of automated e2e tests that run in CI and can be run locally.

The main test script is located in `rube/index.ts` and uses [Playwright](https://playwright.dev) to run.

The script:

1. fetches fake ships piers from GCS
2. downloads the urbit binaries for the local architecture
3. boots the ships
4. executes the tests against the current ui code version
5. kills spawned processes

Test specs are in the `e2e/` directory.

## Running locally

After installing this project's dependencies with `npm install`,

```
npm run e2e
```

### Debugging tests

```
npm run e2e:debug
```

Currently, tests utilize two fake ships, `~zod` and `~bus`.


To debug only tests from one of the ships, use for example


```
npm run e2e:debug:bus
```

The script will kill all processes on exit, but in some cases a localhost may be left running and generate an error when trying to run again. If this happens, find it with `ps aux | grep localhost` and kill from cmd line.
4 changes: 4 additions & 0 deletions ui/src/components/References/WritBaseReference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ function WritBaseReference({
}

const handleOpenReferenceClick = () => {
// We have nowhere to navigate to if we haven't yet loaded group information
if (!preview?.group?.flag) {
return;
}
if (!group) {
if ('post' in reference) {
navigate(
Expand Down

0 comments on commit 4044f05

Please sign in to comment.