perlsky is a Perl 5 implementation of an AT Protocol Personal Data Server.
13
fork

Configure Feed

Select the types of activity you want to include in your feed.

Document reusable browser smoke workflow

alice 88e395db 5a70794c

+125
+1
README.md
··· 53 53 - Use `script/perlsky-browser-smoke bootstrap-pair` once to mint and save a dedicated smoke pair, then rerun `script/perlsky-browser-smoke run-dual` as often as you want against those same accounts. 54 54 - Use `script/perlsky-browser-smoke show-pair` to inspect the saved pair metadata and `script/perlsky-browser-smoke clear-pair` to forget it locally. 55 55 - Fresh-account creation is still available through the explicit `bootstrap-*` commands, but it is no longer the normal path for repeated browser smoke runs. 56 + - Detailed browser-smoke workflow, current interaction coverage, and the env-gated `prove` wrapper live in `docs/BROWSER_SMOKE.md`. 56 57 57 58 Moderation and labels: 58 59
+79
docs/BROWSER_SMOKE.md
··· 1 + # Browser Smoke 2 + 3 + `perlsky` ships two browser-driven `bsky.app` smoke runners: 4 + 5 + - `script/perlsky-browser-smoke run` 6 + Best for a single-account sanity pass plus direct interactions with `--target-handle`. 7 + - `script/perlsky-browser-smoke run-dual` 8 + Best for the broader reusable two-account end-to-end flow. 9 + 10 + The preferred path is the reusable dual-account smoke because it avoids minting a new actor pair on every run. 11 + 12 + ## Reusable Pair 13 + 14 + Bootstrap a dedicated smoke pair once: 15 + 16 + ```sh 17 + PERL5LIB=local/lib/perl5 perl script/perlsky-browser-smoke bootstrap-pair 18 + ``` 19 + 20 + That saves the pair locally in `.cache/browser-smoke/reusable-pair.json`. 21 + 22 + Useful maintenance commands: 23 + 24 + ```sh 25 + PERL5LIB=local/lib/perl5 perl script/perlsky-browser-smoke show-pair 26 + PERL5LIB=local/lib/perl5 perl script/perlsky-browser-smoke clear-pair 27 + ``` 28 + 29 + Run the broad strict smoke against the saved pair: 30 + 31 + ```sh 32 + PERL5LIB=local/lib/perl5 perl script/perlsky-browser-smoke run-dual \ 33 + --artifacts-dir data/browser-smoke/latest-dual \ 34 + --strict-errors 35 + ``` 36 + 37 + ## Coverage 38 + 39 + The current reusable dual-account smoke exercises these `bsky.app` flows: 40 + 41 + - login and age-gate completion 42 + - root post creation 43 + - image-post creation and record verification 44 + - profile edit plus avatar upload 45 + - local and public profile verification after edit 46 + - follow and unfollow between the two smoke accounts 47 + - like, bookmark, repost, quote, and reply 48 + - saved-posts page verification 49 + - notification API verification for like/repost/quote/reply 50 + - notifications-page load checks 51 + - mute and unmute 52 + - block and unblock 53 + - report-post draft flow without submitting the external report 54 + - cleanup of created posts plus undo of follow/like/bookmark/repost state 55 + 56 + Artifacts include screenshots plus `summary.json`, which captures: 57 + 58 + - step-by-step status 59 + - browser console entries 60 + - page errors 61 + - request failures 62 + - HTTP failures 63 + - recent XRPC traffic 64 + 65 + ## Test Suite Wrapper 66 + 67 + The browser smoke is available from `prove`, but it is intentionally opt-in: 68 + 69 + ```sh 70 + PERLSKY_RUN_BROWSER_SMOKE=1 prove -lv t/browser-smoke.t 71 + ``` 72 + 73 + That wrapper still uses `script/perlsky-browser-smoke`, so the script remains the canonical entrypoint. 74 + 75 + ## Notes 76 + 77 + - The reusable dual-account path is intentionally conservative about account creation. Fresh actors are only created through explicit `bootstrap-*` commands. 78 + - The report flow stops at the draft/submit screen on purpose so smoke runs do not send moderation reports to external services. 79 + - The current broad smoke automates only dedicated smoke accounts. It does not log into `@alice.mosphere.at`.
+45
t/browser-smoke.t
··· 1 + use v5.34; 2 + use warnings; 3 + 4 + use Config (); 5 + use FindBin qw($Bin); 6 + use File::Spec; 7 + use Test::More; 8 + 9 + BEGIN { 10 + require lib; 11 + my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 12 + lib->import( 13 + File::Spec->catdir($root, 'lib'), 14 + File::Spec->catdir($root, 'local', 'lib', 'perl5'), 15 + File::Spec->catdir($root, 'local', 'lib', 'perl5', $Config::Config{archname}), 16 + ); 17 + } 18 + 19 + plan skip_all => 'set PERLSKY_RUN_BROWSER_SMOKE=1 to run the browser smoke harness' 20 + unless $ENV{PERLSKY_RUN_BROWSER_SMOKE}; 21 + 22 + my $root = File::Spec->rel2abs(File::Spec->catdir($Bin, '..')); 23 + my $pair_file = $ENV{PERLSKY_BROWSER_PAIR_FILE} 24 + || File::Spec->catfile($root, '.cache', 'browser-smoke', 'reusable-pair.json'); 25 + 26 + my $has_explicit_pair = ($ENV{PERLSKY_BROWSER_HANDLE} && $ENV{PERLSKY_BROWSER_PASSWORD}) 27 + || (-f $pair_file); 28 + 29 + plan skip_all => "browser smoke pair not available; bootstrap one or set PERLSKY_BROWSER_* credentials" 30 + unless $has_explicit_pair; 31 + 32 + my $script = File::Spec->catfile($root, 'script', 'perlsky-browser-smoke'); 33 + my $artifacts = File::Spec->catdir($root, 'data', 'browser-smoke', 'test-suite'); 34 + my $code = system( 35 + $^X, 36 + $script, 37 + 'run-dual', 38 + '--artifacts-dir', 39 + $artifacts, 40 + '--strict-errors', 41 + ) >> 8; 42 + 43 + is($code, 0, 'browser smoke harness exits successfully'); 44 + 45 + done_testing;