From f8484648ecf8d1d23473b8b21ded4ed5c879ac32 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 21 Oct 2022 11:01:00 +0400 Subject: [PATCH 1/3] Update Playwright to v1.27.x --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 104727385ff728..b5931bf14bb809 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7970,19 +7970,19 @@ } }, "@playwright/test": { - "version": "1.25.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.25.1.tgz", - "integrity": "sha512-IJ4X0yOakXtwkhbnNzKkaIgXe6df7u3H3FnuhI9Jqh+CdO0e/lYQlDLYiyI9cnXK8E7UAppAWP+VqAv6VX7HQg==", + "version": "1.27.1", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.27.1.tgz", + "integrity": "sha512-mrL2q0an/7tVqniQQF6RBL2saskjljXzqNcCOVMUjRIgE6Y38nCNaP+Dc2FBW06bcpD3tqIws/HT9qiMHbNU0A==", "dev": true, "requires": { "@types/node": "*", - "playwright-core": "1.25.1" + "playwright-core": "1.27.1" }, "dependencies": { "playwright-core": { - "version": "1.25.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.25.1.tgz", - "integrity": "sha512-lSvPCmA2n7LawD2Hw7gSCLScZ+vYRkhU8xH0AapMyzwN+ojoDqhkH/KIEUxwNu2PjPoE/fcE0wLAksdOhJ2O5g==", + "version": "1.27.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.27.1.tgz", + "integrity": "sha512-9EmeXDncC2Pmp/z+teoVYlvmPWUC6ejSSYZUln7YaP89Z6lpAaiaAnqroUt/BoLo8tn7WYShcfaCh+xofZa44Q==", "dev": true } } diff --git a/package.json b/package.json index 9967cef937cde6..cfc52e52a8e489 100755 --- a/package.json +++ b/package.json @@ -100,7 +100,7 @@ "@octokit/rest": "16.26.0", "@octokit/types": "6.34.0", "@octokit/webhooks-types": "5.6.0", - "@playwright/test": "1.25.1", + "@playwright/test": "1.27.1", "@pmmmwh/react-refresh-webpack-plugin": "0.5.2", "@storybook/addon-a11y": "6.5.7", "@storybook/addon-actions": "6.5.7", From 32d90397616af0b33742bb857c34aa16e71ef449 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Tue, 25 Oct 2022 14:55:59 +0400 Subject: [PATCH 2/3] Mention new short-form API in the docs --- test/e2e/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/README.md b/test/e2e/README.md index 52ae79b11fbb33..3145aac13f5595 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -19,6 +19,7 @@ Use the selector engine [role-selector](https://playwright.dev/docs/selectors#ro ```js // Select a button with the accessible name "Hello World" (case-insensitive). page.locator( 'role=button[name="Hello World"i]' ); +page.getByRole( 'button', { name: 'Hello World' } ); // short-form ``` It's recommended to append `i` to the name attribute to match it case-insensitively wherever it makes sense. It can also be chained with built-in selector engines to perform complex queries: From 23671315f8eb4b0b273615f21d9141f4e66e67ac Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 26 Oct 2022 09:23:58 +0400 Subject: [PATCH 3/3] Improve comment --- test/e2e/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/e2e/README.md b/test/e2e/README.md index 3145aac13f5595..c39501e866172c 100644 --- a/test/e2e/README.md +++ b/test/e2e/README.md @@ -19,7 +19,9 @@ Use the selector engine [role-selector](https://playwright.dev/docs/selectors#ro ```js // Select a button with the accessible name "Hello World" (case-insensitive). page.locator( 'role=button[name="Hello World"i]' ); -page.getByRole( 'button', { name: 'Hello World' } ); // short-form + +// Using short-form API, the `name` is case-insensitive by default. +page.getByRole( 'button', { name: 'Hello World' } ); ``` It's recommended to append `i` to the name attribute to match it case-insensitively wherever it makes sense. It can also be chained with built-in selector engines to perform complex queries: