codecombat/test/demo/views/achievement/AchievementGet.demo.coffee

34 lines
925 B
CoffeeScript
Raw Normal View History

CocoModel = require 'models/CocoModel'
RootView = require 'views/kinds/RootView'
2014-06-17 15:42:27 -04:00
utils = require 'lib/utils'
Achievement = require 'models/Achievement'
EarnedAchievement = require 'models/EarnedAchievement'
2014-07-06 17:38:57 -04:00
fixtures = require '../../fixtures/achievements'
module.exports = ->
me.set 'points', 48
2014-08-12 11:59:33 -04:00
me.set 'preferredLanguage', 'es'
2014-07-06 17:16:00 -04:00
unlockableObj = fixtures.DungeonArenaStarted
2014-06-17 15:42:27 -04:00
earnedUnlockableObj =
earnedPoints: 3
notified: false
simulated = fixtures.Simulated
earnedSimulated =
achievedAmount: 1
earnedPoints: 1
notified: false
2014-06-17 15:42:27 -04:00
unlockable = new Achievement unlockableObj
earnedUnlockable = new EarnedAchievement earnedUnlockableObj
simulated = new Achievement simulated
earnedSimulated = new EarnedAchievement earnedSimulated
2014-06-17 15:42:27 -04:00
view = new RootView
view.render()
view.showNewAchievement unlockable, earnedUnlockable
#view.showNewAchievement simulated, earnedSimulated
view