Visual regression tests development for website (Chromatic)

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.
Development and maintenance of all types of websites:
Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:
Development stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1212
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1161
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    852
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1041
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    822
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    815

Visual Regression Testing for Websites (Chromatic)

Visual regression testing automatically compares UI screenshots to detect unintended visual changes. Chromatic is a cloud service by the Storybook team: it captures each story, compares it with baseline, and requests review for changes.

Installation and Storybook Integration

npm install -D chromatic @storybook/react
npx storybook init  # if Storybook is not yet configured

Writing Stories for Components

// components/Button/Button.stories.tsx
import type { Meta, StoryObj } from '@storybook/react';
import { Button } from './Button';

const meta: Meta<typeof Button> = {
    component: Button,
    parameters: {
        // Chromatic: delay before screenshot for animations
        chromatic: { delay: 300 },
    },
};

export default meta;
type Story = StoryObj<typeof Button>;

export const Primary: Story = {
    args: { variant: 'primary', children: 'Save' },
};

export const Secondary: Story = {
    args: { variant: 'secondary', children: 'Cancel' },
};

export const Loading: Story = {
    args: { loading: true, children: 'Loading' },
};

export const Disabled: Story = {
    args: { disabled: true, children: 'Unavailable' },
};

First Run — Creating Baseline

npx chromatic --project-token=YOUR_TOKEN --auto-accept-changes

Chromatic uploads all stories, captures screenshots, and saves them as baseline.

GitHub Actions Integration

# .github/workflows/chromatic.yml
name: Visual Tests

on: push

jobs:
  chromatic:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0  # full history needed for diff

      - uses: actions/setup-node@v4
        with: { node-version: 20 }

      - run: npm ci

      - name: Run Chromatic
        uses: chromaui/action@latest
        with:
          projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
          # Don't break CI on visual changes — require review
          exitZeroOnChanges: true
          # Break when unreviewed changes
          exitOnceUploaded: false

Review Workflow

  1. Pull request changes a component
  2. Chromatic runs in CI, finds changes
  3. Review link appears in PR comment
  4. Developer in Chromatic UI: approve (Accept) or reject changes
  5. After approval — new baseline

Fine-tuning Parameters

// Exclude story from visual tests
export const AnimatedVersion: Story = {
    parameters: {
        chromatic: { disableSnapshot: true },
    },
};

// Capture multiple viewports
export const ResponsiveCard: Story = {
    parameters: {
        chromatic: {
            viewports: [375, 768, 1280],
        },
    },
};

// Delay for skeleton animation
export const Skeleton: Story = {
    parameters: {
        chromatic: { delay: 1000, pauseAnimationAtEnd: true },
    },
};

TurboSnap — Acceleration via Git Analysis

Chromatic analyzes changed files via Git and tests only stories that depend on changed components. For large projects, reduces time by 80%.

- name: Run Chromatic with TurboSnap
  uses: chromaui/action@latest
  with:
    projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
    onlyChanged: true  # enable TurboSnap

Implementation Timeline

Storybook + Chromatic setup: 1 day Writing stories for 20–30 key components: 3–5 days Achieving full design system coverage: 1–2 weeks