Added more tests.
This commit is contained in:
parent
4a70ba3e3b
commit
3a82045f96
1 changed files with 18 additions and 0 deletions
|
@ -22,6 +22,24 @@ test( "taskbar basic tests", function() {
|
||||||
equal( $('#taskbars .content.active').length, 1, "check available active contents" );
|
equal( $('#taskbars .content.active').length, 1, "check available active contents" );
|
||||||
equal( $('#taskbars .content.active').text(), "some test controller message:'#1',show:'true',hide:'false',active:'true'", "check active content!" );
|
equal( $('#taskbars .content.active').text(), "some test controller message:'#1',show:'true',hide:'false',active:'true'", "check active content!" );
|
||||||
|
|
||||||
|
// verify
|
||||||
|
task = App.TaskManager.get( 'TestKey1' )
|
||||||
|
equal( task.notify, false )
|
||||||
|
deepEqual( task.state, undefined )
|
||||||
|
deepEqual( task.params, { "message": "#1" } )
|
||||||
|
|
||||||
|
// update
|
||||||
|
App.TaskManager.update( 'TestKey1', { 'state': 'abc' } )
|
||||||
|
App.TaskManager.update( 'TestKey1', { 'params': { a: 12 } } )
|
||||||
|
App.TaskManager.notify( 'TestKey1' )
|
||||||
|
|
||||||
|
// verify
|
||||||
|
task = App.TaskManager.get( 'TestKey1' )
|
||||||
|
equal( task.notify, true )
|
||||||
|
deepEqual( task.state, 'abc' )
|
||||||
|
deepEqual( task.params, { "a": 12 } )
|
||||||
|
|
||||||
|
|
||||||
App.TaskManager.execute({
|
App.TaskManager.execute({
|
||||||
key: 'TestKey2',
|
key: 'TestKey2',
|
||||||
controller: 'TestController1',
|
controller: 'TestController1',
|
||||||
|
|
Loading…
Reference in a new issue