Permalink
Browse files

Fixed tests for CI environment that doesn’t have SF fonts

  • Loading branch information...
nvh committed Oct 19, 2017
1 parent 91579c4 commit 4af09bcfb1140ce039c856e0d25299716abbc3b0
Showing with 8 additions and 26 deletions.
  1. +8 −26 test/tests/TextLayerTest.coffee
@@ -400,67 +400,49 @@ describe "TextLayer", ->
it "should set clipping to true if the text is bigger than the size", ->
textLayer = new TextLayer
width: 283
width: 356
styledText:
blocks: [ {
inlineStyles: [
{
'startIndex': 0
'endIndex': 19
'endIndex': 120
'css':
'fontSize': '16px'
'letterSpacing': '0px'
'lineHeight': '1.2'
'tabSize': 4
'fontFamily': '".SFNSText", "SFProText-Regular", "SFUIText-Regular", ".SFUIText", sans-serif'
'WebkitTextFillColor': 'rgb(0, 0, 0)'
}
{
'startIndex': 19
'endIndex': 120
'css':
'fontSize': '16px'
'tabSize': 4
'fontFamily': '".SFNSText", "SFProText-Regular", "SFUIText-Regular", ".SFUIText", sans-serif'
'fontFamily': 'Courier, Liberation Mono'
'WebkitTextFillColor': 'rgb(0, 0, 0)'
}
]
text: 'this is dummy text this is dummy text this is dummy text this is dummy text this is dummy text this is dummy text this i'
} ]
height: 55
height: 58
autoSize: false
textLayer.clip.should.equal true
it "should set clipping to false if the text is bigger than the size", ->
textLayer = new TextLayer
width: 283
width: 356
styledText:
blocks: [ {
inlineStyles: [
{
'startIndex': 0
'endIndex': 19
'endIndex': 120
'css':
'fontSize': '16px'
'letterSpacing': '0px'
'lineHeight': '1.2'
'tabSize': 4
'fontFamily': '".SFNSText", "SFProText-Regular", "SFUIText-Regular", ".SFUIText", sans-serif'
'WebkitTextFillColor': 'rgb(0, 0, 0)'
}
{
'startIndex': 19
'endIndex': 120
'css':
'fontSize': '16px'
'tabSize': 4
'fontFamily': '".SFNSText", "SFProText-Regular", "SFUIText-Regular", ".SFUIText", sans-serif'
'fontFamily': 'Courier, Liberation Mono'
'WebkitTextFillColor': 'rgb(0, 0, 0)'
}
]
text: 'this is dummy text this is dummy text this is dummy text this is dummy text this is dummy text this is dummy text this i'
} ]
height: 77
height: 76
autoSize: false
textLayer.clip.should.equal false

0 comments on commit 4af09bc

Please sign in to comment.