
Ui Responsive Testing Skill
- 1 installs
- Updated June 8, 2026
- kunaldev476/uiresponsivenesstestingskill
Install this to have your agent review Playwright responsive screenshot slices for layout defects and spelling after UI responsive test runs complete.
About
This skill acts as the QA Visual Review Monitor for ui-responsive-testing-skill: it picks up Playwright responsive test output, finds AI Review Hook rows marked pending-ai-review, and inspects viewport screenshot slices for visual regressions and spelling mistakes. developers shipping responsive SaaS or marketing sites can close the loop between automated multi-viewport captures and human-grade visual judgment without manually opening dozens of PNGs. The workflow insists on reading test-result.md first, stabilizing slice files, then executing a dedicated spelling protocol before composing the report. When users need a tougher pass after a missed typo, supplemental mode adds fresh audit sections instead of mutating earlier reviews. It complements spec-driven responsive testing by turning machine-generated hooks into structured AI analysis ready for fix lists or PR follow-ups.
- Processes pending-ai-review rows in test-results/*/test-result.md after Playwright runs
- Reviews ordered [viewport]_slice_*.png screenshots per pending viewport
- Spelling protocol runs before the visual report is written
- Supplemental stricter re-audit appends new sections without editing prior AI review text
- Triggers after ui-responsive-testing-skill v2 spec generation or when hooks show QA_AI_ANALYSIS_READY
Ui Responsive Testing Skill by the numbers
- 1 all-time installs (skills.sh)
- Ranked #1,750 of 2,153 Testing & QA skills by installs in the Skillselion catalog
- Data as of Jul 7, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kunaldev476/uiresponsivenesstestingskill --skill ui-responsive-testing-skillAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| Last updated | June 8, 2026 |
| Repository | kunaldev476/uiresponsivenesstestingskill ↗ |
What it does
Install this to have your agent review Playwright responsive screenshot slices for layout defects and spelling after UI responsive test runs complete.
Files
UI Responsive Testing Skill
Load this skill when the user explicitly names ui-responsive-testing-skill or asks for responsive UI QA generation.
Purpose
Generate a focused, repeatable Playwright QA spec for one URL. The generated spec validates:
1. Runtime health. 2. Visible main-content links. 3. Main-content buttons and CTAs. 4. Page sections. 5. Images, icons, and media. 6. Layout integrity screenshots and AI review hooks.
Never run the generated Playwright tests as part of this skill. Provide commands with --workers=1 for the user to run.
Required References
Read only the references needed for the current task:
reference/test-matrix.md- exact six-test matrix.reference/helpers.md- inline helper requirements.reference/reporting.md- result file, screenshots, and AI hook status behavior.reference/visual-review.md- monitor handoff and strict spelling review.reference/non-negotiable-rules.md- scroll, grouping, exclusion, hook, and spelling rules.reference/spec-self-check.md- pre-completion checklist.reference/platform-adapters.md- WordPress, Elementor, and similar page adapters.templates/playwright-spec-skeleton.ts- canonical spec shape.
Non-Negotiable Behavior
- Generate exactly six grouped tests per enabled viewport: runtime health, links, CTAs, sections, media, and layout integrity.
- Group tests under
test.describe(vp.name, ...)for each enabled viewport. Do not flatten viewport tests at file scope. - Put
test.describe.configure({ mode: 'serial' })at file top. - Keep all helpers inline in
tests/ui-responsive/[page-slug].spec.ts. - Exclude header, nav, mobile menu, footer, and their descendants from validation, screenshots, spelling, and AI review.
- Use
classList.contains()in ancestor exclusion checks. Do not use substring checks againstclassName. - Call
ensureInViewport()before every check, highlight, click, screenshot, or section capture. - Section checks must draw a visible
highlightSectionBandand overlaySECTION n/N - {label}. - Layout tests must capture content-zone screenshot slices, log
[QA_AI_ANALYSIS_READY], and writepending-ai-reviewhook rows. - After the monitor reviews a viewport, it must update that processed hook row from
pending-ai-reviewtoai-review-completed.
Do not generate removed v1 categories: forms, dynamic widgets, page rendering/framework integrity, or accessibility smoke tests.
Workflow
1. Live Inventory
Require a full https:// URL. Derive PAGE_SLUG from the last path segment, using home for the root path.
Confirm HTTP 2xx before generating files. Record:
- title
- meta description when available
- H1 text and count
- platform signals
- main CTA hints
- main-content image/media count
- section hints
If the URL is unreachable, report the status and stop.
2. Generate Or Update Spec
Write tests/ui-responsive/[page-slug].spec.ts.
The spec must:
- Use the exact six-test matrix.
- Keep runtime-discovered links, CTAs, sections, and media as plain objects.
- Track
LAYOUT_HOOK_VIEWPORTSafter successful screenshot capture. - Append to
test-results/[page-slug]/test-result.md. - Write layout screenshots to
test-results/[page-slug]/screenshots/. - Include
Target URL: [url]in each test run block. - Use
ai-review-completedfor already reviewed viewports andpending-ai-reviewfor new hooks.
Create tests/ui-responsive/qa-run-config.json only if missing. Devices default to false; preserve existing device settings when updating an existing config.
3. Self-Check
Before completion, check the generated spec against reference/spec-self-check.md.
At minimum verify:
- serial mode exists
- each enabled viewport has six tests
- no removed v1 categories exist
ensureInViewportis used- exclusion uses
classList.contains - layout test logs AI hooks
appendResults()writes hook rows fromLAYOUT_HOOK_VIEWPORTS- user commands include
--workers=1
Use playwright test [spec] --list only as a non-executing parse/list check.
4. Monitor Handoff
After spec generation or update, spawn or reuse qa-visual-review-monitor from agents/qa-visual-review-monitor.toml.
Use this instruction:
Use the qa-visual-review-monitor monitor agent to watch test-results/ for pending-ai-review hooks. Perform a strict spelling audit. Do not rely on any previous Spelling Check section. Read every screenshot slice in order, then do a second word/token pass for small copy, cards, pills, buttons, repeated boundary text, missing spaces, merged words, odd capitalization, transpositions, and near-word errors. Report every confirmed typo with all visible slice names. After appending review sections for a viewport, update that processed hook row from pending-ai-review to ai-review-completed; do not rewrite any other hook rows or prior review sections.Completion Output
Report:
- files changed
- URL and slug
- enabled viewports
- inventory counts
- six tests per viewport
- spec path
- result file path
- monitor status
- run commands, not executed
name = "qa-visual-review-monitor"
description = "Processes pending-ai-review hooks in test-results/*/test-result.md after UI responsive Playwright runs. Reviews layout screenshot slices for visual defects and spelling. Use after ui-responsive-testing-skill spec generation or when the user runs responsive QA tests."
nickname_candidates = ["Visual Review", "Spelling Audit", "QA Monitor"]
developer_instructions = """
You are the QA Visual Review Monitor for ui-responsive-testing-skill.
## Trigger
Run when:
- A ui-responsive v2 spec was just generated.
- The user ran Playwright responsive tests.
- test-results/*/test-result.md contains pending-ai-review in AI Review Hooks.
- The user reports that a prior AI spelling review missed mistakes and requests a stricter supplemental audit.
## Workflow
1. Find result files with `find test-results -name test-result.md` or watch a known page-slug folder.
2. Read test-result.md before opening screenshots.
3. Process only rows shaped like `| viewport | QA_AI_ANALYSIS_READY | pending-ai-review |`.
4. For each pending viewport, read `[viewport]_slice_*.png` in order and wait until file size and mtime are stable.
5. Perform the spelling protocol before writing the report. If an AI Visual Review or Spelling Check section already exists for the viewport but the prompt asks for a stricter re-audit, append a new supplemental section instead of editing old text. In supplemental mode, process the requested viewport even when no hook row is pending.
6. Append to the bottom of test-result.md:
- `## AI Visual Review - [viewport]` with a defects table or "No visual defects found."
- `## Spelling Check - [viewport]` with every confirmed typo or "No spelling issues detected." plus slice range.
- `## UI Suggestions - [viewport]` for advisory issues only.
- `AI Review Completion Note`.
7. For stricter re-audits, append:
- `## Supplemental Spelling Audit - [viewport]`.
- `## Supplemental UI Suggestions - [viewport]`.
- `Supplemental AI Review Completion Note`.
8. After appending the review sections for a viewport, update that processed hook row status from `pending-ai-review` to `ai-review-completed`.
9. Exclude header, nav, mobile-menu, footer, and their descendants from all findings.
10. Compare adjacent slices before reporting slice-boundary clipping.
11. Treat intentional sticky, fixed, or floating UI as non-defects unless main content is blocked.
## Spelling
- Do two passes on all main-content visible text in every slice:
1. Line pass: read every visible line from top to bottom, including small card/body copy, labels, pills, buttons, and repeated slice-boundary text.
2. Word pass: scan each word/token for missing letters, extra letters, transpositions, merged words, missing spaces, odd capitalization inside words, and malformed common phrases.
- Explicitly cover hero copy, section intro text, small cards, outcome cards, labels/pills, CTA text, repeated boundary text, and low-contrast body copy.
- Report all confirmed issues, not only obvious dictionary misspellings.
- Include ordinary typos, malformed words, missing-space or merged-token errors, and near-word/OCR-looking errors when context clearly implies the correction.
- Do not stop after the first issue. Do not assume a previous Spelling Check section is complete.
- Compare adjacent slices and deduplicate repeated text, but list every slice where the issue is visible.
- Preserve brand/product/technology names unless clearly wrong in context. Examples to allow: Inscopix, nVista, nVoke, nVue, React.js, Sails.js, Janus, MQTT, MIRA, GPIO.
- When uncertain, add a low-confidence note in UI Suggestions; do not mark uncertain product/domain terminology as a confirmed typo.
## Deterministic Spelling Output
Before appending the spelling section, build an internal candidate list from every slice:
`slice`, `visible text line`, `candidate token/phrase`, `reason`, `confirmed correction`, `confidence`.
Only append confirmed issues in the spelling table. Use this exact table shape for both normal and supplemental spelling sections:
```markdown
| Slice | Text | Issue | Suggested correction | Confidence |
| --- | --- | --- | --- | --- |
```
Use high confidence only for clear misspellings or malformed words in context. Use medium for likely copy errors. Put low-confidence terminology questions in UI suggestions instead of the spelling table.
## Polling
- 30s while files change; 60s recent activity; 270s idle.
- Stop after 30 minutes with no pending hooks, or when user asks to stop.
- Stay silent when idle.
## Constraints
- Do not edit hook rows in place except to update a processed viewport hook from `pending-ai-review` to `ai-review-completed` after appending its review sections.
- Do not create ai-agent-report.md or other files.
- Do not modify specs, screenshots, or site source.
- One monitor per workspace; process all page slugs in test-results/.
"""
Examples
Use ui-responsive-testing-skill for https://example.com/case-study/Use ui-responsive-testing-skill to generate desktop and mobile tests for https://example.com/about/After generation:
# Edit tests/ui-responsive/qa-run-config.json — enable desktop: true
npx playwright test tests/ui-responsive/case-study.spec.ts --workers=1 --headedThen invoke monitor:
Use the qa-visual-review-monitor monitor agent to process pending AI review hooks. Perform a strict spelling audit with both a line pass and a word/token pass.If a previous spelling review missed issues:
Use the qa-visual-review-monitor monitor agent defined in agents/qa-visual-review-monitor.toml. A previous AI review exists, but the user reports it missed spelling mistakes. Perform a strict supplemental spelling audit, not a normal first-pass review. Append only Supplemental Spelling Audit, Supplemental UI Suggestions, and Supplemental AI Review Completion Note at the bottom of test-result.md.Helpers Contract (inline in every generated spec)
Viewport gate (required before interaction)
async function ensureInViewport(
page: Page,
target: Locator | { scrollY: number },
): Promise<void> {
if ('scrollY' in target) {
await page.evaluate((y) => window.scrollTo({ top: Math.max(0, y - 80), behavior: 'instant' }), target.scrollY);
await page.waitForTimeout(150);
return;
}
await target.scrollIntoViewIfNeeded({ timeout: 8000 }).catch(async () => {
const box = await target.boundingBox();
if (box) {
await page.evaluate((y) => window.scrollTo({ top: Math.max(0, y - 80), behavior: 'instant' }), box.y);
}
});
await page.waitForTimeout(150);
const box = await target.boundingBox();
if (box) {
const vh = page.viewportSize()?.height ?? 900;
const inView = box.y >= -20 && box.y + box.height <= vh + 40;
if (!inView) {
await page.evaluate((y) => window.scrollTo({ top: Math.max(0, y - 80), behavior: 'instant' }), box.y);
await page.waitForTimeout(150);
}
}
}Rule: Every link, button, image/media target, and section check calls ensureInViewport immediately before highlight or click.
Section band highlight (required for test 4)
async function highlightSectionBand(
page: Page,
top: number,
height: number,
label: string,
): Promise<void> {
await page.evaluate(({ t, h, lbl }) => {
document.getElementById('qa-section-band')?.remove();
document.getElementById('qa-section-label')?.remove();
const band = document.createElement('div');
band.id = 'qa-section-band';
const rect = { top: t, height: Math.max(h, 120) };
Object.assign(band.style, {
position: 'absolute',
left: '0',
width: '100%',
top: `${rect.top}px`,
height: `${rect.height}px`,
border: '3px dashed #00e676',
background: 'rgba(0,230,118,0.08)',
pointerEvents: 'none',
zIndex: '2147483644',
boxSizing: 'border-box',
});
const tag = document.createElement('div');
tag.id = 'qa-section-label';
tag.textContent = `▶ ${lbl}`;
Object.assign(tag.style, {
position: 'absolute',
left: '12px',
top: `${Math.max(0, rect.top - 28)}px`,
background: '#00e676',
color: '#000',
padding: '4px 10px',
fontWeight: '700',
fontSize: '13px',
zIndex: '2147483645',
pointerEvents: 'none',
borderRadius: '4px',
});
document.body.appendChild(band);
document.body.appendChild(tag);
}, { t: top, h: height, lbl: label });
if (VISUAL_MODE) await page.waitForTimeout(700);
}
async function clearSectionBand(page: Page): Promise<void> {
await page.evaluate(() => {
document.getElementById('qa-section-band')?.remove();
document.getElementById('qa-section-label')?.remove();
});
}Exclusion (Rule 1)
Use `classList.contains()` only in ancestor walks. Early exit at content roots:
id === 'main' || id === 'av-content' || id === 'content' || id === 'page-content'
Never String(className).toLowerCase().includes('av-header').
Other required helpers
- Visual:
showQaOverlay,highlightElement(vialocator.evaluate),clearHighlight,showPointerAt,visuallyClick(callsensureInViewportfirst) - Links:
collectNormalLinks,safeClickAndVerifyTarget(ensureInViewport before click) - Layout:
detectStickyOverlays,showContentAreaHighlight,captureLayoutSlices(content-zone clip only) - Metadata:
sanitizeFailureReason,recordCheckResult,classifyLink,isInsideExcludedRegion(locator.evaluate)
Data collection
- Links/CTAs: single
page.evaluate→ plain objects; never holdLocator[]acrosspage.goto. - Internal links:
page.goto(href)afterensureInViewport, not stale locator click. - Images:
locator.evaluateonHTMLImageElement— noelementHandle().
Section selectors
const SECTION_SELECTORS = [
'section',
'[class*="avia-section"]',
'[class*="elementor-section"]',
'.wp-block-group',
'[data-section-id]',
];Deduplicate with 50px Y-bucket. Store { label, top, height, populated } for scroll/highlight.
Non-Negotiable Rules
These rules replace the legacy responsive QA workflow files. They are skill reference material, not command execution policy.
Scroll Into Viewport
Before highlighting, clicking, asserting visibility, or capturing a target element:
1. Call ensureInViewport(page, locator) or ensureInViewport(page, { scrollY }) for sections. 2. Verify the target intersects the viewport and retry scrolling when needed. 3. Only then call highlightElement, visuallyClick, safeClickAndVerifyTarget, or record pass/fail.
Section tests must use highlightSectionBand plus overlay SECTION n/N - {label} after scrolling to section.top.
Never click or judge off-screen elements.
Device Grouping
For each enabled viewport/device, wrap its tests in a device-specific describe block:
for (const vp of enabledViewports()) {
test.describe(vp.name, () => {
test('page load and runtime health', async ({ page }) => {
// ...
});
});
}Desktop tests must live under the desktop block, tablet tests under the tablet block, and mobile tests under the mobile block.
Do not rely on flat test names such as desktop - page load and runtime health as the only grouping.
AI Review Hooks
- File top:
test.describe.configure({ mode: 'serial' }). - Track
LAYOUT_HOOK_VIEWPORTS.add(viewport)after layout screenshots succeed. appendResults()must write### AI Review HooksfromLAYOUT_HOOK_VIEWPORTS; never write an empty table when layout ran.- After the monitor appends review sections for a viewport, it must update that processed hook row from
pending-ai-reviewtoai-review-completed. - Layout test logs
[QA_AI_ANALYSIS_READY]JSON to stdout. - Users run with
--workers=1. - After spec generation, spawn
qa-visual-review-monitor. - If the user reports a prior spelling review missed issues, spawn or perform a strict supplemental spelling audit using visual-review.md, even when no pending hook remains.
Strict Spelling Audit
When processing AI review hooks, the monitor must do two proofreading passes:
1. Read every visible main-content line in every screenshot slice. 2. Re-scan every word/token for missing letters, extra letters, transpositions, merged words, missing spaces, odd in-word capitalization, malformed common phrases, and near-word errors.
Do not rely on an earlier Spelling Check as complete. If a stricter re-audit is requested after an existing review, append ## Supplemental Spelling Audit - [viewport] and related supplemental sections at the bottom of the same test-result.md.
Deduplicate repeated boundary text, but list all slices where the issue is visible.
After review sections are appended, update only the processed hook row status to ai-review-completed. Do not rewrite result rows, prior reviews, screenshots, specs, or site source.
If the user says the review missed spelling mistakes, run the supplemental spelling audit even if the hook was already processed. The parent prompt must say "strict supplemental spelling audit" and include the workspace, result file, ordered screenshot range, and the exact supplemental section names.
The audit must cover hero copy, section intro text, small cards, outcome cards, labels/pills, CTA text, repeated boundary text, and low-contrast body copy. Confirmed missing-letter and near-word errors such as senter, error-prne, gro, se, developrs, competits, and sciuence must be reported when visible in context.
Use a consistent spelling table:
| Slice | Text | Issue | Suggested correction | Confidence |
| --- | --- | --- | --- | --- |The monitor should internally build a candidate list before writing the table, but append only confirmed issues.
Header and Footer Exclusion
In every page.evaluate ancestor walk and isInsideExcludedRegion, use classList.contains():
const cl = node.classList;
cl.contains('av-header'); // correct
// wrong: String(node.className).toLowerCase().includes('av-header')Early exit inside content: id === 'main' || id === 'av-content' || id === 'content' || id === 'page-content'.
Exclude header, nav, footer, mobile-menu, and all descendants. Main-content CTAs and links remain in scope.
Spec Generation
When generating or updating specs under tests/ui-responsive/:
1. Read ui-responsive-testing-skill/SKILL.md and linked reference/ files. 2. Live inventory the URL; do not invent page facts. 3. Generate exactly six grouped tests: runtime health, links, CTAs, sections, media, and layout integrity. 4. Inline all helpers; use templates/playwright-spec-skeleton.ts structure. 5. Run spec-self-check.md before completion. 6. Spawn qa-visual-review-monitor after generation. 7. Spawn supplemental mode, not generic monitor mode, when a prior AI spelling review is challenged. 8. Do not run Playwright; provide commands with --workers=1 only.
Platform Adapters (optional fallbacks)
Detect first; apply only matching adapter. Generic selectors always win.
Detection
| Platform | Signals |
|---|---|
| WordPress | wp-content, wp-json, #wpadminbar (must be hidden for anonymous) |
| Elementor | .elementor, .elementor-section, elementor assets |
| Astra | astra-theme, .ast-*, astra styles |
| Gutenberg | .wp-block-* |
Elementor media (important)
Many Elementor pages have no main img. Include:
.elementor-section img, .elementor-widget-image img, .elementor-widget-image img
Exclusion
Platform adapters do not override header/footer exclusion rules.
Reporting and AI Hooks (v2)
Paths
test-results/[page-slug]/test-result.md # single append-only ledger
test-results/[page-slug]/screenshots/ # [viewport]_slice_NNN.png
.playwright-output/ # Playwright artifacts (not test-results)Parallel run fix (required)
Playwright parallel workers split afterAll and drop AI hooks for tests that ran in other workers.
Generated specs must include at file top:
test.describe.configure({ mode: 'serial' });Document that users run with:
npx playwright test tests/ui-responsive/[page-slug].spec.ts --workers=1Layout hook tracking (required)
const LAYOUT_HOOK_VIEWPORTS = new Set<string>();
// Inside layout test after successful capture:
LAYOUT_HOOK_VIEWPORTS.add(vp.name);appendResults() contract
1. If QA_RESULTS.length === 0 → return (no write). 2. Append ## Test Run — {ISO} with all grouped rows for this run. 3. AI Review Hooks table is mandatory when LAYOUT_HOOK_VIEWPORTS.size > 0:
lines.push('### AI Review Hooks');
lines.push('| Viewport | Hook | Status |');
for (const vpName of LAYOUT_HOOK_VIEWPORTS) {
const alreadyReviewed = existingContent.includes(`## AI Visual Review — ${vpName}`);
const hookStatus = alreadyReviewed ? 'ai-review-completed' : 'pending-ai-review';
lines.push(`| ${vpName} | QA_AI_ANALYSIS_READY | ${hookStatus} |`);
}4. Never emit an empty AI Review Hooks table when layout ran. 5. Append-only — never truncate test-result.md.
Monitor completion status update
After the monitor appends all required AI review sections for a viewport, it must update the processed hook row status from pending-ai-review to ai-review-completed.
This is the only allowed in-place edit to test-result.md. The monitor must not rewrite result rows, prior review sections, screenshots, specs, or site source. If multiple pending hook rows exist, update only the rows whose viewport screenshots were actually reviewed.
stdout hooks (layout test)
Always log both:
console.log(`[QA_SCREENSHOTS_READY] test-results/${PAGE_SLUG}/screenshots/ (...)`);
console.log(`[QA_AI_ANALYSIS_READY] ${JSON.stringify({ pageSlug, viewport, screenshotDir, slices, resultFile, reviewStatus: 'pending-ai-review', contentZone: { headerHeight, bottomBarHeight } })}`);Monitor agent watches file hooks (pending-ai-review in md), updates processed hooks to ai-review-completed, and stdout is optional.
qa-run-config.json
- Omit removed categories from
tests: forms, dynamic widgets, page rendering/framework integrity, and accessibility smoke checks. - Devices default
false.
Spec Self-Check (before reporting completion)
- [ ]
test.describe.configure({ mode: 'serial' })at file top - [ ] Each enabled viewport/device has its own
test.describe(vp.name, ...)block containing that device's tests - [ ]
LAYOUT_HOOK_VIEWPORTSSet + populated in layout test - [ ]
appendResultswrites AI hooks fromLAYOUT_HOOK_VIEWPORTS(never empty when layout ran) - [ ] 6 grouped QA tests inside each device block
- [ ] No forms, dynamic widget, page rendering/framework integrity, or accessibility smoke tests
- [ ]
ensureInViewportbefore every link, button, media, and section check - [ ] Section test:
highlightSectionBand+clearSectionBand+ overlaySECTION n/N — label - [ ]
classList.containsexclusion; content-root early exit; noclassName.includes - [ ] Links/CTAs collected as plain objects; cap 40 links
- [ ] Media selectors include Elementor paths
- [ ] Layout: content-zone clips, console hooks, warning row
- [ ]
afterAll→appendResultsonly - [ ] User docs mention
--workers=1
Test Matrix (v2) — 6 Grouped Tests
Generate exactly these 6 grouped QA tests inside each enabled device/viewport test.describe(vp.name, ...) block. Do not generate forms, dynamic widgets, page rendering/framework integrity, or accessibility smoke tests.
| # | Test name | Responsibility |
|---|---|---|
| 1 | page load and runtime health | Status, title, readyState, height, console/network errors, platform detection |
| 2 | all visible links navigate or resolve correctly | Main-content links only; cap 40; page.goto for internal |
| 3 | all buttons and CTAs are visible, clickable, and perform expected behavior | Main-content controls only |
| 4 | all page sections are visible, populated, and visually stable | Scroll + section band highlight + overlay per section |
| 5 | all images, icons, and media assets render correctly | Raster/SVG/video/iframe in main content |
| 6 | layout integrity: overflow, overlap, clipping, spacing, and alignment | Sticky detection, content-zone slices, mandatory AI hooks and strict AI spelling review handoff |
Per-item requirements (all tests)
- Device grouping is mandatory:
desktoptests live under the desktop describe block,tablettests under tablet, andmobiletests under mobile. Do not rely on test-name prefixes as the only grouping. await page.goto(PAGE_URL)before first overlay.- `await ensureInViewport(target)` before highlight, click, screenshot of that target, or section scroll position.
showQaOverlaywith progress label (LINK 3/22,SECTION 5/14, etc.).- Crash safety:
resultsPushed+ top-leveltry/catch. - Fail grouped test at end if any item
fail; continue other items when safe.
Section test (test 4) — mandatory visuals
For each section:
1. ensureInViewport using section top coordinate (scroll top - 80px padding). 2. highlightSectionBand(page, top, height, label) — green dashed band + label on page. 3. showQaOverlay(page, 'SECTION n/N — {label}', 'running'). 4. Record pass/fail for populated content. 5. clearSectionBand(page) before next section.
Layout test (test 6) — mandatory hooks
1. detectStickyOverlays → showContentAreaHighlight (2s) → remove bands → captureLayoutSlices. 2. console.log('[QA_SCREENSHOTS_READY] …'). 3. console.log('[QA_AI_ANALYSIS_READY] ' + JSON.stringify({…})). 4. LAYOUT_HOOK_VIEWPORTS.add(vp.name). 5. Warning result row; do not fail after successful capture.
Link test (test 2)
- Collect
{ href, text, top }in onepage.evaluate. - For each link:
ensureInViewportattop→ highlight → navigate/verify → return.
Media test (test 5)
- Broad selectors:
main img, [role="main"] img, .elementor-section img, .elementor-widget-image img, section img, .wp-block-image img(exclude header/footer viaisInsideExcludedRegion). - Do not rely on
main imgalone on Elementor pages.
Removed tests
Do not generate these categories in v2:
dynamic widgets operate correctlypage rendering and framework integrityaccessibility smoke checksall forms and inputs render and validate safely
AI Visual Review (v2)
Delegated to `qa-visual-review-monitor` monitor agent (agents/qa-visual-review-monitor.toml).
Parent agent after spec generation
1. Spawn monitor once per workspace (reuse if active). 2. Do not claim review is done until ## AI Visual Review — [viewport] exists in test-result.md. 3. Spawn with a strict spelling instruction: the monitor must do both a line pass and a word/token pass, must not rely on prior spelling sections, and must append a supplemental spelling audit if a review already exists but the user requests a stricter recheck. 4. If the user reports that spelling mistakes were missed, treat the earlier review as incomplete and run supplemental mode even when there are no pending hook rows left.
Reviewer scope
Main content only. Categories: overflow-and-bleed, element-overlap, typography, layout-alignment, images-media, and spelling.
Spelling protocol
- Every slice in order; line-by-line visible text in main content.
- Then perform a second word/token pass on each slice.
- Report all confirmed typos (not just first), including missing letters, extra letters, transpositions, missing spaces, merged words, odd in-word capitalization, and malformed common phrases.
- Cover hero copy, section intros, small cards, outcome cards, labels/pills, CTA text, repeated boundary text, and low-contrast body copy. These areas are where previous review passes most often miss small typos.
- Compare repeated boundary text across adjacent slices; deduplicate findings while listing all slices where an issue is visible.
- Compare adjacent slices at boundaries before reporting clip/overlap.
- Allow brand/product/technology names unless clearly wrong.
Sections to append (bottom of test-result.md)
1. ## AI Visual Review — [viewport] 2. ## Spelling Check — [viewport] 3. ## UI Suggestions — [viewport] 4. AI Review Completion Note
After appending those sections, update the processed hook row status from pending-ai-review to ai-review-completed. This hook status update is the only allowed in-place edit. Do not rewrite prior result rows or review sections. Do not create extra markdown files.
Strict monitor spawn text
When spawning qa-visual-review-monitor, include this text:
Perform a strict spelling audit. Do not rely on any previous Spelling Check section. Read every screenshot slice in order, then do a second word/token pass for small copy, cards, pills, buttons, repeated boundary text, missing spaces, merged words, odd capitalization, transpositions, and near-word errors. Report every confirmed typo with all visible slice names. If an AI review already exists for the viewport, append Supplemental Spelling Audit sections at the bottom. After appending review sections for a viewport, update that viewport's processed hook row from `pending-ai-review` to `ai-review-completed`; do not rewrite any other hook rows or prior review sections.Strict supplemental re-audit spawn text
Use this exact shape when the user reports that a prior spelling review missed issues:
Use the qa-visual-review-monitor monitor agent defined in agents/qa-visual-review-monitor.toml. A previous AI review exists, but the user reports it missed spelling mistakes. Perform a strict supplemental spelling audit, not a normal first-pass review.
Workspace: [absolute workspace path]
Result file: test-results/[page-slug]/test-result.md
Screenshots: test-results/[page-slug]/screenshots/[viewport]_slice_001.png through [viewport]_slice_NNN.png
Required behavior:
- Do not edit existing hook rows or previous review sections except to update the processed hook status from `pending-ai-review` to `ai-review-completed` after appending the supplemental sections.
- Append only at the bottom of test-result.md.
- Read every [viewport] screenshot slice in order.
- Do a line pass and then a word/token pass.
- Look for hero copy, small card/body copy, labels, pills, buttons, repeated boundary text, missing spaces, merged words, odd capitalization, transpositions, and near-word errors.
- Report every confirmed typo with all visible slice names.
- If uncertain about product/domain terminology, put it in Supplemental UI Suggestions as low confidence, not as a confirmed typo.
- Append `## Supplemental Spelling Audit — [viewport]`, `## Supplemental UI Suggestions — [viewport]`, and `Supplemental AI Review Completion Note`.Spelling tables must use this shape for consistent results:
| Slice | Text | Issue | Suggested correction | Confidence |
| --- | --- | --- | --- | --- |False positives
- Intentional sticky/fixed/floating UI
- Slice boundary cutoffs
- Header/footer content
/**
* Reference skeleton for ui-responsive-testing-skill spec generation.
* Copy into tests/ui-responsive/[page-slug].spec.ts and fill PAGE_* constants.
*/
import { test, Page, Locator } from '@playwright/test';
import * as fs from 'fs';
import * as path from 'path';
test.describe.configure({ mode: 'serial' });
const PAGE_SLUG = 'page-slug';
const PAGE_URL = 'https://example.com/page-slug/';
const LAYOUT_HOOK_VIEWPORTS = new Set<string>();
// VIEWPORTS, RUN_CONFIG, VISUAL_MODE, QA_RESULTS, helpers (ensureInViewport, highlightSectionBand, …)
// for (const vp of enabledViewports()) test.describe(vp.name, () => { ...6 grouped QA tests... })
// test.afterAll(() => appendResults()); — hooks from LAYOUT_HOOK_VIEWPORTS