A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/microsoft/playwright/issues/34504 below:

update snapshots not creating good diffs · Issue #34504 · microsoft/playwright · GitHub

Version

1.51.0-alpha-2025-01-22

Steps to reproduce
  1. create the follwing test:
test('test', async ({ page }) => {
  await page.goto('https://debs-obrien.github.io/playwright-movies-app/movie?id=533535&page=1');
  await expect(page.getByRole('main')).toMatchAriaSnapshot(``);
});
  1. run test using the play button in vscode extension

  2. run 'git apply test-results/rebaselines.patch'

  3. change the page source so snapshots will differ. This is done by modifying the movie id. The code snippet below shows a goto with a url containing a different id. Use this snippet or just manually edit the movie id to be 718821

test('test', async ({ page }) => {
  await page.goto('https://debs-obrien.github.io/playwright-movies-app/movie?id=718821&page=1');
  await expect(page.getByRole('main')).toMatchAriaSnapshot(``);
});
  1. run test again in vscode.
  2. run git apply test-results/rebaselines.patch
Expected behavior

should be good diff

Actual behavior

patch with only garbage at line 4

Additional context

Note running with --update-source-method 3-way is also not working so best way to see whats happening is to check diff in test results folder

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

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4