doc-detective-common 1.8.0 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "doc-detective-common",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "description": "Shared components for Doc Detective projects. ",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -24,6 +24,22 @@
24
24
  "directory": {
25
25
  "type": "string",
26
26
  "description": "Directory of the PNG file. Attempts to creatr the directory if it doesn't exist. If not specified, the directory is your media directory."
27
+ },
28
+ "maxVariation": {
29
+ "type": "number",
30
+ "description": "Allowed variation in percentage of pixels between the new screenshot and the exisitng screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
31
+ "minimum": 0,
32
+ "maximum": 100
33
+ },
34
+ "overwrite": {
35
+ "type": "string",
36
+ "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
37
+ "enum": [
38
+ "true",
39
+ "false",
40
+ "byVariation"
41
+ ],
42
+ "default": false
27
43
  }
28
44
  },
29
45
  "dynamicDefaults": {
@@ -45,6 +61,13 @@
45
61
  "action": "saveScreenshot",
46
62
  "path": "results.png",
47
63
  "directory": "static/images"
64
+ },
65
+ {
66
+ "action": "saveScreenshot",
67
+ "path": "results.png",
68
+ "directory": "static/images",
69
+ "maxVariation": 10,
70
+ "overwrite": "byVariation"
48
71
  }
49
72
  ]
50
73
  }
@@ -709,6 +709,22 @@
709
709
  "directory": {
710
710
  "type": "string",
711
711
  "description": "Directory of the PNG file. Attempts to creatr the directory if it doesn't exist. If not specified, the directory is your media directory."
712
+ },
713
+ "maxVariation": {
714
+ "type": "number",
715
+ "description": "Allowed variation in percentage of pixels between the new screenshot and the exisitng screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
716
+ "minimum": 0,
717
+ "maximum": 100
718
+ },
719
+ "overwrite": {
720
+ "type": "string",
721
+ "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
722
+ "enum": [
723
+ "true",
724
+ "false",
725
+ "byVariation"
726
+ ],
727
+ "default": false
712
728
  }
713
729
  },
714
730
  "dynamicDefaults": {
@@ -730,6 +746,13 @@
730
746
  "action": "saveScreenshot",
731
747
  "path": "results.png",
732
748
  "directory": "static/images"
749
+ },
750
+ {
751
+ "action": "saveScreenshot",
752
+ "path": "results.png",
753
+ "directory": "static/images",
754
+ "maxVariation": 10,
755
+ "overwrite": "byVariation"
733
756
  }
734
757
  ]
735
758
  },
@@ -570,6 +570,22 @@
570
570
  "directory": {
571
571
  "type": "string",
572
572
  "description": "Directory of the PNG file. Attempts to creatr the directory if it doesn't exist. If not specified, the directory is your media directory."
573
+ },
574
+ "maxVariation": {
575
+ "type": "number",
576
+ "description": "Allowed variation in percentage of pixels between the new screenshot and the exisitng screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
577
+ "minimum": 0,
578
+ "maximum": 100
579
+ },
580
+ "overwrite": {
581
+ "type": "string",
582
+ "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
583
+ "enum": [
584
+ "true",
585
+ "false",
586
+ "byVariation"
587
+ ],
588
+ "default": false
573
589
  }
574
590
  },
575
591
  "dynamicDefaults": {
@@ -591,6 +607,13 @@
591
607
  "action": "saveScreenshot",
592
608
  "path": "results.png",
593
609
  "directory": "static/images"
610
+ },
611
+ {
612
+ "action": "saveScreenshot",
613
+ "path": "results.png",
614
+ "directory": "static/images",
615
+ "maxVariation": 10,
616
+ "overwrite": "byVariation"
594
617
  }
595
618
  ]
596
619
  },
@@ -24,6 +24,22 @@
24
24
  "directory": {
25
25
  "type": "string",
26
26
  "description": "Directory of the PNG file. Attempts to creatr the directory if it doesn't exist. If not specified, the directory is your media directory."
27
+ },
28
+ "maxVariation": {
29
+ "type": "number",
30
+ "description": "Allowed variation in percentage of pixels between the new screenshot and the exisitng screenshot at `path`. If the difference between the new screenshot and the existing screenshot is greater than `maxVariation`, the step fails. If a screenshot doesn't exist at `path`, this value is ignored.",
31
+ "minimum": 0,
32
+ "maximum": 100
33
+ },
34
+ "overwrite": {
35
+ "type": "string",
36
+ "description": "If `true`, overwrites the existing screenshot at `path` if it exists.\nIf `byVariation`, overwrites the existing screenshot at `path` if the difference between the new screenshot and the existing screenshot is greater than `maxVariation`.",
37
+ "enum": [
38
+ "true",
39
+ "false",
40
+ "byVariation"
41
+ ],
42
+ "default": false
27
43
  }
28
44
  },
29
45
  "dynamicDefaults": {
@@ -45,6 +61,13 @@
45
61
  "action": "saveScreenshot",
46
62
  "path": "results.png",
47
63
  "directory": "static/images"
64
+ },
65
+ {
66
+ "action": "saveScreenshot",
67
+ "path": "results.png",
68
+ "directory": "static/images",
69
+ "maxVariation": 10,
70
+ "overwrite": "byVariation"
48
71
  }
49
72
  ]
50
73
  }