After 8148 ASG account recreation + spot rotation debug session, formalize tooling for automated ad-pipeline regression checks. - /home/w4/bin/ad-test — wrapper, available globally - /home/w4/playwright-tests/ — Playwright + Chromium runtime - scripts/ad-regression.mjs — versioned copy у репо Per-URL checks (6): 1. ad-bundle loaded (window._adConfig set) 2. popunder SDK fetches 3. /api/users/<vast_spot> returns <Ad> (catches no-fill) 4. mode = "vast" after popunder cooldown active 5. .asg-container injects on play click (right data-spot-id) 6. console clean (no [ASGB LOADER] errors) Headless limitation documented: network+DOM checks cover 95% of regressions without need for full video playback validation. Use `ad-test --full` or real browser w/ ?debug=1 for visual. Memory: reference_ad_regression_tool.md added — auto-trigger rule to run ad-test after spot ID changes / mirror swaps / bundle rebuild. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1.2 KiB
Bash
Executable File
34 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
|
# ad-test — wrapper for /home/w4/playwright-tests/ad-regression.mjs
|
|
#
|
|
# Usage:
|
|
# ad-test <url1> [url2] ... [--screenshot] [--json]
|
|
# ad-test # без аргументів = default 3 URLs з 8148
|
|
#
|
|
# Examples:
|
|
# ad-test "https://www.xn--3dsq7teoyo9d.com/v/box/261085/foo"
|
|
# ad-test --screenshot "https://t1.atube.sex/v/box/123/bar"
|
|
#
|
|
# Що тестує (per URL):
|
|
# 1. ad-bundle loaded (window._adConfig set)
|
|
# 2. popunder SDK loads
|
|
# 3. /api/users/<vast_spot> повертає <Ad> (not empty no-fill)
|
|
# 4. mode = "vast" після popunder cooldown
|
|
# 5. .asg-container injects на click pjs_play_btn
|
|
# 6. console clean (no [ASGB LOADER] errors)
|
|
#
|
|
# Exit code: 0 = всі pass, 1 = >=1 fail.
|
|
|
|
set -e
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
# default — 3 URLs з 8148 для quick smoke test
|
|
set -- \
|
|
"https://www.xn--3dsq7teoyo9d.com/v/box/261085/get-your-fill-of-hardcore-anal" \
|
|
"https://www.xn--3dsq7teoyo9d.com/v/box/306026/online-kat-gives-wild-footjob" \
|
|
"https://www.xn--3dsq7teoyo9d.com/v/box/328723/lets-talk-about-hot-j-porn-videos"
|
|
fi
|
|
|
|
cd /home/w4/playwright-tests
|
|
exec timeout 300 node ad-regression.mjs "$@"
|