From 6b31b30df9edc4c0b64a89ed5c29222ee4dea5a0 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Mon, 16 Oct 2023 11:23:22 +0200 Subject: [PATCH] chore: allow a script to generate release-notes for GitHub (#27596) `node utils/render_release_notes.mjs js 1.39` --- packages/playwright-core/types/types.d.ts | 26 ++-- packages/playwright/types/test.d.ts | 78 ++++++------ utils/doclint/linkUtils.js | 137 ++++++++++++++++++++++ utils/generate_types/index.js | 62 +--------- utils/render_release_notes.mjs | 76 ++++++++++++ 5 files changed, 268 insertions(+), 111 deletions(-) create mode 100644 utils/doclint/linkUtils.js create mode 100644 utils/render_release_notes.mjs diff --git a/packages/playwright-core/types/types.d.ts b/packages/playwright-core/types/types.d.ts index 1122a67b1a..37e30016f7 100644 --- a/packages/playwright-core/types/types.d.ts +++ b/packages/playwright-core/types/types.d.ts @@ -10576,7 +10576,7 @@ export interface Locator { * Returns an array of `node.innerText` values for all matching nodes. * * **NOTE** If you need to assert text on the page, prefer - * [locatorAssertions.toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text) + * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text) * with `useInnerText` option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details. * * **Usage** @@ -10592,7 +10592,7 @@ export interface Locator { * Returns an array of `node.textContent` values for all matching nodes. * * **NOTE** If you need to assert text on the page, prefer - * [locatorAssertions.toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text) + * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text) * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details. * * **Usage** @@ -10898,7 +10898,7 @@ export interface Locator { * Returns the number of elements matching the locator. * * **NOTE** If you need to assert the number of elements on the page, prefer - * [locatorAssertions.toHaveCount(count[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-count) + * [expect(locator).toHaveCount(count[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-count) * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details. * * **Usage** @@ -11249,7 +11249,7 @@ export interface Locator { * Returns the matching element's attribute value. * * **NOTE** If you need to assert an element's attribute, prefer - * [locatorAssertions.toHaveAttribute(name, value[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-attribute) + * [expect(locator).toHaveAttribute(name, value[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-attribute) * to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details. * @param name Attribute name to get the value for. * @param options @@ -11668,7 +11668,7 @@ export interface Locator { * Returns the [`element.innerText`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/innerText). * * **NOTE** If you need to assert text on the page, prefer - * [locatorAssertions.toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text) + * [expect(locator).toHaveText(expected[, options])](https://playwright.dev/docs/api/class-locatorassertions#locator-assertions-to-have-text) * with `useInnerText` option to avoid flakiness. See [assertions guide](https://playwright.dev/docs/test-assertions) for more details. * @param options */ @@ -11686,7 +11686,7 @@ export interface Locator { * Returns the value for the matching `` or `