Migrate serialize api tests to playwright

This commit is contained in:
Daniel Imms
2024-07-03 02:30:27 -07:00
parent 6047093325
commit c9ad9cbf0e
4 changed files with 188 additions and 152 deletions
@@ -0,0 +1,35 @@
import { PlaywrightTestConfig } from '@playwright/test';
const config: PlaywrightTestConfig = {
testDir: '.',
timeout: 10000,
projects: [
{
name: 'Chrome Stable',
use: {
browserName: 'chromium',
channel: 'chrome'
}
},
{
name: 'Firefox Stable',
use: {
browserName: 'firefox'
}
},
{
name: 'WebKit',
use: {
browserName: 'webkit'
}
}
],
reporter: 'list',
webServer: {
command: 'npm run start-server-only',
port: 3000,
timeout: 120000,
reuseExistingServer: !process.env.CI
}
};
export default config;
+8 -3
View File
@@ -3,7 +3,7 @@
"module": "commonjs",
"target": "es2021",
"lib": [
"es2015"
"es2021",
],
"rootDir": ".",
"outDir": "../out-test",
@@ -13,13 +13,15 @@
"paths": {
"common/*": [
"../../../src/common/*"
],
"browser/*": [
"../../../src/browser/*"
]
},
"strict": true,
"types": [
"../../../node_modules/@types/mocha",
"../../../node_modules/@types/node",
"../../../out-test/api/TestUtils"
"../../../out-test/playwright/TestUtils"
]
},
"include": [
@@ -29,6 +31,9 @@
"references": [
{
"path": "../../../src/common"
},
{
"path": "../../../src/browser"
}
]
}
+1
View File
@@ -24,6 +24,7 @@ let configs = [
{ name: 'addon-clipboard', path: 'addons/addon-clipboard/out-test/playwright.config.js' },
{ name: 'addon-fit', path: 'addons/addon-fit/out-test/playwright.config.js' },
{ name: 'addon-search', path: 'addons/addon-search/out-test/playwright.config.js' },
{ name: 'addon-serialize', path: 'addons/addon-serialize/out-test/playwright.config.js' },
{ name: 'addon-webgl', path: 'addons/addon-webgl/out-test/playwright.config.js' }
];