Skip to content

[Bug]: snapshotPathTemplate doesnt work when multiple projects #34507

@debs-obrien

Description

@debs-obrien

Version

1.51.0-alpha-2025-01-22

Steps to reproduce

  1. add this to your config:
snapshotPathTemplate: '__snapshots__/{testFilePath}/{arg}{ext}',
  1. Make sure chromium, firefox and webkit are selected in vscode sidebar under projects
  2. create the following test:
test('test with name', async ({ page }) => {  
  await page.goto('https://debs-obrien.github.io/playwright-movies-app/movie?id=533535&page=1');
  await expect(page.getByRole('main')).toMatchAriaSnapshot({ name: 'movie.yml'});
});
  1. run test using the play button in vscode extension
  2. run test again

Expected behavior

all tests should pass once the snapshot is created. it is an aria snapshot and therefore should work across browsers

Actual behavior

firefox passes, chromium and webkit fail

Additional context

Environment

System:
    OS: macOS 15.2
    CPU: (10) arm64 Apple M1 Max
    Memory: 236.09 MB / 64.00 GB
  Binaries:
    Node: 20.11.1 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.4 - /usr/local/bin/npm
    pnpm: 8.5.0 - /usr/local/bin/pnpm
  IDEs:
    VSCode: 1.96.4 - /usr/local/bin/code
  Languages:
    Bash: 3.2.57 - /bin/bash
  npmPackages:
    @playwright/test: ^1.51.0-alpha-2025-01-22 => 1.51.0-alpha-2025-01-22

Metadata

Metadata

Assignees

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