universo-platform-2d

Форк
0
63 строки · 1.6 Кб
1
import { testResultDir } from '@affine-test/kit/playwright';
2
import type { PlaywrightTestConfig } from '@playwright/test';
3
// import { devices } from '@playwright/test';
4

5
/**
6
 * Read environment variables from file.
7
 * https://github.com/motdotla/dotenv
8
 */
9
// require('dotenv').config();
10

11
/**
12
 * See https://playwright.dev/docs/test-configuration.
13
 */
14
const config: PlaywrightTestConfig = {
15
  testDir: './e2e',
16
  fullyParallel: true,
17
  timeout: process.env.CI ? 300_000 : 60_000,
18
  outputDir: testResultDir,
19
  use: {
20
    viewport: { width: 1440, height: 800 },
21
  },
22
  reporter: process.env.CI ? 'github' : 'list',
23
  webServer: [
24
    // Intentionally not building the web, reminds you to run it by yourself.
25
    {
26
      command: 'yarn -T run start:web-static',
27
      port: 8080,
28
      timeout: 120 * 1000,
29
      reuseExistingServer: !process.env.CI,
30
      stdout: 'pipe',
31
      env: {
32
        COVERAGE: process.env.COVERAGE || 'false',
33
        DISTRIBUTION: 'desktop',
34
      },
35
    },
36
    {
37
      command: 'yarn workspace @affine/server start',
38
      port: 3010,
39
      timeout: 120 * 1000,
40
      reuseExistingServer: !process.env.CI,
41
      stdout: 'pipe',
42
      stderr: 'pipe',
43
      env: {
44
        DATABASE_URL:
45
          process.env.DATABASE_URL ??
46
          'postgresql://affine:affine@localhost:5432/affine',
47
        NODE_ENV: 'development',
48
        AFFINE_ENV: process.env.AFFINE_ENV ?? 'dev',
49
        DEBUG: 'affine:*',
50
        FORCE_COLOR: 'true',
51
        DEBUG_COLORS: 'true',
52
        MAILER_SENDER: 'noreply@toeverything.info',
53
      },
54
    },
55
  ],
56
};
57

58
if (process.env.CI) {
59
  config.retries = 3;
60
  config.workers = '50%';
61
}
62

63
export default config;
64

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.