Skip to content

Commit b5d9439

Browse files
committed
First cut.
1 parent a7f4ea4 commit b5d9439

File tree

10 files changed

+7700
-4
lines changed

10 files changed

+7700
-4
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,8 @@ dist/
1616
# OS junk
1717
.DS_Store
1818
Thumbs.db
19+
20+
# playright
21+
browser-extension/playwright-report/
22+
browser-extension/playwright/
23+
browser-extension/test-results/

browser-extension/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,21 @@ Every time a `textarea` shows up on a page, on initial load or later on, it gets
4242
Those values get bundled up with the `HTMLTextAreaElement` itself into an `EnhancedTextarea`, which gets added to the `TextareaRegistry`. At some interval, draft edits will get saved by the browser extension (TODO).
4343

4444
When the `textarea` gets removed from the page, the `TextareaRegistry` is notified so that the `CommentSpot` can be marked as abandoned or submitted as appropriate (TODO).
45+
46+
## Testing
47+
48+
In `tests/har` there are various `.har` files. These are complete recordings of a single page load.
49+
50+
- `npm run har:view` and you can see the recordings, without our browser extension.
51+
52+
### Recording new HAR files
53+
54+
- you can add or change URLs in `tests/har-index.ts`
55+
- `npx playwright codegen https://github.com/login --save-storage=playwright/.auth/gh.json` will store new auth tokens
56+
- login manually, then close the browser
57+
- ***these cookies are very sensitive! we only run this script using a test account that has no permissions or memberships to anything, recommend you do the same!***
58+
- `npm run har:record` this records new snapshots using those auth tokens (it needs args, run it with no args for docs)
59+
- DO NOT COMMIT AND PUSH NEW OR CHANGED `har` files!
60+
- we try to sanitize these (see `har-record.ts` for details) but there may be important PII in them
61+
- if you need new HAR files for something, let us know and we will generate them ourselves using a dummy account
62+
- IF YOUR PR CHANGES OR ADDS HAR FILES WE WILL CLOSE IT. Ask for HAR files and we'll be happy to generate clean ones you can test against.

0 commit comments

Comments
 (0)