2021-04-02 01:35:26 +02: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.
|
|
|
|
|
*/
|
|
|
|
|
|
2021-04-07 01:09:54 +02:00
|
|
|
import * as folio from 'folio';
|
2021-04-02 01:35:26 +02:00
|
|
|
import * as path from 'path';
|
2021-05-06 16:08:22 +02:00
|
|
|
import { test as pageTest } from '../page/pageTest';
|
2021-05-17 04:58:26 +02:00
|
|
|
import { androidFixtures } from '../android/androidTest';
|
|
|
|
|
import { PlaywrightOptions } from './browserTest';
|
2021-05-08 00:25:55 +02:00
|
|
|
import { CommonOptions } from './baseTest';
|
2021-04-02 01:35:26 +02:00
|
|
|
|
2021-05-08 00:25:55 +02:00
|
|
|
const outputDir = path.join(__dirname, '..', '..', 'test-results');
|
|
|
|
|
const testDir = path.join(__dirname, '..');
|
2021-05-17 04:58:26 +02:00
|
|
|
const config: folio.Config<CommonOptions & PlaywrightOptions> = {
|
2021-05-08 00:25:55 +02:00
|
|
|
testDir,
|
2021-05-11 15:40:06 +02:00
|
|
|
snapshotDir: '__snapshots__',
|
2021-05-08 00:25:55 +02:00
|
|
|
outputDir,
|
|
|
|
|
timeout: 120000,
|
|
|
|
|
globalTimeout: 7200000,
|
|
|
|
|
workers: 1,
|
|
|
|
|
forbidOnly: !!process.env.CI,
|
|
|
|
|
retries: process.env.CI ? 1 : 0,
|
|
|
|
|
reporter: process.env.CI ? [
|
|
|
|
|
'dot',
|
|
|
|
|
{ name: 'json', outputFile: path.join(outputDir, 'report.json') },
|
|
|
|
|
] : 'line',
|
|
|
|
|
projects: [],
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-20 18:51:09 +02:00
|
|
|
const metadata = {
|
|
|
|
|
platform: 'Android',
|
|
|
|
|
headful: false,
|
|
|
|
|
browserName: 'chromium',
|
|
|
|
|
channel: undefined,
|
|
|
|
|
mode: 'default',
|
|
|
|
|
video: false,
|
|
|
|
|
};
|
|
|
|
|
|
2021-05-08 00:25:55 +02:00
|
|
|
config.projects.push({
|
|
|
|
|
name: 'android',
|
2021-05-17 04:58:26 +02:00
|
|
|
use: {
|
2021-04-29 20:11:32 +02:00
|
|
|
loopback: '10.0.2.2',
|
2021-05-15 16:42:35 +02:00
|
|
|
mode: 'default',
|
2021-05-13 19:22:23 +02:00
|
|
|
browserName: 'chromium',
|
2021-05-08 00:25:55 +02:00
|
|
|
},
|
|
|
|
|
testDir: path.join(testDir, 'android'),
|
2021-05-20 18:51:09 +02:00
|
|
|
metadata,
|
2021-05-08 00:25:55 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
config.projects.push({
|
|
|
|
|
name: 'android',
|
2021-05-17 04:58:26 +02:00
|
|
|
use: {
|
2021-05-08 00:25:55 +02:00
|
|
|
loopback: '10.0.2.2',
|
2021-05-15 16:42:35 +02:00
|
|
|
mode: 'default',
|
2021-05-13 19:22:23 +02:00
|
|
|
browserName: 'chromium',
|
2021-05-08 00:25:55 +02:00
|
|
|
},
|
|
|
|
|
testDir: path.join(testDir, 'page'),
|
2021-05-17 04:58:26 +02:00
|
|
|
define: { test: pageTest, fixtures: androidFixtures },
|
2021-05-20 18:51:09 +02:00
|
|
|
metadata,
|
2021-05-08 00:25:55 +02:00
|
|
|
});
|
2021-04-29 20:11:32 +02:00
|
|
|
|
2021-05-08 00:25:55 +02:00
|
|
|
export default config;
|