Files
AFFiNE-Mirror/tests/affine-cloud-copilot/playwright.config.ts
T
DarkSky ee899a267b feat(server): improve context management (#15448)
#### PR Dependency Tree


* **PR #15448** 👈

This tree was auto-generated by
[Charcoal](https://github.com/danerwilliams/charcoal)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added workspace artifact upload, browsing, removal, deduplication, and
library ownership support.
* Copilot now supports scoped document and artifact search, canvas
reading, live editor context, and frontend tools.
* Added scope and focus selectors with source-resolution receipts in
chat.
* Added embedding health, progress, synchronization, and retrieval
capabilities.
* Added BYOK policy visibility, provider restrictions, endpoint dialect
selection, and validation.
* Added delegated editor interactions and userdata document
authorization.

* **Bug Fixes**
* Improved attachment handling, cancellation, access control, retrieval
fallbacks, workspace synchronization, and configuration validation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-10 09:27:58 +08:00

79 lines
2.1 KiB
TypeScript

import { fileURLToPath } from 'node:url';
import { testResultDir } from '@affine-test/kit/playwright';
import type {
PlaywrightTestConfig,
PlaywrightWorkerOptions,
} from '@playwright/test';
const runtimeConfigPath = fileURLToPath(
new URL('./runtime-config.json', import.meta.url)
);
const config: PlaywrightTestConfig = {
testDir: './e2e',
fullyParallel: true,
timeout: 120_000,
outputDir: testResultDir,
globalSetup: './global-setup.ts',
use: {
baseURL: 'http://localhost:8080/',
browserName:
(process.env.BROWSER as PlaywrightWorkerOptions['browserName']) ??
'chromium',
permissions: ['clipboard-read', 'clipboard-write'],
viewport: { width: 1440, height: 800 },
actionTimeout: 10 * 1000,
locale: 'en-US',
trace: 'retain-on-failure',
video: 'retain-on-failure',
},
forbidOnly: !!process.env.CI,
workers: 4,
retries: 3,
reporter: process.env.CI ? 'github' : 'list',
webServer: [
{
command: 'yarn run -T affine dev -p @affine/web',
stdout: 'pipe',
stderr: 'pipe',
timeout: 240 * 1000,
reuseExistingServer: !process.env.CI,
env: {
COVERAGE: process.env.COVERAGE || 'false',
},
url: 'http://localhost:8080',
},
{
command: 'yarn run -T affine dev -p @affine/server',
timeout: 240 * 1000,
reuseExistingServer: !process.env.CI,
stdout: 'pipe',
stderr: 'pipe',
env: {
DATABASE_URL:
process.env.DATABASE_URL ??
'postgresql://affine:affine@localhost:5432/affine',
NODE_ENV: 'test',
AFFINE_ENV: process.env.AFFINE_ENV ?? 'dev',
AFFINE_BACKEND_RUNTIME_CONFIG_PATH: runtimeConfigPath,
DEBUG: 'affine:*',
FORCE_COLOR: 'true',
DEBUG_COLORS: 'true',
MAILER_HOST: '0.0.0.0',
MAILER_PORT: '1025',
MAILER_SENDER: 'noreply@toeverything.info',
MAILER_USER: 'noreply@toeverything.info',
MAILER_PASSWORD: 'affine',
},
url: 'http://localhost:3010/graphql',
},
],
};
if (process.env.CI) {
config.retries = 3;
}
export default config;