forked from patternfly/patternfly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
patternfly-a11y.config.js
59 lines (56 loc) · 1.56 KB
/
patternfly-a11y.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
55
56
57
58
59
const { fullscreenRoutes } = require('@patternfly/documentation-framework/routes');
async function waitFor(page) {
await page.waitForSelector('#root > *');
}
const urls = Object.keys(fullscreenRoutes)
.map(key => fullscreenRoutes[key].isFullscreenOnly
? key
: fullscreenRoutes[key].path.replace(/\/html$/, ''))
.reduce((result, item) => (result.includes(item) ? result : [...result, item]), []);
module.exports = {
prefix: 'http://localhost:5000',
waitFor,
crawl: false,
urls: [
{
url: '/',
label: 'home fullscreen nav expanded',
viewportDimensions: { width: 1920, height: 1080 },
afterNav: async page => {
await page.click('button#nav-toggle');
}
},
{
url: '/',
label: 'home fullscreen nav collapsed',
viewportDimensions: { width: 1920, height: 1080 }
},
{
url: '/',
label: 'home mobile nav collapsed',
viewportDimensions: { width: 400, height: 900 }
},
{
url: '/',
label: 'home mobile nav expanded',
viewportDimensions: { width: 400, height: 900 },
afterNav: async page => {
await page.click('button#nav-toggle');
}
},
{
url: '/components/table/html',
label: 'html table content on mobile screen',
viewportDimensions: { width: 400, height: 900 }
},
...urls
],
ignoreRules: [
'color-contrast',
'landmark-no-duplicate-main',
'landmark-main-is-top-level',
'scrollable-region-focusable'
].join(','),
ignoreIncomplete: true,
skip: '(mailto)|(/(developer-resources)/.+)'
};