@applitools/screenshoter 3.6.1 → 3.6.2
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
|
@@ -99,7 +99,7 @@ function makeTakeMarkedScreenshot({driver, stabilization = {}, debug, logger}) {
|
|
|
99
99
|
else image.scale(1 / driver.pixelRatio / driver.viewportScale)
|
|
100
100
|
|
|
101
101
|
if (stabilization.rotate) image.rotate(stabilization.rotate)
|
|
102
|
-
else if (driver.orientation
|
|
102
|
+
else if (driver.orientation.startsWith('landscape') && image.width < image.height) image.rotate(-90)
|
|
103
103
|
|
|
104
104
|
if (stabilization.crop) image.crop(stabilization.crop)
|
|
105
105
|
else {
|
|
@@ -126,7 +126,7 @@ function makeTakeMarkedScreenshot({driver, stabilization = {}, debug, logger}) {
|
|
|
126
126
|
const image = makeImage(await driver.takeScreenshot())
|
|
127
127
|
|
|
128
128
|
if (stabilization.rotate) image.rotate(stabilization.rotate)
|
|
129
|
-
else if (driver.orientation
|
|
129
|
+
else if (driver.orientation.startsWith('landscape') && image.width < image.height) image.rotate(-90)
|
|
130
130
|
|
|
131
131
|
await image.debug({...debug, name: 'marker'})
|
|
132
132
|
|