2023-03-01 09:39:41 -06:00
|
|
|
/**
|
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2024-05-31 11:29:24 -07:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-01 09:39:41 -06:00
|
|
|
*/
|
|
|
|
|
|
2024-12-03 18:51:22 -05:00
|
|
|
import { defineConfig, devices } from '@playwright/test';
|
2025-01-06 11:40:32 -05:00
|
|
|
import { authenticatedState } from '../global-setup';
|
2023-02-23 18:30:51 -05:00
|
|
|
|
|
|
|
|
/** @type {import('@playwright/test').PlaywrightTestConfig} */
|
2024-08-19 16:00:16 -04:00
|
|
|
export default defineConfig({
|
2024-12-03 18:51:22 -05:00
|
|
|
globalSetup: '../global-setup',
|
2023-02-23 18:30:51 -05:00
|
|
|
outputDir: './artifacts/test-failures',
|
2024-03-14 14:17:54 -04:00
|
|
|
timeout: 90000, // Each test is given 90s to complete
|
2023-02-23 18:30:51 -05:00
|
|
|
workers: 1, // Tests need to be run in serial, otherwise there may be conflicts when using the CLI
|
|
|
|
|
use: {
|
|
|
|
|
baseURL: process.env.BOUNDARY_ADDR,
|
2024-06-28 15:04:11 -04:00
|
|
|
extraHTTPHeaders: {
|
|
|
|
|
// This token is set in global-setup.js
|
|
|
|
|
Authorization: `Bearer ${process.env.E2E_TOKEN}`,
|
|
|
|
|
},
|
2025-01-06 11:40:32 -05:00
|
|
|
screenshot: 'only-on-failure',
|
|
|
|
|
storageState: authenticatedState,
|
|
|
|
|
trace: 'retain-on-failure',
|
2023-02-23 18:30:51 -05:00
|
|
|
},
|
|
|
|
|
projects: [
|
|
|
|
|
{
|
|
|
|
|
name: 'chromium',
|
|
|
|
|
use: { ...devices['Desktop Chrome'] },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'firefox',
|
|
|
|
|
use: { ...devices['Desktop Firefox'] },
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: 'webkit',
|
|
|
|
|
use: { ...devices['Desktop Safari'] },
|
|
|
|
|
},
|
|
|
|
|
],
|
2024-08-19 16:00:16 -04:00
|
|
|
});
|