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
| Handlebars.registerHelper('unbound', function(property, fn) { | |
| return this.get(property); | |
| }); |
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
| Onetoone.Model1 = SC.Record.extend( | |
| model1Value: SC.Record.attr(String, {}), | |
| model2: SC.Record.toOne('Onetoone.Model2', {inverse:'model1', isMaster: NO}) | |
| }) ; |
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
| App.NoticeCollectionView = SC.TemplateCollectionView.extend({ | |
| contentBinding: 'App.noticesListController', | |
| tagName: 'div', | |
| classNames: ['message', 'notices'], | |
| itemView: SC.TemplateView.extend({ | |
| tagName: 'p', | |
| classNames: ['notice'] | |
| }) | |
| }) |
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
| // This file is the setup for integration testing file | |
| // This ultimetly should be moved somewhere else, but not sure yet where | |
| setupApplication = function () { | |
| beforeEach(function() { | |
| TW.statechart.initStatechart(); | |
| Fictum.setup(); | |
| Fictum.addResourceType('Item', { | |
| ... | |
| }); |
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
| MT.ReportTemplateContainerView = SC.ContainerView.extend({ | |
| contentView: SC.TemplateView.extend({ | |
| itemBinding: 'MT.reportTemplates.selectedItem', | |
| templateName: 'report_template_show' | |
| }), | |
| editView: SC.TemplateView.extend({ | |
| itemBinding: 'MT.reportTemplates.selectedItem', | |
| templateName: 'report_template_edit' | |
| }) | |
| }); |
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; | |
| }); |
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
| 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
| Page.within('.search-results', function() { | |
| expect(Page.html()).toContain(itemTitle); | |
| }); |