Skip to content

Commit

Permalink
Acceptance test for the 'adapt font-size on large messages' feature
Browse files Browse the repository at this point in the history
  • Loading branch information
laurilehmijoki committed Apr 20, 2012
1 parent a49bb27 commit e69b8f5
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions static/spec/team-radar-spec.js
Expand Up @@ -138,6 +138,22 @@ describe('team radar', function() {
expect($('#bob .moodMessage')).toHaveText('the same')
})
})

it('shrinks the font-size of the mood message if the message is lengthy', function() {
var longMoodMessage = ""
while (longMoodMessage.length < 150) {
longMoodMessage += "wuf! "
}
specHelper.async(function() {
specHelper.updateMood('bob', '3', longMoodMessage)
specHelper.updateMood('jill', '3', 'This is a short bark. Wuf!')
})
specHelper.async(function() {
var bobFontSize = $('#bob .moodMessage').css('font-size').match(/\d+/)
var jillFontSize = $('#jill .moodMessage').css('font-size').match(/\d+/)
expect(bobFontSize).toBeLessThan(jillFontSize)
})
})
})

describe('domain', function() {
Expand Down

0 comments on commit e69b8f5

Please sign in to comment.