From 0d46e8d95b349c3552419b8739ca0c02f0540181 Mon Sep 17 00:00:00 2001 From: fbasso Date: Thu, 14 Sep 2023 10:26:02 +0200 Subject: [PATCH] test: upgrade Playwright --- .../filter/timepicker-filter.e2e-spec.ts | 12 ++++---- .../autoclose/typeahead-autoclose.e2e-spec.ts | 2 +- .../focus/typeahead-focus.e2e-spec.ts | 2 +- yarn.lock | 30 +++++++++++-------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/e2e-app/src/app/timepicker/filter/timepicker-filter.e2e-spec.ts b/e2e-app/src/app/timepicker/filter/timepicker-filter.e2e-spec.ts index abf9b5ddf6..4bd531199e 100644 --- a/e2e-app/src/app/timepicker/filter/timepicker-filter.e2e-spec.ts +++ b/e2e-app/src/app/timepicker/filter/timepicker-filter.e2e-spec.ts @@ -18,9 +18,9 @@ test.describe('Timepicker Filter', () => { test(`should accept numbers`, async () => { await expectValue('::'); // No starting values - await getPage().type(SELECTOR_HOUR, '1'); - await getPage().type(SELECTOR_MIN, '2'); - await getPage().type(SELECTOR_SEC, '3'); + await getPage().locator(SELECTOR_HOUR).pressSequentially('1'); + await getPage().locator(SELECTOR_MIN).pressSequentially('2'); + await getPage().locator(SELECTOR_SEC).pressSequentially('3'); await getPage().click(SELECTOR_HOUR); await expectValue('01:02:03'); @@ -29,9 +29,9 @@ test.describe('Timepicker Filter', () => { test(`shouldn't accept alpha`, async () => { await expectValue('::'); // No starting values - await getPage().type(SELECTOR_HOUR, 'A'); - await getPage().type(SELECTOR_MIN, 'A'); - await getPage().type(SELECTOR_SEC, 'A'); + await getPage().locator(SELECTOR_HOUR).pressSequentially('A'); + await getPage().locator(SELECTOR_MIN).pressSequentially('A'); + await getPage().locator(SELECTOR_SEC).pressSequentially('A'); await getPage().click(SELECTOR_HOUR); await expectValue('::'); diff --git a/e2e-app/src/app/typeahead/autoclose/typeahead-autoclose.e2e-spec.ts b/e2e-app/src/app/typeahead/autoclose/typeahead-autoclose.e2e-spec.ts index 241adf8cf3..a1aef35899 100644 --- a/e2e-app/src/app/typeahead/autoclose/typeahead-autoclose.e2e-spec.ts +++ b/e2e-app/src/app/typeahead/autoclose/typeahead-autoclose.e2e-spec.ts @@ -30,7 +30,7 @@ const expectTypeaheadToBeClosed = async (message: string) => { }; const setTypeaheadValue = async (text: string) => { - await getPage().type(SELECTOR_TYPEAHEAD, text); + await getPage().locator(SELECTOR_TYPEAHEAD).pressSequentially(text); await expectTypeaheadToBeOpen(`Typed ${text}, should be open`); }; diff --git a/e2e-app/src/app/typeahead/focus/typeahead-focus.e2e-spec.ts b/e2e-app/src/app/typeahead/focus/typeahead-focus.e2e-spec.ts index a55240c47c..ddff6c1a0c 100644 --- a/e2e-app/src/app/typeahead/focus/typeahead-focus.e2e-spec.ts +++ b/e2e-app/src/app/typeahead/focus/typeahead-focus.e2e-spec.ts @@ -36,7 +36,7 @@ test.describe('Typeahead', () => { test(`should preserve value previously selected with mouse when reopening with focus then closing without selection`, async () => { await getPage().click(SELECTOR_TYPEAHEAD); - await getPage().type(SELECTOR_TYPEAHEAD, 'col'); + await getPage().locator(SELECTOR_TYPEAHEAD).pressSequentially('col'); await waitForDropdownOpen(2); await waitForTypeaheadFocused(); diff --git a/yarn.lock b/yarn.lock index 0e2ea5d2b0..57326ee6b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2033,15 +2033,12 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@playwright/test@^1.32.1": - version "1.33.0" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.33.0.tgz#669ef859efb81b143dfc624eef99d1dd92a81b67" - integrity sha512-YunBa2mE7Hq4CfPkGzQRK916a4tuZoVx/EpLjeWlTVOnD4S2+fdaQZE0LJkbfhN5FTSKNLdcl7MoT5XB37bTkg== +"@playwright/test@^1.38.0": + version "1.38.0" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.38.0.tgz#0ad33f62394d6a9cb768d0ddfa93b12304c64e13" + integrity sha512-xis/RXXsLxwThKnlIXouxmIvvT3zvQj1JE39GsNieMUrMpb3/GySHDh2j8itCG22qKVD4MYLBp7xB73cUW/UUw== dependencies: - "@types/node" "*" - playwright-core "1.33.0" - optionalDependencies: - fsevents "2.3.2" + playwright "1.38.0" "@popperjs/core@2.11.6": version "2.11.6" @@ -9265,10 +9262,19 @@ pkg-dir@^4.1.0, pkg-dir@^4.2.0: dependencies: find-up "^4.0.0" -playwright-core@1.33.0: - version "1.33.0" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.33.0.tgz#269efe29a927cd6d144d05f3c2d2f72bd72447a1" - integrity sha512-aizyPE1Cj62vAECdph1iaMILpT0WUDCq3E6rW6I+dleSbBoGbktvJtzS6VHkZ4DKNEOG9qJpiom/ZxO+S15LAw== +playwright-core@1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.38.0.tgz#cb8e135da1c0b1918b070642372040ed9aa7009a" + integrity sha512-f8z1y8J9zvmHoEhKgspmCvOExF2XdcxMW8jNRuX4vkQFrzV4MlZ55iwb5QeyiFQgOFCUolXiRHgpjSEnqvO48g== + +playwright@1.38.0: + version "1.38.0" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.38.0.tgz#0ee19d38512b7b1f961c0eb44008a6fed373d206" + integrity sha512-fJGw+HO0YY+fU/F1N57DMO+TmXHTrmr905J05zwAQE9xkuwP/QLDk63rVhmyxh03dYnEhnRbsdbH9B0UVVRB3A== + dependencies: + playwright-core "1.38.0" + optionalDependencies: + fsevents "2.3.2" portscanner@2.2.0: version "2.2.0"