This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Things that look like this: | |
initialLength = tasks.length(); | |
//Should be changed to look like this: | |
initialLength = tasks.get('length'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render: function(context, firstTime){ | |
context.push( | |
'<div id="something" class="some-class">', | |
'<div id="some-other-div" class="some-other-class">', | |
someVariable, | |
'</div>', | |
'</div>'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyApp.roomsController = SC.ArrayController.create({ | |
contentBinding: 'ClientWasp.userController.rooms', | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Chatter.userController = SC.ObjectController.create( | |
/** @scope Chatter.userController.prototype */ { | |
loggedInAs: function(){ | |
var user = this.get('content'); | |
return "Logged in as " + user.get('name'); | |
}.property('name').cacheable() | |
}) ; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
layout: function() { | |
var something = this.get('content'); | |
return {top: something.get('row') * 100, left: something.get('column') * 100, height: 100, width: 100}; | |
}.property('content').cacheable() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('----------------- SANDBOX START -----------------') | |
var contentObjectController = SC.ObjectController.create() | |
var ContentView = SC.View.extend(SC.ContentDisplay, { | |
layout: function() { | |
var something = this.get('content') ? this.get('content') : {get: function(attribute) { return 0;} }; | |
return {top: something.get('row') * 100, left: something.get('column') * 100, height: 100, width: 100}; | |
}.property('content').cacheable() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Page.within('.search-results', function() { | |
expect(Page.html()).toContain(itemTitle); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Scenario('Searching For An Item', function() { | |
Given('an item that is available', function() { | |
var itemTitle = 'item'; | |
beforeEach(function() { | |
Application.server.addResource('Item', {title: itemTitle}); | |
}); | |
When('I am on the homepage of the application', function() { | |
beforeEach(function() { | |
Application.statechart.gotoState('started'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FakeServer.addResourceType('Item', { type: 'Boat' }); | |
FakeServer.addResource('Item', {title: 'Super Boat' }); | |
FakeServer.registerUrl('/something', function(resourceStore){ | |
var items = resourceStore.allOfType('Item'); | |
var response = { | |
items: items | |
} | |
return response; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FakeServer.addResourceType('Item', { type: 'Boat' }); | |
FakeServer.addResource('Item', {title: 'Super Boat' }); | |
FakeServer.registerUrl('/search_for_item', function(resourceStore){ | |
var items = resourceStore.allOfType('Item'); | |
var response = { | |
items: items | |
} | |
return response; | |
}); |