Skip to content

Commit

Permalink
Update playwright, fix test, fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
joepio committed Jul 26, 2023
1 parent 4b51fb3 commit 2440268
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 14 deletions.
File renamed without changes.
43 changes: 41 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,14 @@ https://user-images.githubusercontent.com/2183313/139728539-d69b899f-6f9b-44cb-a
- [Items are missing in my Collections / Search results](#items-are-missing-in-my-collections--search-results)
- [I get a `failed to retrieve` error when opening](#i-get-a-failed-to-retrieve-error-when-opening)
- [Can I embed AtomicServer in another application?](#can-i-embed-atomicserver-in-another-application)
- [I want to use my own authorization. How do I do that?](#i-want-to-use-my-own-authorization-how-do-i-do-that)
- [I want to use my own authorization. How do I do that?](#i-want-to-use-my-own-authorization-how-do-i-do-that)
- [Where is my data stored on my machine?](#where-is-my-data-stored-on-my-machine)
- [Also in this Repo](#also-in-this-repo)
- [`atomic-cli`](#atomic-cli)
- [`atomic-lib`](#atomic-lib)
- [Atomic Data Browser](#atomic-data-browser)
- [`@tomic/lib`](#tomiclib)
- [`@tomic/react`](#tomicreact)
- [Also check out](#also-check-out)
- [Contribute](#contribute)

Expand Down Expand Up @@ -348,7 +351,7 @@ Try re-initializing atomic server `atomic-server --initialize`.
Yes. This is what I'm doing with the Tauri desktop distribution of AtomicServer.
Check out the [`desktop`](https://github.com/atomicdata-dev/atomic-server/tree/master/desktop) code for an example!

## I want to use my own authorization. How do I do that?
### I want to use my own authorization. How do I do that?

You can disable all authorization using `--public-mode`.
Make sure AtomicServer is not publicly accessible, because this will allow anyone to read any data.
Expand Down Expand Up @@ -379,6 +382,42 @@ Powers both `atomic-cli` and `atomic-server`.

[→ Read more](lib/README.md)

### [Atomic Data Browser](/browser/data-browser/README.md)

Front-end for Atomic-Server, built with React.

### [`@tomic/lib`](/browser/lib/README.md)

<a href="https://www.npmjs.com/package\/@tomic/lib" target="_blank">
<img src="https://img.shields.io/npm/v/@tomic/lib?color=cc3534" />
</a>
<a href="https://www.npmjs.com/package/@tomic/lib" target="_blank">
<img src="https://img.shields.io/npm/dm/@tomic/lib?color=%2344cc10" />
</a>
<a href="https://bundlephobia.com/result?p=@tomic/lib" target="_blank">
<img src="https://img.shields.io/bundlephobia/min/@tomic/lib">
</a>

Library with `Store`, `Commit`, `JSON-AD` parsing, and more.

[**docs**](https://atomicdata-dev.github.io/atomic-data-browser/docs/modules/_tomic_lib.html)

### [`@tomic/react`](browser/react/README.md)

<a href="https://www.npmjs.com/package/@tomic/react" target="_blank">
<img src="https://img.shields.io/npm/v/@tomic/react?color=cc3534" />
</a>
<a href="https://www.npmjs.com/package/@tomic/react" target="_blank">
<img src="https://img.shields.io/npm/dm/@tomic/react?color=%2344cc10" />
</a>
<a href="https://bundlephobia.com/result?p=@tomic/react" target="_blank">
<img src="https://img.shields.io/bundlephobia/min/@tomic/react">
</a>

React library with many useful hooks for rendering and editing Atomic Data.

[**docs**](https://atomicdata-dev.github.io/atomic-data-browser/docs/modules/_tomic_react.html)

## Also check out

- [Atomic-Data-Browser](https://github.com/atomicdata-dev/atomic-data-browser), an in-browser app for viewing and editing atomic data. Also contains a typescript / react front-end library. Will replace most of the html templating in this project.
Expand Down
6 changes: 4 additions & 2 deletions browser/data-browser/tests/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import type { Browser, Page } from '@playwright/test';
const demoFileName = 'testimage.svg';
const testConfig: TestConfig = {
demoFileName,
demoFile: `${process.cwd()}/tests/${demoFileName}`,
demoFile: `${process.cwd()}/${demoFileName}`,
demoInviteName: 'document demo',
serverUrl: 'http://localhost:9883',
frontEndUrl: process.env.FRONTEND_URL || 'http://localhost:5173',
Expand Down Expand Up @@ -304,7 +304,9 @@ test.describe('data-browser', async () => {
await page2.goto(frontEndUrl);
await openSubject(page2, driveURL);
// TODO set current drive by opening the URL
await expect(await page2.locator('text=Unauthorized')).toBeVisible();
await expect(
await page2.locator('text=Unauthorized').first(),
).toBeVisible();

// Create invite
await page.click('button:has-text("Send invite")');
Expand Down
2 changes: 1 addition & 1 deletion browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"devDependencies": {
"@esm-bundle/chai": "4.3.4",
"@jest/globals": "^29.3.1",
"@playwright/test": "^1.29.0",
"@playwright/test": "^1.36",
"@types/chai": "^4.2.22",
"@types/jest": "^27.0.2",
"@types/node": "^16.11.4",
Expand Down
20 changes: 11 additions & 9 deletions browser/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2440268

Please sign in to comment.