e2e(core): add test for split view (#6133)

This commit is contained in:
Peng Xiao
2024-03-18 07:04:06 +00:00
parent dc8f351051
commit 5693d90451
4 changed files with 67 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
import assert from 'node:assert';
import { testResultDir } from '@affine-test/kit/playwright';
import type { PlaywrightTestConfig } from '@playwright/test';
// import { devices } from '@playwright/test';
@@ -26,4 +28,23 @@ if (process.env.CI) {
config.workers = '50%';
}
if (process.env.DEV_SERVER_URL) {
const devServerUrl = new URL(process.env.DEV_SERVER_URL);
assert(
devServerUrl.origin === 'http://localhost:8080',
'DEV_SERVER_URL must be http://localhost:8080'
);
config.webServer = [
{
command: 'yarn run start:web-static',
port: 8080,
timeout: 120 * 1000,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE || 'false',
},
},
];
}
export default config;