Reposition continue button to always be visible (ShareProgressModal)

This commit is contained in:
phoenixeliot 2016-04-28 11:09:44 -07:00
parent f39cac3abf
commit 08986ffd37
2 changed files with 34 additions and 2 deletions

View file

@ -28,6 +28,7 @@
height: 301px
.blurb-container
height: 290px
position: absolute
right: 50px
top: 70px
@ -59,8 +60,8 @@
border-image: url(/images/level/code_toolbar_submit_button_active.png) 14 20 20 20 fill round
.continue-container
margin-top: 10px
margin-right: -12px
position: absolute
bottom: 0
.continue-link
color: black
font-weight: normal

View file

@ -0,0 +1,31 @@
ShareProgressModal = require 'views/play/modal/ShareProgressModal'
Course = require 'models/Course'
Level = require 'models/Level'
LevelSession = require 'models/LevelSession'
Achievements = require 'collections/Achievements'
fixtures = require './CourseVictoryModal.fixtures'
describe 'ShareProgressModal', ->
beforeEach ->
me.clear()
describe 'continue button in other languages', ->
modal = null
beforeEach (done) ->
# Not sure why this isn't affecting the modal. Do I need to load the locale file?
me.set('preferredLanguage', 'es-ES')
# Can position testing be done? These values are zeros at runtime
modal = new ShareProgressModal()
modal.render()
_.defer done
xit 'should be positioned high enough', ->
jasmine.demoModal(modal)
link = modal.$('.continue-link')
linkBottom = link.offset().top + link.height()
background = modal.$('.background-img')
backgroundBottom = background.offset().top + background.height()
expect(linkBottom).toBeLessThan(backgroundBottom - 30)
it '(demo)', -> jasmine.demoModal(modal)