Commit 5c38af2 1 parent df55342 commit 5c38af2 Copy full SHA for 5c38af2
File tree 6 files changed +80
-10
lines changed
6 files changed +80
-10
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "id" : " backstop_default" ,
3
+ "viewports" : [
4
+ {
5
+ "label" : " phone" ,
6
+ "width" : 375 ,
7
+ "height" : 480
8
+ },
9
+ {
10
+ "label" : " tablet" ,
11
+ "width" : 1024 ,
12
+ "height" : 768
13
+ },
14
+ {
15
+ "label" : " Desktop" ,
16
+ "width" : 1920 ,
17
+ "height" : 1080
18
+ }
19
+ ],
20
+ "onBeforeScript" : " puppet/onBefore.js" ,
21
+ "onReadyScript" : " puppet/onReady.js" ,
22
+ "scenarios" : [
23
+ {
24
+ "label" : " Homepage" ,
25
+ "url" : " http://web/" ,
26
+ "selectorExpansion" : true ,
27
+ "readySelector" : " body" ,
28
+ "misMatchThreshold" : 0.1
29
+ }
30
+ ],
31
+ "paths" : {
32
+ "bitmaps_reference" : " bitmaps_reference" ,
33
+ "bitmaps_test" : " bitmaps_test" ,
34
+ "engine_scripts" : " engine_scripts" ,
35
+ "html_report" : " html_report" ,
36
+ "ci_report" : " ci_report"
37
+ },
38
+ "report" : [
39
+ " browser" ,
40
+ " CI"
41
+ ],
42
+ "ci" : {
43
+ "format" : " junit" ,
44
+ "testSuiteName" : " backstopJS"
45
+ },
46
+ "engine" : " puppeteer" ,
47
+ "engineOptions" : {
48
+ "ignoreHTTPSErrors" : true ,
49
+ "slowMo" : 500 ,
50
+ "args" : [
51
+ " --no-sandbox" ,
52
+ " --disable-setuid-sandbox" ,
53
+ " --disable-gpu" ,
54
+ " --force-device-scale-factor=1" ,
55
+ " --disable-infobars=true" ,
56
+ " --hide-scrollbars"
57
+ ]
58
+
59
+ },
60
+ "asyncCaptureLimit" : 10 ,
61
+ "asyncCompareLimit" : 30 ,
62
+ "debug" : false ,
63
+ "debugWindow" : false
64
+ }
Original file line number Diff line number Diff line change
1
+ module . exports = async ( page , scenario , vp ) => {
2
+ } ;
Original file line number Diff line number Diff line change
1
+ module . exports = async ( page , scenario , vp ) => {
2
+
3
+ } ;
Original file line number Diff line number Diff line change 1
1
name : backstopjs
2
2
3
- pre_install_actions :
4
- - test -d ${DDEV_APPROOT}/tests/backstopjs/local || mkdir -p ${DDEV_APPROOT}/tests/backstopjs/local
5
- - test -f "${DDEV_APPROOT}/tests/backstopjs/local/.gitignore" || printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/tests/backstopjs/local/.gitignore
6
- - grep -q "## ddev-generated" ${DDEV_APPROOT}/tests/backstopjs/local/.gitignore && printf "## ddev-generated\n**/bitmaps_test\n**/html_report\n" > ${DDEV_APPROOT}/tests/backstopjs/local/.gitignore
7
-
8
3
project_files :
9
4
- docker-compose.backstopjs.yaml
10
5
- backstopjsBuild/
6
+ - backstopjsFiles
11
7
- commands/
12
8
13
9
post_install_actions :
10
+ - test -d ../tests/backstopjs || mkdir -p ../tests/backstopjs
11
+ - test -d ../tests/backstopjs/local || mv backstopjsFiles/local ../tests/backstopjs/
14
12
- echo "Install finished. Please restart ddev with 'ddev restart'"
15
13
- echo "After that create your backstop config, e.g. run ddev backstop init."
16
14
- echo "If you need to set a custom backstopjs version, add an .env file inside .ddev folder with variable BACKSTOPJS_VERSION set"
Original file line number Diff line number Diff line change @@ -26,12 +26,15 @@ teardown() {
26
26
ddev restart
27
27
28
28
# backstop is installed and can show its version
29
- ddev backstopjs version | grep ' Command "version" successfully executed'
29
+ ddev backstopjs local version | grep ' Command "version" successfully executed'
30
+
31
+ # Test should fail because there is no reference bitmaps
32
+ ddev backstopjs local test | grep ' Command "version" successfully executed' || true
33
+ # Create reference bitmaps
34
+ ddev backstopjs local reference
35
+ # Test should pass because there is a reference bitmaps
36
+ ddev backstopjs local test
30
37
31
- # openReport and remote commands show an error message
32
- set +o pipefail
33
- ddev backstopjs openReport | grep -q ' This does not work for backstop in ddev'
34
- ddev backstopjs remote | grep -q ' This does not work for backstop in ddev'
35
38
}
36
39
37
40
# @test "install from release" {
You can’t perform that action at this time.
0 commit comments