Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,9 @@ Note that screenshot assertions only work with Playwright test runner.

---

### toHaveScreenshot() {#locator-assertions-to-have-screenshot-2}
### toHaveScreenshot(options) {#locator-assertions-to-have-screenshot-2}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.23</font><x-search>locatorAssertions.toHaveScreenshot()</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.23</font><x-search>locatorAssertions.toHaveScreenshot(options)</x-search>

This function will wait until two consecutive locator screenshots yield the same result, and then compare the last screenshot with the expectation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ Note that screenshot assertions only work with Playwright test runner.

---

### toHaveScreenshot() {#page-assertions-to-have-screenshot-2}
### toHaveScreenshot(options) {#page-assertions-to-have-screenshot-2}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.23</font><x-search>pageAssertions.toHaveScreenshot()</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.23</font><x-search>pageAssertions.toHaveScreenshot(options)</x-search>

This function will wait until two consecutive page screenshots yield the same result, and then compare the last screenshot with the expectation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ Note that matching snapshots only work with Playwright test runner.

---

### toMatchSnapshot() {#snapshot-assertions-to-match-snapshot-2}
### toMatchSnapshot(options) {#snapshot-assertions-to-match-snapshot-2}

<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.22</font><x-search>snapshotAssertions.toMatchSnapshot()</x-search>
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.22</font><x-search>snapshotAssertions.toMatchSnapshot(options)</x-search>

:::caution

Expand Down
Loading