diff --git a/sidecars/reddit-post/README.md b/sidecars/reddit-post/README.md index 04a2663..f2a6190 100644 --- a/sidecars/reddit-post/README.md +++ b/sidecars/reddit-post/README.md @@ -19,3 +19,19 @@ failure: {"success": true, "url": "https://www.reddit.com/r/test/comments/.../"} {"success": false, "error": "Login did not complete — possible CAPTCHA or 2FA prompt"} + +## Notes + +- On a failed run, Playwright retains a screenshot and trace under + `test-results/` for debugging (`npx playwright show-trace test-results/.../trace.zip`). + These are gitignored and not committed, but they persist on disk and may + contain the username you passed in (the password field is masked in the + browser, so its value isn't captured). Clear `test-results/` if you want + to remove them. +- The post-composer selectors (text-post tab, title/body fields, submit + button) are marked `UNVERIFIED` in `tests/reddit-post.spec.js` — they've + only been confirmed as far as this sidecar's original development + environment could reach live Reddit before being network-blocked. If a + real run on your own network fails after a successful login, start by + checking those selectors with: + `npx playwright codegen https://www.reddit.com/r/test/submit` diff --git a/sidecars/reddit-post/run.sh b/sidecars/reddit-post/run.sh index aebc038..974970f 100755 --- a/sidecars/reddit-post/run.sh +++ b/sidecars/reddit-post/run.sh @@ -20,7 +20,8 @@ for arg in "$@"; do --body=*) BODY="${arg#*=}" ;; --headed) HEADLESS_FLAG="false" ;; *) - echo "{\"success\": false, \"error\": \"Unknown argument: $arg\"}" + UNKNOWN_FLAG="${arg%%=*}" + echo "{\"success\": false, \"error\": \"Unknown argument: $UNKNOWN_FLAG\"}" exit 1 ;; esac