mirror of
https://github.com/heyman/heynote.git
synced 2024-12-22 14:40:37 +01:00
Update Playwright to latest version
Should fix broken tests in Github actions. Add workaround for platform detection when running Playwright tests on Mac which no longer works in latest version.
This commit is contained in:
parent
146e33ef3f
commit
96ae76897f
34
package-lock.json
generated
34
package-lock.json
generated
@ -40,7 +40,7 @@
|
|||||||
"@electron/asar": "^3.2.2",
|
"@electron/asar": "^3.2.2",
|
||||||
"@lezer/generator": "^1.5.1",
|
"@lezer/generator": "^1.5.1",
|
||||||
"@lezer/markdown": "^1.1.2",
|
"@lezer/markdown": "^1.1.2",
|
||||||
"@playwright/test": "^1.40.1",
|
"@playwright/test": "^1.49.0",
|
||||||
"@replit/codemirror-lang-csharp": "^6.2.0",
|
"@replit/codemirror-lang-csharp": "^6.2.0",
|
||||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||||
"@types/node": "^20.10.5",
|
"@types/node": "^20.10.5",
|
||||||
@ -1249,18 +1249,19 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@playwright/test": {
|
"node_modules/@playwright/test": {
|
||||||
"version": "1.40.1",
|
"version": "1.49.0",
|
||||||
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.40.1.tgz",
|
"resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.49.0.tgz",
|
||||||
"integrity": "sha512-EaaawMTOeEItCRvfmkI9v6rBkF1svM8wjl/YPRrg2N2Wmp+4qJYkWtJsbew1szfKKDm6fPLy4YAanBhIlf9dWw==",
|
"integrity": "sha512-DMulbwQURa8rNIQrf94+jPJQ4FmOVdpE5ZppRNvWVjvhC+6sOeo28r8MgIpQRYouXRtt/FCCXU7zn20jnHR4Qw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"playwright": "1.40.1"
|
"playwright": "1.49.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"playwright": "cli.js"
|
"playwright": "cli.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@replit/codemirror-lang-csharp": {
|
"node_modules/@replit/codemirror-lang-csharp": {
|
||||||
@ -4971,33 +4972,35 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/playwright": {
|
"node_modules/playwright": {
|
||||||
"version": "1.40.1",
|
"version": "1.49.0",
|
||||||
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.40.1.tgz",
|
"resolved": "https://registry.npmjs.org/playwright/-/playwright-1.49.0.tgz",
|
||||||
"integrity": "sha512-2eHI7IioIpQ0bS1Ovg/HszsN/XKNwEG1kbzSDDmADpclKc7CyqkHw7Mg2JCz/bbCxg25QUPcjksoMW7JcIFQmw==",
|
"integrity": "sha512-eKpmys0UFDnfNb3vfsf8Vx2LEOtflgRebl0Im2eQQnYMA4Aqd+Zw8bEOB+7ZKvN76901mRnqdsiOGKxzVTbi7A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"playwright-core": "1.40.1"
|
"playwright-core": "1.49.0"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"playwright": "cli.js"
|
"playwright": "cli.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"fsevents": "2.3.2"
|
"fsevents": "2.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/playwright-core": {
|
"node_modules/playwright-core": {
|
||||||
"version": "1.40.1",
|
"version": "1.49.0",
|
||||||
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.40.1.tgz",
|
"resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.49.0.tgz",
|
||||||
"integrity": "sha512-+hkOycxPiV534c4HhpfX6yrlawqVUzITRKwHAmYfmsVreltEl6fAZJ3DPfLMOODw0H3s1Itd6MDCWmP1fl/QvQ==",
|
"integrity": "sha512-R+3KKTQF3npy5GTiKH/T+kdhoJfJojjHESR1YEWhYuEKRVfVaxH3+4+GvXE5xyCngCxhxnykk0Vlah9v8fs3jA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
"bin": {
|
"bin": {
|
||||||
"playwright-core": "cli.js"
|
"playwright-core": "cli.js"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/playwright/node_modules/fsevents": {
|
"node_modules/playwright/node_modules/fsevents": {
|
||||||
@ -5006,6 +5009,7 @@
|
|||||||
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
"integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
"optional": true,
|
"optional": true,
|
||||||
"os": [
|
"os": [
|
||||||
"darwin"
|
"darwin"
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
"@electron/asar": "^3.2.2",
|
"@electron/asar": "^3.2.2",
|
||||||
"@lezer/generator": "^1.5.1",
|
"@lezer/generator": "^1.5.1",
|
||||||
"@lezer/markdown": "^1.1.2",
|
"@lezer/markdown": "^1.1.2",
|
||||||
"@playwright/test": "^1.40.1",
|
"@playwright/test": "^1.49.0",
|
||||||
"@replit/codemirror-lang-csharp": "^6.2.0",
|
"@replit/codemirror-lang-csharp": "^6.2.0",
|
||||||
"@rollup/plugin-node-resolve": "^15.0.1",
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
||||||
"@types/node": "^20.10.5",
|
"@types/node": "^20.10.5",
|
||||||
|
@ -18,25 +18,36 @@ let autoUpdateCallbacks = null
|
|||||||
let currencyData = null
|
let currencyData = null
|
||||||
|
|
||||||
let platform
|
let platform
|
||||||
const uaPlatform = window.navigator?.userAgentData?.platform || window.navigator.platform
|
|
||||||
if (uaPlatform.indexOf("Win") !== -1) {
|
// In the latest version of Playwright, the window.navigator.userAgentData.platform is not reported correctly on Mac,
|
||||||
platform = {
|
// wo we'll fallback to deprecated window.navigator.platform which still works
|
||||||
isMac: false,
|
if (__TESTS__ && window.navigator.platform.indexOf("Mac") !== -1) {
|
||||||
isWindows: true,
|
|
||||||
isLinux: false,
|
|
||||||
}
|
|
||||||
} else if (uaPlatform.indexOf("Linux") !== -1) {
|
|
||||||
platform = {
|
|
||||||
isMac: false,
|
|
||||||
isWindows: false,
|
|
||||||
isLinux: true,
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
platform = {
|
platform = {
|
||||||
isMac: true,
|
isMac: true,
|
||||||
isWindows: false,
|
isWindows: false,
|
||||||
isLinux: false,
|
isLinux: false,
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
const uaPlatform = window.navigator?.userAgentData?.platform || window.navigator.platform
|
||||||
|
if (uaPlatform.indexOf("Win") !== -1) {
|
||||||
|
platform = {
|
||||||
|
isMac: false,
|
||||||
|
isWindows: true,
|
||||||
|
isLinux: false,
|
||||||
|
}
|
||||||
|
} else if (uaPlatform.indexOf("Linux") !== -1) {
|
||||||
|
platform = {
|
||||||
|
isMac: false,
|
||||||
|
isWindows: false,
|
||||||
|
isLinux: true,
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
platform = {
|
||||||
|
isMac: true,
|
||||||
|
isWindows: false,
|
||||||
|
isLinux: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
platform.isWebApp = true
|
platform.isWebApp = true
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user