diff --git a/src/scripts/components/color.js b/src/scripts/components/color.js index fcc1228..fa7e20e 100644 --- a/src/scripts/components/color.js +++ b/src/scripts/components/color.js @@ -116,12 +116,13 @@ module.exports = { function autoLayout() { if (!clay.meta.activeWatchInfo || clay.meta.activeWatchInfo.firmware.major === 2 || - clay.meta.activeWatchInfo.platform === 'aplite' && + ['aplite', 'diorite'].indexOf(clay.meta.activeWatchInfo.platform) > -1 && !self.config.allowGray) { return standardLayouts.BLACK_WHITE; } - if (clay.meta.activeWatchInfo.platform === 'aplite' && self.config.allowGray) { + if (['aplite', 'diorite'].indexOf(clay.meta.activeWatchInfo.platform) > -1 && + self.config.allowGray) { return standardLayouts.GRAY; } diff --git a/test/spec/components/color.js b/test/spec/components/color.js index 21650e5..bc178a1 100644 --- a/test/spec/components/color.js +++ b/test/spec/components/color.js @@ -434,6 +434,28 @@ describe('component - color', function() { suffix: '' } }); + testAutoLayout('diorite', standardLayouts.BLACK_WHITE, false, '', { + platform: 'diorite', + model: 'qemu_platform_diorite', + language: 'en_US', + firmware: { + major: 4, + minor: 0, + patch: 0, + suffix: '' + } + }); + testAutoLayout('diorite', standardLayouts.GRAY, true, '', { + platform: 'diorite', + model: 'qemu_platform_diorite', + language: 'en_US', + firmware: { + major: 4, + minor: 0, + patch: 0, + suffix: '' + } + }); testCustomLayout(); testCustomLayout('COLOR');