Web QA
siteprobe
A fetch-only security headers checker and website scanner: about a hundred security, SEO and speed checks, with a score and a fix hint for each finding.
Responsive design testing that measures the layout at every viewport width: overflow, clipping, inconsistent insets and radii, low-resolution images and layout shift.
npm install viewport-qa playwright
npx playwright install chromiumviewport-qa loads a page in Chromium at each viewport width and measures the layout: horizontal overflow, clipped text, elements off-screen, images shown above their resolution, repeated images, layout shift, edge-touching bands, inconsistent insets and radii, and orphan grid rows.
Every finding comes with a check id, a severity, a selector, the width and the numbers that triggered it. axe and Lighthouse check accessibility and performance, and visual-regression tools compare screenshots; none of them measures whether a layout stays consistent from phone to 4K. It runs on Playwright, from the command line or inside your own tests.
viewport-qa overflow.html --widths 390,1440viewport-qa overflow.html
390x844 @2x 1 error, 2 warnings
error horizontal-overflow html
Page scrolls sideways: scrollWidth 924px against a 390px viewport (534px too wide).
warning offscreen-element div.wide
Element runs 534px past the right edge (left 24, right 924, viewport 390).
warning edge-touching div.wide
Box (#fee2e2) touches the right edge of the viewport: left 24px, right -534px.
1440x900 @2x no problems
1 error, 2 warnings across 2 widths.import { checkUrl, hasProblems } from 'viewport-qa';
const result = await checkUrl('http://localhost:3000/pricing', {
widths: [390, 1024, 1440],
wait: { selector: 'main' },
rules: ['pointer-cursor'],
});
for (const problem of result.problems) {
console.log(problem.width, problem.check, problem.selector, problem.details);
}
if (hasProblems(result)) process.exitCode = 1;import { test, expect } from '@playwright/test';
import { checkPage } from 'viewport-qa';
test('pricing layout holds', async ({ page }) => {
await page.goto('/pricing');
const result = await checkPage(page, { widths: [390, 1440] });
expect(result.problems.filter((p) => p.severity === 'error')).toEqual([]);
});viewport-qa <url|file.html> [options]Run viewport-qa with a URL or a local .html file. It loads the page at 390, 768, 1024, 1440, 1920, 2560 and 3840 pixels by default and prints what overflows, clips or shifts at each width. Pass --widths to choose your own.
No. Visual-regression tools compare screenshots against a baseline. viewport-qa has no baseline: it measures the layout of one page at each width and reports numbers. You can save a PNG per width with --screenshots, but it does not compare them.
Yes. The layout-shift check reports cumulative layout shift since navigation and warns above 0.1 by default. It counts every shift up to the measurement, including input-driven ones, so treat it as a lab number.
Call checkPage(page, { widths }) inside a Playwright test. It resizes and reloads the page for each width, runs the checks, then restores the page. Playwright 1.40 or newer is a peer dependency.
Web QA
A fetch-only security headers checker and website scanner: about a hundred security, SEO and speed checks, with a score and a fix hint for each finding.
Web QA
A broken link checker and launch checklist for a static site build: SEO basics, links and assets, redirects, share cards, icons, JSON-LD and old-URL coverage.
Author
Saimul Islam is a Forward Deployed Engineer and Solutions Architect. Several of these packages run in production on DeveloperLook, the Bundlewise CRM and Sitessa.