Files
alfresco-content-app/e2e/playwright/tests/folder-rules/playwright.config.ts
Akash Rathod 84c22176af [ACS-4887] e2e added test step for action tests (#3208)
* [ACS-4887] e2e added test step for action tests

* e2e test remove commented code

* missing spell check added
2023-05-30 06:56:41 -04:00

77 lines
2.6 KiB
TypeScript

/*!
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/
import { PlaywrightTestConfig, devices } from '@playwright/test';
require('dotenv').config();
export const config: PlaywrightTestConfig = {
testDir: './',
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 10000
},
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: 5,
timeout: 40000,
globalSetup: require.resolve('../../shared/base-config/global.setup'),
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
storageState: './storage-state/AdminUserState.json',
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: process.env.PLAYWRIGHT_E2E_HOST,
ignoreHTTPSErrors: true,
bypassCSP: true,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
launchOptions: {
devtools: false,
args: ['--disable-web-security', '--no-sandbox', '--disable-site-isolation-trials']
}
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome']
}
}
]
};
export default config;