Skip to content

Investigate why mobile visual snapshots prompt unexpected updates when no changes exist #2900

Description

@arii

Problem Statement

Playwright mobile visual snapshots trigger mismatches and conflicts in PR integrations even when zero visual or code changes occurred.

Goal

Determine the root causes of snapshot inconsistencies (like OS configuration or environment package updates) and stabilize visual snapshot testing.

Non-Goals

Updating actual UI layout code or changing Playwright target viewports.


Proposed Approach

  • Inspect font-render inconsistencies in Noble Docker image.
  • Test visual outputs locally vs. GHA runner to identify discrepancy triggers.

Alternatives Considered

Approach Rejected because
Disabling Playwright mobile checks entirely Reduces visual regression coverage

Architectural Impact

  • Introduces a new dependency
  • Changes a shared type/interface used elsewhere
  • Touches core/shared service code (not feature-local)
  • Requires a data/schema/storage migration
  • None of the above — fully isolated change

Scope

Files expected to change

  • tests/visual.spec.ts
  1. UNDERSTAND THE ISSUE

Restate the problem in your own words:
Snapshots drift across environments, causing false test failures.

State the underlying GOAL:
Establish consistent test environments.

Flag any ambiguity in the issue as written:
None.

  1. DETERMINE APPROACH

Propose the most likely correct solution approach:
Analyze render differences and apply environment alignment configurations (like font packages).

Identify at least one alternative approach and state why it was rejected:
Accepting manual updates on every run (rejected as it pollutes PR history).

Call out any architectural decisions this approach forces:
None.

Flag if the approach touches shared/core code used by multiple features:
Yes, impacts CI test suites.

  1. SPECIFY SCOPE

IN SCOPE:
Debugging Playwright snapshot execution and environment properties.

OUT OF SCOPE:
Altering actual client application view layouts.

Flag if achieving the goal is impossible without violating the out-of-scope boundary:
No.

  1. DEFINITION OF DONE

List concrete, verifiable completion criteria:

  • Investigation notes compiled or fixes pushed to codebase.
  • Tests run consistently in all environments without drifting.

State what must be manually verified vs. what can be automated:
Playwright snapshot tests verification is automated.

State explicitly what is NOT required for this issue to be considered done:
No redesign of component code.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions