Skip to content

Instantly share code, notes, and snippets.

Todos.tasksController = SC.ArrayController.create({
countSummary: function() {
}
}) ;
Died on test #1: TypeError: Result of expression 'controller.countSummary' [undefined] is not a function.
var controller, stubbedFunction;
module("Todos.tasksController", {
setup: function() {
controller = Todos.tasksController;
},
teardown: function() {
SC.RunLoop.begin();
Todos.store.reset();
SC.RunLoop.end();
Todos.mainPage = SC.Page.design({
mainPane: SC.MainPane.design({
childViews: 'middleView bottomView'.w(),
middleView: SC.ScrollView.design({
hasHorizontalScroller: NO,
layout: { top: 36, bottom: 32, left: 0, right: 0 },
backgroundColor: 'white',
childViews: 'contentView'.w(),
I should see "No Tasks" within the tasks count section of the page, expected: No Tasks result: ""
Todos.mainPage = SC.Page.design({
mainPane: SC.MainPane.design({
childViews: 'middleView bottomView'.w(), //ADDED bottomView
middleView: SC.ScrollView.design({
hasHorizontalScroller: NO,
layout: { top: 36, bottom: 32, left: 0, right: 0 },
backgroundColor: 'white',
childViews: 'contentView'.w(),
Todos.mainPage = SC.Page.design({
mainPane: SC.MainPane.design({
childViews: 'middleView'.w(),
middleView: SC.ScrollView.design({
hasHorizontalScroller: NO, //ADDED THIS
layout: { top: 36, bottom: 32, left: 0, right: 0 }, //ADDED THIS
backgroundColor: 'white', //ADDED THIS
childViews: 'contentView'.w(),
Died on test #1: TypeError: Result of expression 'summaryView' [undefined] is not an object.
var task;
module("Given I am viewing the tasks page", {
setup: function() {
SC.RunLoop.begin();
Todos.main();
SC.RunLoop.end();
},
teardown: function() {
SC.RunLoop.begin();
Todos.main = function main() {
Todos.getPath('mainPage.mainPane').append() ;
var tasks = Todos.store.find(Todos.Task);
Todos.tasksController.set('content', tasks); //ADDED THIS
};
function main() { Todos.main(); }