Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: deprecate toMatchSnapshot for buffers #26718

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

dgozman
Copy link
Contributor

@dgozman dgozman commented Aug 25, 2023

These are usually used for screenshots instead of toHaveScreenshot. String-based snapshots are left as is.

deprecated

Also deemphasized toMatchSnapshot throughout all docs.

Fixes #26612.

@github-actions

This comment has been minimized.

These are usually used for screenshots instead of toHaveScreenshot.
String-based snapshots are left as is.

Also updated docs to deemphasize toMatchSnapshot.
@dgozman dgozman force-pushed the deprecate-to-match-snapshot branch from c3df2d1 to 1a81386 Compare August 25, 2023 23:35
@github-actions
Copy link
Contributor

Test results for "tests 1"

2 failed
❌ [default] › run-tests.spec.ts:953:5 › should produce output twice
❌ [reuse] › run-tests.spec.ts:953:5 › should produce output twice

7 flaky
⚠️ [chromium] › library/tracing.spec.ts:239:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › page/page-event-request.spec.ts:101:3 › should report navigation requests and responses handled by service worker
⚠️ [chromium] › page/page-event-request.spec.ts:130:3 › should report navigation requests and responses handled by service worker with routing
⚠️ [chromium] › library/tracing.spec.ts:239:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › page/page-event-request.spec.ts:130:3 › should report navigation requests and responses handled by service worker with routing
⚠️ [chromium] › library/tracing.spec.ts:239:5 › should not include trace resources from the previous chunks
⚠️ [chromium] › components/splitView.spec.tsx:65:5 › drag resize

22458 passed, 478 skipped
✔️✔️✔️

[default] › run-tests.spec.ts:953:5 › should produce output twice

Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 0
+ Received  + 1

@@ -9,8 +9,9 @@

      [1/1] test.spec.ts:3:11 › one
      test.spec.ts:3:11 › one
      some output

+     Testing stopped early after 0 maximum allowed failures.
        1 passed (XXms)

    

  969 |
  970 |   const testRun1 = await testController.run(testItems);
> 971 |   expect(testRun1.renderLog({ output: true })).toBe(`
      |                                                ^
  972 |     tests > test.spec.ts > one [2:0]
  973 |       enqueued
  974 |       started

    at /home/runner/work/playwright/playwright/playwright-vscode/tests/run-tests.spec.ts:971:48

[reuse] › run-tests.spec.ts:953:5 › should produce output twice

Error: expect(received).toBe(expected) // Object.is equality

- Expected  - 0
+ Received  + 1

@@ -9,8 +9,9 @@

      [1/1] test.spec.ts:3:11 › one
      test.spec.ts:3:11 › one
      some output

+     Testing stopped early after 0 maximum allowed failures.
        1 passed (XXms)

    

  969 |
  970 |   const testRun1 = await testController.run(testItems);
> 971 |   expect(testRun1.renderLog({ output: true })).toBe(`
      |                                                ^
  972 |     tests > test.spec.ts > one [2:0]
  973 |       enqueued
  974 |       started

    at /home/runner/work/playwright/playwright/playwright-vscode/tests/run-tests.spec.ts:971:48

Merge workflow run.

@dgozman dgozman merged commit 8348f66 into microsoft:main Aug 26, 2023
26 of 28 checks passed
dgozman added a commit to dgozman/playwright that referenced this pull request Sep 14, 2023
dgozman added a commit that referenced this pull request Sep 14, 2023
- This reverts commit
8348f66
landed in #26718.
- Update docs to point towards `toHaveScreenshot`.
dgozman added a commit to dgozman/playwright that referenced this pull request Sep 14, 2023
- This reverts commit
microsoft@8348f66
landed in microsoft#26718.
- Update docs to point towards `toHaveScreenshot`.
dgozman added a commit that referenced this pull request Sep 14, 2023
- This reverts commit
8348f66
landed in #26718.
- Update docs to point towards `toHaveScreenshot`.

Fixes #27071.
Germandrummer92 pushed a commit to OctoMind-dev/playwright that referenced this pull request Oct 27, 2023
These are usually used for screenshots instead of toHaveScreenshot.
String-based snapshots are left as is.

<img width="836" alt="deprecated"
src="https://github.com/microsoft/playwright/assets/9881434/d02818da-7eea-47fc-8ea8-4104b0dd49b5">

---

Also deemphasized toMatchSnapshot throughout all docs.

Fixes microsoft#26612.
Germandrummer92 pushed a commit to OctoMind-dev/playwright that referenced this pull request Oct 27, 2023
- This reverts commit
microsoft@8348f66
landed in microsoft#26718.
- Update docs to point towards `toHaveScreenshot`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate toMatchSnapshot
2 participants