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
###* | |
* Filter the Companies using the specified industry value. | |
* @param value The industry to filter on. | |
### | |
filterIndustry: ( value ) -> | |
@filter( "industry", value ) |
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
###* | |
* Update the title for one of the tab panels | |
* @param title The new title for the panel. | |
### | |
updatePanelTitle: ( title ) -> | |
@getPanel2().title = title |
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
Ext.Loader.setConfig( enabled: true ) | |
Ext.application | |
autoCreateViewport: false | |
name: "JasmineExample" | |
launch: -> | |
# Create a reference to the ExtJS Application object so we can perform tests against it. | |
window.Application = @ |
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
it "allows store to be filtered", -> | |
# We can test methods on a non-view object, including tests that involve asynchronous activities. | |
# This really doesn't belong in the MainTabPanelTest, but for simplicty I'm including it here. | |
store = Deft.ioc.Injector.resolve( "companyStore" ) | |
waitsFor( ( -> store.getCount() > 0 ), "Store data never loaded.", 2000 ) | |
runs( -> | |
expect( store.filters.length ).toBe( 0 ) | |
store.filterIndustry( "Manufacturing" ) |
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
it "allows panel title to be changed", -> | |
# We can test a ViewController method after the view is rendered and associated view controller configured. | |
expect( viewController.getPanel2().title ).toEqual( "Panel 2" ) | |
viewController.updatePanelTitle( "My New Title" ) | |
expect( viewController.getPanel2().title ).toEqual( "My New Title" ) |
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
describe "During a successful startup...", -> | |
it "has created the main tab panel view and view controller", -> | |
expect( view ).toBeDefined() | |
expect( view.rendered ).toBeTruthy() | |
expect( view instanceof JasmineExample.view.MainTabPanel ).toBeTruthy() | |
expect( viewController ).toBeDefined() | |
expect( viewController instanceof JasmineExample.controller.MainController ).toBeTruthy() | |
expect( viewController.getView() is view ).toBeTruthy() |
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
describe "The Main Tab Panel...", -> | |
view = null | |
viewController = null | |
# A hidden div where we can add UI components to test them and their dependencies. | |
createComponentTestArea = -> | |
if Ext.get( "componentTestArea" )? then Ext.removeNode( Ext.get( "componentTestArea" ).dom ) | |
Ext.DomHelper.append( Ext.getBody(), "<div id='componentTestArea' style='visibility: hidden'></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
describe "During initialization and setup, the application...", -> | |
it "has loaded ExtJS 4", -> | |
expect( Ext ).toBeDefined() | |
expect( Ext.getVersion() ).toBeTruthy() | |
expect( Ext.getVersion().major ).toEqual( 4 ) | |
it "has loaded Application with expected Application name", -> |
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
"C:\Developer\Tools\javascript\common\build\coffee\coffeescript parameterized watcher.bat" ^ | |
C:\Developer\Tools\Tomcat\7.0.12\tests\webapps\tests\extexamples/coffee ^ | |
C:\Developer\Tools\Tomcat\7.0.12\tests\webapps\tests\extexamples/app |
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
cake ^ | |
-s C:\Developer\Tools\Tomcat\7.0.12\tests\webapps\tests\extexamples/coffee ^ | |
-o C:\Developer\Tools\Tomcat\7.0.12\tests\webapps\tests\extexamples/app ^ | |
watchany |