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
| var mockedSetFunction, mockedFindFunction, setMockObject, findMockObject; | |
| module("Todos.main", { | |
| setup: function() { | |
| mockedSetFunction = Todos.tasksController.set; //ADDED THIS | |
| setMockObject = CoreTest.stub('Todos.tasksController.set', function() { return YES; }); //ADDED THIS | |
| Todos.tasksController.set = setMockObject; //ADDED THIS | |
| mockedFindFunction = Todos.store.find; | |
| findMockObject = CoreTest.stub('Todos.store.find', function() { return YES; }); | |
| Todos.store.find = findMockObject; |
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
| Todos.main = function main() { | |
| Todos.getPath('mainPage.mainPane').append() ; | |
| var tasks = Todos.store.find(Todos.Task); //ADDED THIS | |
| } ; | |
| function main() { Todos.main(); } |
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
| var mockedFindFunction, findMockObject; | |
| module("Todos.main", { | |
| setup: function() { | |
| mockedFindFunction = Todos.store.find; | |
| findMockObject = CoreTest.stub('Todos.store.find', function() { return YES; }); | |
| Todos.store.find = findMockObject; | |
| }, | |
| teardown: function() { | |
| Todos.store.find = mockedFindFunction; |
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
| Then I should see the task in the list, expected: true result: false |
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
| Todos.tasksController = SC.ArrayController.create({ | |
| }) ; |
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
| Todos.mainPage = SC.Page.design({ | |
| mainPane: SC.MainPane.design({ | |
| childViews: 'middleView'.w(), | |
| middleView: SC.ScrollView.design({ | |
| childViews: 'contentView'.w(), | |
| contentView: SC.ListView.design({ | |
| contentBinding: 'Todos.tasksController.arrangedObjects' //ADDED THIS | |
| }) |
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
| Died on Test #1: TypeError: Result of expression 'todosList'[null] is not an object |
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
| Todos.mainPage = SC.Page.design({ | |
| mainPane: SC.MainPane.design({ | |
| childViews: 'middleView'.w(), | |
| middleView: SC.ScrollView.design({ | |
| childViews: 'contentView'.w(), | |
| contentView: SC.ListView.design({ |
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
| 1. Died on test #2: Result of expression 'Todos.getPath('mainPage.mainPane.middleView.contentView')' [undefined] is not an object |
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
| 1. Setup exception on viewing_task.js Given an existing task module: When looking at the list of tasks: TypeError: Result of expression 'recordType'[undefined] is not an object | |
| 2. Died on test #2: Result of expression 'Todos.getPath('mainPage.mainPane.middleView.contentView')' [undefined] is not an object |