diff --git a/example/screenshots.yaml b/example/screenshots.yaml index fa54a0bb..46e6aca3 100644 --- a/example/screenshots.yaml +++ b/example/screenshots.yaml @@ -8,22 +8,21 @@ staging: /tmp/screenshots # A list of locales supported in app locales: - - fr-CA - en-US + - fr-CA # A list of devices to run tests on devices: ios: - iPhone XS Max: - frame: false - orientation: LandscapeRight +# iPhone XS Max: +# frame: false +# orientation: LandscapeRight iPad Pro (12.9-inch) (2nd generation): - frame: false - orientation: LandscapeRight - android: - Nexus 6P: - frame: false orientation: LandscapeRight +# android: +# Nexus 6P: +# frame: false +# orientation: LandscapeRight # Frame screenshots frame: true diff --git a/example/screenshots_CI.yaml b/example/screenshots_CI.yaml index 8345aa4e..502f5189 100644 --- a/example/screenshots_CI.yaml +++ b/example/screenshots_CI.yaml @@ -14,7 +14,7 @@ locales: # A list of devices to run tests on devices: ios: - iPhone XS Max: +# iPhone XS Max: iPad Pro (12.9-inch) (2nd generation): frame: false android: diff --git a/lib/src/image_processor.dart b/lib/src/image_processor.dart index c5a5cf7f..e84854f7 100644 --- a/lib/src/image_processor.dart +++ b/lib/src/image_processor.dart @@ -194,9 +194,12 @@ class ImageProcessor { bool isFrameRequired = config['frame']; if (device != null) { final isDeviceFrameRequired = device['frame']; - if (isDeviceFrameRequired != null) { - isFrameRequired = isDeviceFrameRequired; - } + // device frame over-rides global frame + isDeviceFrameRequired != null + ? isFrameRequired = isDeviceFrameRequired + : null; + // orientation over-rides global and device frame setting + device['orientation'] != null ? isFrameRequired = false : null; } return isFrameRequired; }