Преглед на файлове

upgrade playwright to 1.31.0 (#8688)

Yichen Yan преди 2 години
родител
ревизия
f2b99dbc4c
променени са 3 файла, в които са добавени 25 реда и са изтрити 32 реда
  1. 2 11
      e2e-tests/fixtures.ts
  2. 2 2
      package.json
  3. 21 19
      yarn.lock

+ 2 - 11
e2e-tests/fixtures.ts

@@ -26,21 +26,12 @@ const consoleLogWatcher = (msg: ConsoleMessage) => {
   const text = msg.text()
   const text = msg.text()
   logs += text + '\n'
   logs += text + '\n'
 
 
-  // expect() will remember all arguments in memory,
-  // and the memory usage will grow *exponentially* in the number of output line.
-  // So we call expect() iff interesting pattern has already be found to avoid OOM.
-  const expectNotMatchWithCheck = (pattern: RegExp) => {
-    if (text.match(pattern)) {
-      expect(text, logs).not.toMatch(pattern)
-    }
-  }
-
-  expectNotMatchWithCheck(/^(Failed to|Uncaught)/)
+  expect(text, logs).not.toMatch(/^(Failed to|Uncaught)/)
 
 
   // youtube video
   // youtube video
   // Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'ch-ua-reduced'.
   // Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'ch-ua-reduced'.
   if (!text.match(/^Error with Permissions-Policy header:/)) {
   if (!text.match(/^Error with Permissions-Policy header:/)) {
-    expectNotMatchWithCheck(/^Error/)
+    expect(text, logs).not.toMatch(/^Error/)
   }
   }
 
 
   // NOTE: React warnings will be logged as error.
   // NOTE: React warnings will be logged as error.

+ 2 - 2
package.json

@@ -6,7 +6,7 @@
     "devDependencies": {
     "devDependencies": {
         "@axe-core/playwright": "=4.4.4",
         "@axe-core/playwright": "=4.4.4",
         "@capacitor/cli": "^4.0.0",
         "@capacitor/cli": "^4.0.0",
-        "@playwright/test": "=1.25.2",
+        "@playwright/test": "=1.31.0",
         "@tailwindcss/aspect-ratio": "0.4.2",
         "@tailwindcss/aspect-ratio": "0.4.2",
         "@tailwindcss/forms": "0.5.3",
         "@tailwindcss/forms": "0.5.3",
         "@tailwindcss/line-clamp": "0.4.2",
         "@tailwindcss/line-clamp": "0.4.2",
@@ -20,7 +20,7 @@
         "gulp-clean-css": "^4.3.0",
         "gulp-clean-css": "^4.3.0",
         "ip": "1.1.8",
         "ip": "1.1.8",
         "npm-run-all": "^4.1.5",
         "npm-run-all": "^4.1.5",
-        "playwright": "=1.25.2",
+        "playwright": "=1.31.0",
         "postcss": "8.4.17",
         "postcss": "8.4.17",
         "postcss-cli": "10.0.0",
         "postcss-cli": "10.0.0",
         "postcss-import": "15.0.0",
         "postcss-import": "15.0.0",

+ 21 - 19
yarn.lock

@@ -713,13 +713,15 @@
     eventemitter3 "^3.1.0"
     eventemitter3 "^3.1.0"
     url "^0.11.0"
     url "^0.11.0"
 
 
-"@playwright/test@=1.25.2":
-  version "1.25.2"
-  resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.25.2.tgz#e726cf4844f096315c3954fdb3abf295cede43ba"
-  integrity sha512-6qPznIR4Fw02OMbqXUPMG6bFFg1hDVNEdihKy0t9K0dmRbus1DyP5Q5XFQhGwEHQkLG5hrSfBuu9CW/foqhQHQ==
+"@playwright/test@=1.31.0":
+  version "1.31.0"
+  resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.31.0.tgz#bde42ca06804164be54893525110adda946248d6"
+  integrity sha512-Ys5s/06Dg9g3zAIdCIb/UOBYim3U7Zjb3DvC6XBtnRmnglH5O47iwYzmtxXu9fhSyzI2Jn28apkXIOD81GgCdw==
   dependencies:
   dependencies:
     "@types/node" "*"
     "@types/node" "*"
-    playwright-core "1.25.2"
+    playwright-core "1.31.0"
+  optionalDependencies:
+    fsevents "2.3.2"
 
 
 "@popperjs/core@^2.9.0":
 "@popperjs/core@^2.9.0":
   version "2.11.6"
   version "2.11.6"
@@ -3073,6 +3075,11 @@ [email protected]:
   resolved "https://registry.yarnpkg.com/fs/-/fs-0.0.1-security.tgz#8a7bd37186b6dddf3813f23858b57ecaaf5e41d4"
   resolved "https://registry.yarnpkg.com/fs/-/fs-0.0.1-security.tgz#8a7bd37186b6dddf3813f23858b57ecaaf5e41d4"
   integrity sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==
   integrity sha512-3XY9e1pP0CVEUCdj5BmfIZxRBTSDycnbqhIOGec9QYtmVH2fbLpj86CFWkrNOkt/Fvty4KZG5lTglL9j/gJ87w==
 
 
[email protected], fsevents@~2.3.1, fsevents@~2.3.2:
+  version "2.3.2"
+  resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
+  integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
+
 fsevents@^1.2.7:
 fsevents@^1.2.7:
   version "1.2.13"
   version "1.2.13"
   resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38"
   resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38"
@@ -3081,11 +3088,6 @@ fsevents@^1.2.7:
     bindings "^1.5.0"
     bindings "^1.5.0"
     nan "^2.12.1"
     nan "^2.12.1"
 
 
-fsevents@~2.3.1, fsevents@~2.3.2:
-  version "2.3.2"
-  resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
-  integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
-
 function-bind@^1.1.1:
 function-bind@^1.1.1:
   version "1.1.1"
   version "1.1.1"
   resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
   resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
@@ -5378,17 +5380,17 @@ [email protected]:
     "@pixi/ticker" "6.2.0"
     "@pixi/ticker" "6.2.0"
     "@pixi/utils" "6.2.0"
     "@pixi/utils" "6.2.0"
 
 
-playwright-core@1.25.2:
-  version "1.25.2"
-  resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.25.2.tgz#ea4baa398a4d45fcdfe48799482b599e3d0f033f"
-  integrity sha512-0yTbUE9lIddkEpLHL3u8PoCL+pWiZtj5A/j3U7YoNjcmKKDGBnCrgHJMzwd2J5vy6l28q4ki3JIuz7McLHhl1A==
+playwright-core@1.31.0:
+  version "1.31.0"
+  resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.31.0.tgz#dbd184771535e76c6743ef5c082def5564f07e85"
+  integrity sha512-/KquBjS5DcASCh8cGeNVHuC0kyb7c9plKTwaKxgOGtxT7+DZO2fjmFvPDBSXslEIK5CeOO/2kk5rOCktFXKEdA==
 
 
-playwright@=1.25.2, "playwright@>= 1.0.0":
-  version "1.25.2"
-  resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.25.2.tgz#0fc67e4385a52a51371ff9114bf68e3ad50a7f41"
-  integrity sha512-RwMB5SFRV/8wSfK+tK8ycpqdzORvoqUNz9DUeRfSgZFrZej5uuBl9wFjWcc+OkXFEtaPmx1acAVGG7hA4IJ1kg==
+playwright@=1.31.0, "playwright@>= 1.0.0":
+  version "1.31.0"
+  resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.31.0.tgz#c34de492c79b65dfa1a3e45c5bded785f0badc6c"
+  integrity sha512-cFn1ie3bdYw/9/Ty3842CfPSRSy+ZWPjEhrxWgC+jL/CUjq5RKVJZwUbXV1UKBQU1Vo0NetsokXmk9EEZiqVHQ==
   dependencies:
   dependencies:
-    playwright-core "1.25.2"
+    playwright-core "1.31.0"
 
 
 plist@^3.0.2, plist@^3.0.5, plist@^3.0.6:
 plist@^3.0.2, plist@^3.0.5, plist@^3.0.6:
   version "3.0.6"
   version "3.0.6"