diff --git a/nodejs/versioned_docs/version-stable/api/class-locatorassertions.mdx b/nodejs/versioned_docs/version-stable/api/class-locatorassertions.mdx index ad79a5dccde..18226f6f5b6 100644 --- a/nodejs/versioned_docs/version-stable/api/class-locatorassertions.mdx +++ b/nodejs/versioned_docs/version-stable/api/class-locatorassertions.mdx @@ -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. diff --git a/nodejs/versioned_docs/version-stable/api/class-pageassertions.mdx b/nodejs/versioned_docs/version-stable/api/class-pageassertions.mdx index af2adfffb67..0769c76fe91 100644 --- a/nodejs/versioned_docs/version-stable/api/class-pageassertions.mdx +++ b/nodejs/versioned_docs/version-stable/api/class-pageassertions.mdx @@ -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. diff --git a/nodejs/versioned_docs/version-stable/api/class-snapshotassertions.mdx b/nodejs/versioned_docs/version-stable/api/class-snapshotassertions.mdx index 00e170ab215..c1c6b790bc8 100644 --- a/nodejs/versioned_docs/version-stable/api/class-snapshotassertions.mdx +++ b/nodejs/versioned_docs/version-stable/api/class-snapshotassertions.mdx @@ -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