forked from cloudscape-design/components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backstop.config.js
54 lines (50 loc) · 1.44 KB
/
backstop.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
const glob = require('glob');
function findAllPages() {
return glob.sync('**/*.page.tsx', { cwd: 'pages' }).map(file => file.replace(/\.page\.tsx$/, ''));
}
const skippedTests = [
'tabs/responsive-permutations', // Currently has flaky behavior (AWSUI-17810)
'pie-chart/permutations', // Currently has flaky behavior (AWSUI-29588)
];
const scenarios = findAllPages()
.filter(pageName => pageName.indexOf('permutations') !== -1 && skippedTests.indexOf(pageName) === -1)
.map(pageName => ({
label: pageName,
url: `http://localhost:8080/#/light/${pageName}`,
delay: 1000,
}));
module.exports = {
id: 'permutations',
viewports: [
{
label: 'phone',
width: 465,
height: 480,
},
{
label: 'desktop',
width: 1320,
height: 768,
},
],
scenarios,
paths: {
bitmaps_reference: 'backstop/report/bitmaps_reference',
bitmaps_test: 'backstop/report/bitmaps_test',
engine_scripts: 'backstop/engine_scripts',
html_report: 'backstop/report/html_report',
ci_report: 'backstop/report/ci_report',
},
report: ['browser'],
engine: 'puppeteer',
engineOptions: {
args: ['--no-sandbox', '--disable-gpu', '--headless', '--force-prefers-reduced-motion'],
},
asyncCaptureLimit: 5,
asyncCompareLimit: 5,
resembleOutputOptions: {
ignoreAntialiasing: true,
},
};