2020-07-24 01:14:36 +03:00
|
|
|
/**
|
|
|
|
* Copyright (c) Microsoft Corporation.
|
|
|
|
*
|
|
|
|
* Licensed 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.
|
|
|
|
*/
|
|
|
|
|
2022-04-25 19:30:14 +03:00
|
|
|
import path from 'path';
|
|
|
|
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
|
|
import { config as loadEnv } from 'dotenv';
|
|
|
|
loadEnv({ path: path.join(__dirname, '..', '..', '.env') });
|
2020-07-24 01:14:36 +03:00
|
|
|
|
2022-05-07 19:17:07 +03:00
|
|
|
const outputDir = path.join(__dirname, '..', '..', 'test-results');
|
2022-04-25 19:30:14 +03:00
|
|
|
const config: PlaywrightTestConfig = {
|
2022-05-03 22:48:35 +03:00
|
|
|
globalSetup: path.join(__dirname, 'globalSetup'),
|
2022-05-07 19:17:07 +03:00
|
|
|
outputDir,
|
2022-04-25 19:30:14 +03:00
|
|
|
testIgnore: '**\/fixture-scripts/**',
|
|
|
|
timeout: 5 * 60 * 1000,
|
|
|
|
retries: 0,
|
2022-05-07 19:17:07 +03:00
|
|
|
reporter: process.env.CI ? [
|
2022-08-22 22:45:59 +03:00
|
|
|
['list'],
|
2022-05-07 19:17:07 +03:00
|
|
|
['json', { outputFile: path.join(outputDir, 'report.json') }],
|
|
|
|
] : [['list'], ['html', { open: 'on-failure' }]],
|
2022-04-25 19:30:14 +03:00
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
workers: 1,
|
2022-05-07 05:04:34 +03:00
|
|
|
projects: [
|
|
|
|
{
|
|
|
|
name: 'installation tests',
|
|
|
|
metadata: {
|
|
|
|
nodejsVersion: process.version,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2022-04-25 19:30:14 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|