Skip to content

Playwright - Multiple viewports testing is not possible anymore #443

Description

@zuzusik

Describe the bug

Following official docs to setup Playwright to test for multiple viewports doesn't work anymore - only a single viewport is being tested.

To Reproduce

  • Create Chromatic Playwright project
  • Setup for multiple viewports follow guidelines from https://www.chromatic.com/docs/viewports/#playwright, which directs to create multiple projects
  • Run Playwright
  • Run Chromatic build
  • There are only snapshots for one viewport - last projects defined in the Playwright config wins

Expected behavior

Snapshots are present for multiple viewports.

Screenshots

N/A

Additional context

I believe this is a result of #401

The problem doesn't exist in @chromatic-com/playwright version 0.12.8, exists in latest (0.14.12 at the moment of writing)

This is a blocker for us - we test multiple viewports.

Activity

  1. AriPerkkio commented on Aug 27, 2026

    @AriPerkkio
    Member

    With 0.12.8 the written test-results/chromatic-archives of these two projects are still overwriting each other. In #258 it was reported that this happened with 0.11.2 too.

    This work-around should work though: #258 (comment)

    We should really apply that as default behaviour, but it would be breaking change.

  2. zuzusik commented on Aug 27, 2026

    @zuzusik
    Author

    @AriPerkkio I don't think that is completely correct. With 0.12.8 our multi-viewport setup via multi-playwright-project config worked just fine. When upgraded to 0.14.12, it stopped working - the project that is defined last in the config just wins over the others and we end up having snapshots only for a single viewport.

  3. AriPerkkio commented on Aug 28, 2026

    @AriPerkkio
    Member

    This might have broken in #318. Can you check if @chromatic-com/playwright@0.13.1 works fine, and if @chromatic-com/playwright@0.13.2 introduces the bug?

    There is now preview build available at #444 (comment). Could you check if that works correctly?

  4. zuzusik commented on Aug 28, 2026

    @zuzusik
    Author

    @AriPerkkio thanks, will try it today and report back

  5. AriPerkkio commented on Sep 24, 2026

    @AriPerkkio
    Member

    @zuzusik did you have a change to test the preview build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions