Sub topic 1
What a Visual QA Pass Is and When to Run It
Prerequisites
You should know basic HTML and CSS, including the box model, selectors, and units. You should also be able to open browser DevTools and read a design file or style guide, such as a Figma frame.
What a Visual QA Pass Does
A visual quality assurance (QA) pass compares a built page with its approved design. It checks whether layout, spacing, typography, colors, assets, and visible states match the intended result.
Visual QA finds presentation differences. It does not prove that forms submit correctly, APIs work, or the page is secure. Run it after the page has usable content and styling, then repeat it before release and after major layout or component changes.
Treat the Design as the Reference
Use the latest approved design as the reference. Check these sources before reporting a difference:
- Specs for dimensions, spacing, colors, and typography.
- Design tokens, which are named values such as
--space-mdor--color-text. - Redlines, which document measured distances and alignments.
- The intended content and assets.
A design may show a 24-pixel gap, while the implementation uses a nearby token such as --space-lg. Confirm the token definition before calling this a defect.
Setting Up a Fair Comparison
Match the design and browser conditions:
- Open the same route with the same content and asset versions.
- Set the viewport width and height to the design frame.
- Use 100% browser zoom and record the device pixel ratio.
- Disable extensions and animations that could change the screenshot.
- Compare the same scroll position and page state.
Measuring the Built Page with DevTools
Use DevTools instead of estimating from the screen. Inspect an element to read its box dimensions, margins, padding, computed font values, and colors. The console can expose computed styles:
const el = document.querySelector('h1');
const style = getComputedStyle(el);
console.log({
fontFamily: style.fontFamily,
fontSize: style.fontSize,
fontWeight: style.fontWeight,
lineHeight: style.lineHeight,
color: style.color
});Comparing Views
Use side-by-side views for overall structure and an overlay for alignment. Reduce the reference image's opacity over the page, or alternate between them. Stable edges reveal shifted containers, incorrect widths, and inconsistent spacing.
Exercise
Why should you match the viewport before comparing spacing?
Show answer
A different viewport can trigger another layout rule, so the measured spacing may belong to a different responsive state.