Back to work

02 — Case study

Anonymized client work

E2E testing for pricing console

Playwright on the internal pricing console plus Jest on marketplace flows where a regression is expensive.

Role

Frontend Lead

Context

Cartalog pricing console, Caroline.id marketplace

Period

March 2022 – present

Stack

Playwright, Jest, CI/CD

01 — Problem

High-value navigation in the pricing console and fragile marketplace submits were easy to break without noticing until production.

The internal console moves analysts from the dashboard into watchlist and pricelab views through table and search interactions that depend on auth and client routing. On the public marketplace, the sell inspection submit path assembles a sensitive payload—wrong field mapping fails quietly in QA if nobody exercises the full wizard.

02 — Approach

  1. Playwright on the pricing console

    Browser tests run against a logged-in storage state, use page objects for the dashboard, and target stable test-id attributes. Navigation specs wait for URL changes into watchlist and pricelab; a layout spec masks volatile charts and compares screenshots across Chromium, Firefox, and WebKit.

  2. Jest on the marketplace portal

    The consumer portal relies on Jest and React Testing Library for fast feedback on sell submission utilities and related hooks—no Playwright suite there. E2E depth sits on the console; the portal keeps regression coverage close to the payload builders.

  3. Rejected testing only in the browser

    Full Playwright coverage on every marketplace page would be slow and flaky for a large Next app. Splitting console E2E from portal unit tests matched where regressions actually hurt.

DashboardPage.ts
import type { Page, Locator } from '@playwright/test';

export class DashboardPage {
readonly tableRows: Locator;
readonly popularSearchItems: Locator;

constructor(private page: Page) {
  this.tableRows = page.locator('[data-testid="dashboard-row"]');
  this.popularSearchItems = page.locator('[data-testid="popular-search"]');
}

async goto() {
  await this.page.goto('/');
}

async clickFirstTableRow() {
  await this.tableRows.first().click();
}
}
Fig. 1 — Page object for dashboard navigation. Illustrative excerpt, not production code.

03 — Where AI helped

AI drafted initial Playwright boilerplate and selector lists; I tightened waits, auth setup, and screenshot masks so CI would not flake on chart data.

04 — Result

Dashboard-to-watchlist and dashboard-to-pricelab paths are guarded in CI on the console; sell inspection mapping stays covered in Jest on the portal. Test count and run-time metrics will be added when you confirm figures for publication.

Next project