Files
muninn/sidecars/reddit-post
Doar Mihai a6fb5ef1cf fix: preserve specific error message on unexpected test exceptions
The outer catch's overwrite guard checked `!outcome.error`, but outcome.error
is always truthy (even the default placeholder string), so an exception
occurring outside the two explicitly-guarded blocks (e.g. a .fill()/.click()
timeout) would leave the generic "Test did not complete" message instead of
the real error. Replaced with an explicit outcomeFinalized sentinel that is
set exactly where outcome is deliberately finalized (missing env var, login
timeout, post-submission timeout, success), so any other exception correctly
falls through to the catch-all branch with its real message.
2026-07-18 18:15:41 +03:00
..

Reddit Post Sidecar

A Playwright acceptance test that logs into Reddit with supplied credentials and creates a text post in a given subreddit.

One-time setup

cd sidecars/reddit-post
npm install
npx playwright install chromium

Usage

./run.sh --username=YOUR_USERNAME --password=YOUR_PASSWORD \
  --subreddit=test --title="Hello" --body="Post body text" [--headed]

Prints a single JSON line to stdout and exits 0 on success, exits 1 on failure:

{"success": true, "url": "https://www.reddit.com/r/test/comments/.../"}
{"success": false, "error": "Login did not complete — possible CAPTCHA or 2FA prompt"}