equal
deleted
inserted
replaced
357 |
357 |
358 "*** the code below creates a default model when invoked." |
358 "*** the code below creates a default model when invoked." |
359 "*** (which may not be the one you wanted)" |
359 "*** (which may not be the one you wanted)" |
360 "*** Please change as required and accept it in the browser." |
360 "*** Please change as required and accept it in the browser." |
361 |
361 |
362 |holder| |
362 script isNil ifTrue:[ |
363 |
363 script := ValueHolder new. |
364 (holder := builder bindingAt:#script) isNil ifTrue:[ |
364 script onChangeSend:#suiteSelectionChanged to:self. |
365 holder := ValueHolder new. |
365 ]. |
366 builder aspectAt:#script put:holder. |
366 ^ script. |
367 holder onChangeSend:#scriptSelectionChanged to:self. |
|
368 "/ holder addDependent:self. |
|
369 ]. |
|
370 ^ holder. |
|
371 |
367 |
372 "Created: / 21.6.2000 / 12:04:36 / Sames" |
368 "Created: / 21.6.2000 / 12:04:36 / Sames" |
373 ! |
369 ! |
374 |
370 |
375 script:something |
371 script:something |
456 ] |
452 ] |
457 ] |
453 ] |
458 ! |
454 ! |
459 |
455 |
460 categorySelectionChanged |
456 categorySelectionChanged |
461 self updateSuitesList |
457 |selectedScriptIndex selectedScript oldSuitesList newSuitesList| |
|
458 |
|
459 selectedScriptIndex := self script value. |
|
460 oldSuitesList := self scriptModel value. |
|
461 |
|
462 selectedScriptIndex notNil ifTrue:[ |
|
463 selectedScript := (oldSuitesList at:selectedScriptIndex) string |
|
464 ]. |
|
465 |
|
466 self updateSuitesList. |
|
467 |
|
468 newSuitesList := self scriptModel value. |
|
469 (newSuitesList includes: selectedScript) ifFalse:[ |
|
470 self script value: nil. |
|
471 ] ifTrue:[ |
|
472 self script value: (newSuitesList indexOf:selectedScript) |
|
473 ]. |
462 ! |
474 ! |
463 |
475 |
464 debugSelectedFailure |
476 debugSelectedFailure |
465 self debugTest: self selection |
477 self debugTest: self selection |
466 |
478 |
678 ! |
690 ! |
679 |
691 |
680 suiteSelectionChanged |
692 suiteSelectionChanged |
681 |ok className description cls| |
693 |ok className description cls| |
682 |
694 |
683 self enableRunButton value:(ok := self freshTestSuite notNil). |
695 self enableRunButton value:(ok := self freshTestSuite notNil and:[self script value notNil]). |
684 self enableRunDefectsButton value:(ok and:[allDefects size > 0]). |
696 self enableRunDefectsButton value:(ok and:[allDefects size > 0]). |
685 |
697 |
686 self script value notNil ifTrue:[ |
698 self script value notNil ifTrue:[ |
687 className := self selectedScript string. |
699 className := self selectedScript string. |
688 (ok and:[className notNil]) ifTrue:[ |
700 (ok and:[className notNil]) ifTrue:[ |
905 foregroundColor: (Color red:33 green:33 blue:0); |
917 foregroundColor: (Color red:33 green:33 blue:0); |
906 backgroundColor: (Color red:67 green:67 blue:0) |
918 backgroundColor: (Color red:67 green:67 blue:0) |
907 ! |
919 ! |
908 |
920 |
909 displayPass |
921 displayPass |
|
922 self displayGreen. |
910 self displayMode: 'Pass'. |
923 self displayMode: 'Pass'. |
911 self displayDetails: result runCount printString , ' run' , self timeSinceLastPassAsString. |
924 self displayDetails: result runCount printString , ' run' , self timeSinceLastPassAsString. |
912 self displayGreen. |
|
913 lastPass := Time now |
925 lastPass := Time now |
914 |
926 |
915 "Modified: / 21.6.2000 / 12:14:52 / Sames" |
927 "Modified: / 21.6.2000 / 12:14:52 / Sames" |
916 ! |
928 ! |
917 |
929 |
1012 ! ! |
1024 ! ! |
1013 |
1025 |
1014 !TestRunner class methodsFor:'documentation'! |
1026 !TestRunner class methodsFor:'documentation'! |
1015 |
1027 |
1016 version |
1028 version |
1017 ^ '$Header: /cvs/stx/stx/goodies/sunit/TestRunner.st,v 1.25 2001-12-13 22:43:25 cg Exp $' |
1029 ^ '$Header: /cvs/stx/stx/goodies/sunit/TestRunner.st,v 1.26 2001-12-13 23:15:47 cg Exp $' |
1018 ! ! |
1030 ! ! |