Permalink
Browse files

Fixed device platform tests

  • Loading branch information...
nvh committed Nov 7, 2017
1 parent a03d1f7 commit 7252e66da1d3f69e1c26c314a43b885ed23e4e8f
Showing with 3 additions and 3 deletions.
  1. +1 −1 framer/Components/DeviceComponent.coffee
  2. +2 −2 test/tests/DeviceComponentTest.coffee
@@ -237,7 +237,7 @@ class exports.DeviceComponent extends BaseClass
Framer.CurrentContext = @_context
platform: ->
if /google|nexus|htc|samsung/.test(@deviceType)
if /google|nexus|htc|samsung|sony-smartwatch/.test(@deviceType)
return "Android"
if /iphone|ipad/.test(@deviceType)
return "iOS"
@@ -167,9 +167,9 @@ describe "DeviceComponent", ->
when "Windows"
assert(_.startsWith(key, "dell") or _.startsWith(key, "microsoft"), "#{key} should not have platform Windows")
when "Android"
assert(_.startsWith(key, "google") or _.startsWith(key, "nexus") or _.startsWith(key, "htc") or _.startsWith(key, "samsung"), "#{key} should not have platform Android")
assert(_.startsWith(key, "google") or _.startsWith(key, "nexus") or _.startsWith(key, "htc") or _.startsWith(key, "samsung") or _.startsWith(key, "sony-smartwatch"), "#{key} should not have platform Android")
when "macOS"
assert(_.startsWith(key, "apple-macbook") or _.startsWith(key, "apple-imac") or _.startsWith(key, "desktop-safari"), "#{key} should not have platform macOS")
assert(_.startsWith(key, "apple-macbook") or _.startsWith(key, "apple-imac") or _.startsWith(key, "apple-thunderbolt") or _.startsWith(key, "desktop-safari"), "#{key} should not have platform macOS")
else
# Exceptions
assert(key in ["fullscreen", "custom", "sony-w85Oc", "test"], "#{key} should have a platform specified")

0 comments on commit 7252e66

Please sign in to comment.