From 88e6f69de611431c64644b4c1a8868a39a545b81 Mon Sep 17 00:00:00 2001 From: Oleksandr Khotemskyi Date: Mon, 8 Apr 2024 09:48:36 +0300 Subject: [PATCH] 1.43 --- package-lock.json | 46 +++++++++++------------ package.json | 2 +- tests/examples/capturing-elements.test.ts | 44 ++++++++++++---------- 3 files changed, 49 insertions(+), 43 deletions(-) diff --git a/package-lock.json b/package-lock.json index 760192e..9b0912b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "ISC", "devDependencies": { - "@playwright/test": "^1.42.0", + "@playwright/test": "1.43.0", "@types/node": "^20.10.3", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", @@ -150,12 +150,12 @@ } }, "node_modules/@playwright/test": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.42.0.tgz", - "integrity": "sha512-2k1HzC28Fs+HiwbJOQDUwrWMttqSLUVdjCqitBOjdCD0svWOMQUVqrXX6iFD7POps6xXAojsX/dGBpKnjZctLA==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.43.0.tgz", + "integrity": "sha512-Ebw0+MCqoYflop7wVKj711ccbNlrwTBCtjY5rlbiY9kHL2bCYxq+qltK6uPsVBGGAOb033H2VO0YobcQVxoW7Q==", "dev": true, "dependencies": { - "playwright": "1.42.0" + "playwright": "1.43.0" }, "bin": { "playwright": "cli.js" @@ -1285,12 +1285,12 @@ } }, "node_modules/playwright": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.42.0.tgz", - "integrity": "sha512-Ko7YRUgj5xBHbntrgt4EIw/nE//XBHOKVKnBjO1KuZkmkhlbgyggTe5s9hjqQ1LpN+Xg+kHsQyt5Pa0Bw5XpvQ==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.43.0.tgz", + "integrity": "sha512-SiOKHbVjTSf6wHuGCbqrEyzlm6qvXcv7mENP+OZon1I07brfZLGdfWV0l/efAzVx7TF3Z45ov1gPEkku9q25YQ==", "dev": true, "dependencies": { - "playwright-core": "1.42.0" + "playwright-core": "1.43.0" }, "bin": { "playwright": "cli.js" @@ -1303,9 +1303,9 @@ } }, "node_modules/playwright-core": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.42.0.tgz", - "integrity": "sha512-0HD9y8qEVlcbsAjdpBaFjmaTHf+1FeIddy8VJLeiqwhcNqGCBe4Wp2e8knpqiYbzxtxarxiXyNDw2cG8sCaNMQ==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.43.0.tgz", + "integrity": "sha512-iWFjyBUH97+pUFiyTqSLd8cDMMOS0r2ZYz2qEsPjH8/bX++sbIJT35MSwKnp1r/OQBAqC5XO99xFbJ9XClhf4w==", "dev": true, "bin": { "playwright-core": "cli.js" @@ -1708,12 +1708,12 @@ } }, "@playwright/test": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.42.0.tgz", - "integrity": "sha512-2k1HzC28Fs+HiwbJOQDUwrWMttqSLUVdjCqitBOjdCD0svWOMQUVqrXX6iFD7POps6xXAojsX/dGBpKnjZctLA==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.43.0.tgz", + "integrity": "sha512-Ebw0+MCqoYflop7wVKj711ccbNlrwTBCtjY5rlbiY9kHL2bCYxq+qltK6uPsVBGGAOb033H2VO0YobcQVxoW7Q==", "dev": true, "requires": { - "playwright": "1.42.0" + "playwright": "1.43.0" } }, "@types/json-schema": { @@ -2513,19 +2513,19 @@ "dev": true }, "playwright": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.42.0.tgz", - "integrity": "sha512-Ko7YRUgj5xBHbntrgt4EIw/nE//XBHOKVKnBjO1KuZkmkhlbgyggTe5s9hjqQ1LpN+Xg+kHsQyt5Pa0Bw5XpvQ==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.43.0.tgz", + "integrity": "sha512-SiOKHbVjTSf6wHuGCbqrEyzlm6qvXcv7mENP+OZon1I07brfZLGdfWV0l/efAzVx7TF3Z45ov1gPEkku9q25YQ==", "dev": true, "requires": { "fsevents": "2.3.2", - "playwright-core": "1.42.0" + "playwright-core": "1.43.0" } }, "playwright-core": { - "version": "1.42.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.42.0.tgz", - "integrity": "sha512-0HD9y8qEVlcbsAjdpBaFjmaTHf+1FeIddy8VJLeiqwhcNqGCBe4Wp2e8knpqiYbzxtxarxiXyNDw2cG8sCaNMQ==", + "version": "1.43.0", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.43.0.tgz", + "integrity": "sha512-iWFjyBUH97+pUFiyTqSLd8cDMMOS0r2ZYz2qEsPjH8/bX++sbIJT35MSwKnp1r/OQBAqC5XO99xFbJ9XClhf4w==", "dev": true }, "prelude-ls": { diff --git a/package.json b/package.json index de9211c..1943268 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "author": "", "license": "ISC", "devDependencies": { - "@playwright/test": "^1.42.0", + "@playwright/test": "1.43.0", "@types/node": "^20.10.3", "@typescript-eslint/eslint-plugin": "^6.4.1", "@typescript-eslint/parser": "^6.4.1", diff --git a/tests/examples/capturing-elements.test.ts b/tests/examples/capturing-elements.test.ts index a7f6b10..c58a0b7 100644 --- a/tests/examples/capturing-elements.test.ts +++ b/tests/examples/capturing-elements.test.ts @@ -1,24 +1,30 @@ -import { expect, test } from '@playwright/test'; +import { test } from "@playwright/test"; - - -test('Capturing captcha popup', { - tag: ['@test', '@JIRAID=123123'], +test( + "Capturing captcha popup", + { + tag: ["@test", "@JIRAID=123123"], annotation: [ - { type: 'issue', description: '123123' }, - { type: 'issue', description: '123123' }, - { type: 'issue', description: '123123' }, - ] - }, async ({ page }) => { + { type: "issue", description: "123123" }, + { type: "issue", description: "123123" }, + { type: "issue", description: "123123" }, + ], + }, + async ({ page }) => { // Setup the handler. - await page.addLocatorHandler( - page.getByRole('alertdialog'), - async () => { - console.log('cookie popup found') - await page.getByRole('button', { name: 'Allow All' }).click(); - }); + await page.addLocatorHandler(page.getByRole("alertdialog"), async () => { + console.log("cookie popup found"); + await page.getByRole("button", { name: "Allow All" }).click(); + }); // Write the test as usual. - await page.goto('https://www.cookiepro.com/knowledge/how-do-i-test-cookie-blocking-implementation/'); - await page.locator('#maincontent').getByRole('link', { name: 'Pricing' }).click(); + await page.goto( + "https://www.cookiepro.com/knowledge/how-do-i-test-cookie-blocking-implementation/" + ); + await page.pause(); + await page + .locator("#maincontent") + .getByRole("link", { name: "Pricing" }) + .click(); // await page.waitForTimeout(60000); -}) \ No newline at end of file + } +);