forked from ost-ptk/layout_html-form
-
Notifications
You must be signed in to change notification settings - Fork 0
/
backstopConfig.js
57 lines (53 loc) · 1.11 KB
/
backstopConfig.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
'use strict';
// https://github.com/garris/BackstopJS#advanced-scenarios
const backstop = require('@mate-academy/backstop-config');
const { basicScenario } = backstop;
const basic = {
...basicScenario,
label: 'Elementary test',
referenceUrl: basicScenario.referenceUrl + '/html-form/',
};
const config = {
...backstop,
fileNameTemplate: '{scenarioLabel}-{selectorIndex}',
viewports: [
{
name: 'tablet_h',
width: 1024,
height: 768,
},
],
scenarios: [
{
...basic,
label: 'Entire document',
selectors: ['document'],
},
{
...basic,
label: 'Form',
selectors: ['form'],
},
{
...basic,
label: 'Fieldset tag', // all fieldsets are different
selectors: ['fieldset'],
},
{
...basic,
label: 'Submit button',
selectors: ['[type="submit"]'],
},
{
...basic,
label: 'Email with placeholder',
selectors: ['[type="email"][placeholder]'],
},
{
...basic,
label: 'Number with value',
selectors: ['[type="number"][value]'],
},
],
};
module.exports = config;