You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$this->assertTrue(false, "The deviation of the taken screenshot is too high (".$deviationResult["deviation"]."%).\nSee $compareScreenshotPath for a deviation screenshot.");
69
+
if (! is_null($deviationResult["deviationImage"])) {
70
+
if ($deviationResult["deviation"] > $this->maximumDeviation) {
$this->assertTrue(false, "The deviation of the taken screenshot is too high (" . $deviationResult["deviation"] . "%).\nSee $compareScreenshotPath for a deviation screenshot.");
74
+
}
72
75
}
73
76
}
74
77
@@ -79,18 +82,21 @@ public function dontseeVisualChanges($identifier, $elementID = null)
79
82
* @param string $identifier identifies your test object
80
83
* @param string $elementID DOM ID of the element, which should be screenshotted
$this->assertTrue(false, "The deviation of the taken screenshot is too low (".$deviationResult["deviation"]."%).\nSee $compareScreenshotPath for a deviation screenshot.");
88
+
if (! is_null($deviationResult["deviationImage"])) {
89
+
if ($deviationResult["deviation"] <= $this->maximumDeviation) {
$this->assertTrue(false, "The deviation of the taken screenshot is too low (" . $deviationResult["deviation"] . "%).\nSee $compareScreenshotPath for a deviation screenshot.");
93
+
}
89
94
}
90
95
}
91
96
92
97
/**
93
-
* Initialize the module and read the config. Throws a runtime exception, if the
98
+
* Initialize the module and read the config.
99
+
* Throws a runtime exception, if the
94
100
* reference image dir is not set in the config
95
101
*
96
102
* @throws \RuntimeException
@@ -114,7 +120,8 @@ private function init ()
114
120
}
115
121
116
122
/**
117
-
* Find the position and proportion of a DOM element, specified by it's ID. The method inject the
123
+
* Find the position and proportion of a DOM element, specified by it's ID.
124
+
* The method inject the
118
125
* JQuery Framework and uses the "noConflict"-mode to get the width, height and offset params.
119
126
*
120
127
* @param $elementId DOM ID of the element, which should be screenshotted
@@ -127,7 +134,7 @@ private function getCoordinates ($elementId)
0 commit comments