| // Licensed to the Apache Software Foundation (ASF) under one |
| // or more contributor license agreements. See the NOTICE file |
| // distributed with this work for additional information |
| // regarding copyright ownership. The ASF licenses this file |
| // to you under the Apache License, Version 2.0 (the |
| // "License"); you may not use this file except in compliance |
| // with the License. You may obtain a copy of the License at |
| // |
| // http://www.apache.org/licenses/LICENSE-2.0 |
| // |
| // Unless required by applicable law or agreed to in writing, |
| // software distributed under the License is distributed on an |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| // KIND, either express or implied. See the License for the |
| // specific language governing permissions and limitations |
| // under the License. |
| |
| import { defineConfig, devices } from '@playwright/test'; |
| |
| const externalBaseUrl = process.env.DORIS_E2E_BASE_URL; |
| |
| export default defineConfig({ |
| testDir: './tests/e2e', |
| fullyParallel: false, |
| // The shared a123 cluster uses one root test account. Logout intentionally |
| // closes every Web SQL session for that user, so files must not overlap. |
| workers: 1, |
| forbidOnly: true, |
| retries: 0, |
| reporter: 'list', |
| use: { |
| baseURL: externalBaseUrl ?? 'http://127.0.0.1:5173', |
| trace: 'retain-on-failure', |
| }, |
| webServer: externalBaseUrl |
| ? undefined |
| : { |
| command: 'npm run dev -- --host 127.0.0.1', |
| url: 'http://127.0.0.1:5173', |
| reuseExistingServer: false, |
| timeout: 120_000, |
| }, |
| projects: [ |
| { |
| name: 'chromium', |
| use: { ...devices['Desktop Chrome'] }, |
| }, |
| ], |
| }); |