|
1 | 1 | // ***************************************************************************** |
2 | | -// Copyright (C) 2021-2023 logi.cals GmbH, EclipseSource and others. |
| 2 | +// Copyright (C) 2021 logi.cals GmbH, EclipseSource and others. |
3 | 3 | // |
4 | 4 | // This program and the accompanying materials are made available under the |
5 | 5 | // terms of the Eclipse Public License v. 2.0 which is available at |
|
11 | 11 | // with the GNU Classpath Exception which is available at |
12 | 12 | // https://www.gnu.org/software/classpath/license.html. |
13 | 13 | // |
14 | | -// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0 |
| 14 | +// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
15 | 15 | // ***************************************************************************** |
16 | 16 |
|
17 | | -import { defineConfig } from '@playwright/test'; |
| 17 | +import { PlaywrightTestConfig } from '@playwright/test'; |
18 | 18 |
|
19 | | -// Note: process.env.CI is always set to true for GitHub Actions |
20 | | - |
21 | | -export default defineConfig({ |
22 | | - testDir: './lib/tests', |
23 | | - testMatch: ['**/*.test.js'], |
24 | | - workers: process.env.CI ? 1 : 2, |
25 | | - retries: process.env.CI ? 1 : 0, |
26 | | - // The number of times to repeat each test, useful for debugging flaky tests |
27 | | - repeatEach: 1, |
| 19 | +const config: PlaywrightTestConfig = { |
| 20 | + testDir: '../lib/tests', |
| 21 | + testMatch: ['**/*.js'], |
| 22 | + workers: 1, |
| 23 | + fullyParallel: false, |
28 | 24 | // Timeout for each test in milliseconds. |
29 | | - timeout: 30 * 1000, |
| 25 | + timeout: 60 * 1000, |
30 | 26 | use: { |
31 | 27 | baseURL: 'http://localhost:3000', |
32 | 28 | browserName: 'chromium', |
33 | | - screenshot: 'only-on-failure', |
34 | 29 | permissions: ['clipboard-read'], |
35 | | - viewport: { width: 1920, height: 1080 }, |
36 | | - }, |
37 | | - snapshotDir: './src/tests/snapshots', |
38 | | - expect: { |
39 | | - toMatchSnapshot: { threshold: 0.01 } |
| 30 | + screenshot: 'only-on-failure' |
40 | 31 | }, |
41 | 32 | preserveOutput: 'failures-only', |
42 | | - reporter: process.env.CI |
43 | | - ? [['list'], ['allure-playwright'], ['github']] |
44 | | - : [['list'], ['allure-playwright']], |
| 33 | + reporter: [ |
| 34 | + ['list'], |
| 35 | + ['allure-playwright'] |
| 36 | + ], |
45 | 37 | // Reuse Theia backend on port 3000 or start instance before executing the tests |
46 | 38 | webServer: { |
47 | 39 | command: 'yarn theia:start', |
48 | 40 | port: 3000, |
49 | 41 | reuseExistingServer: true |
50 | 42 | } |
51 | | -}); |
| 43 | +}; |
| 44 | + |
| 45 | +export default config; |
0 commit comments