[squeak-dev] The Trunk: MorphicTests-fbs.21.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Jul 3 17:08:42 UTC 2013


Frank Shearar uploaded a new version of MorphicTests to project The Trunk:
http://source.squeak.org/trunk/MorphicTests-fbs.21.mcz

==================== Summary ====================

Name: MorphicTests-fbs.21
Author: fbs
Time: 3 July 2013, 6:07:47.808 pm
UUID: c0755bb4-cce7-774c-a9fb-d19a11e668fe
Ancestors: MorphicTests-fbs.20

MorphicUIManagerTest belongs in the MorphicTests package.

=============== Diff against MorphicTests-fbs.20 ===============

Item was changed:
  SystemOrganization addCategory: #'MorphicTests-Basic'!
  SystemOrganization addCategory: #'MorphicTests-Kernel'!
  SystemOrganization addCategory: #'MorphicTests-Layouts'!
+ SystemOrganization addCategory: #'MorphicTests-ToolBuilder'!
  SystemOrganization addCategory: #'MorphicTests-Support'!
  SystemOrganization addCategory: #'MorphicTests-Text Support'!
  SystemOrganization addCategory: #'MorphicTests-Widgets'!
  SystemOrganization addCategory: #'MorphicTests-Worlds'!

Item was added:
+ TestCase subclass: #MorphicUIManagerTest
+ 	instanceVariableNames: 'cases'
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'MorphicTests-ToolBuilder'!
+ 
+ !MorphicUIManagerTest commentStamp: 'wiz 1/3/2007 13:57' prior: 0!
+ A MorphicUIBugTest is a class for testing the shortcomings and repairs of the MorphicUI manager.
+ .
+ 
+ Instance Variables
+ 	cases:		<aCollection>
+ 
+ cases
+ 	- a list of morphs that may need to be deleted during teardown.
+ 	the tests are expected to fill this list it starts out empty by default.
+ 	
+ 	
+ !

Item was added:
+ ----- Method: MorphicUIManagerTest>>defaultTimeout (in category 'as yet unclassified') -----
+ defaultTimeout
+ 	^ 60 "seconds"!

Item was added:
+ ----- Method: MorphicUIManagerTest>>findWindowInWorldLabeled: (in category 'as yet unclassified') -----
+ findWindowInWorldLabeled: aLabel
+ 
+ 	^World submorphs
+ 		detect: [ :each |
+ 			(each isKindOf: SystemWindow)
+ 				and: [ each label = aLabel ] ]
+ 		ifNone: nil.!

Item was added:
+ ----- Method: MorphicUIManagerTest>>setUp (in category 'as yet unclassified') -----
+ setUp
+ "default. tests will add morphs to list. Teardown will delete."
+ 
+ cases := #() .!

Item was added:
+ ----- Method: MorphicUIManagerTest>>tearDown (in category 'as yet unclassified') -----
+ tearDown
+ "default. tests will add morphs to list. Teardown will delete."
+ 
+ cases do: [ :each | each delete ] .!

Item was added:
+ ----- Method: MorphicUIManagerTest>>testOpenWorkspace (in category 'as yet unclassified') -----
+ testOpenWorkspace
+ 	"self new testOpenWorkspace"
+ 	"MorphicUIBugTest run: #testOpenWorkspace"
+ 	
+ 	| window myLabel foundWindow myModel |
+ 	self assert: Smalltalk isMorphic.
+ 	myLabel := 'Workspace from SUnit test' .
+ 	foundWindow := self findWindowInWorldLabeled: myLabel .
+ 	self assert: foundWindow isNil.
+ 	window := UIManager default edit: '"MorphicUIBugTest run: #openWorkspaceTest"'  label: myLabel.
+ 	window := window.
+ 	foundWindow := self findWindowInWorldLabeled: myLabel.
+ 	cases := Array with: foundWindow . "For teardown."
+ 	myModel := foundWindow submorphs detect: #isMorphicModel.
+ 	self assert: myModel model class == Workspace.
+ 	self assert: foundWindow model class == Workspace.
+ 	foundWindow delete!

Item was added:
+ ----- Method: MorphicUIManagerTest>>testOpenWorkspaceAns (in category 'as yet unclassified') -----
+ testOpenWorkspaceAns
+ "Test if method opening a workspace answers the window opened"
+ 
+ "MorphicUIBugTest run: #testOpenWorkspaceAns"
+ 
+ 
+ | window myLabel foundWindow |
+ 
+ self assert: ( Smalltalk isMorphic ) .
+ 
+ myLabel := 'Workspace from ', 'SUnit test' .
+ foundWindow := self findWindowInWorldLabeled: myLabel .
+ self assert: ( foundWindow isNil ) .
+ 
+ window := 
+ UIManager default edit: '"MorphicUIBugTest run: #openWorkspaceTest"'  label: myLabel .
+ 
+ foundWindow := self findWindowInWorldLabeled: myLabel .
+ 
+ cases := Array with: foundWindow . "For teardown."
+ 
+ self assert: ( window == foundWindow ) .
+ 
+ foundWindow delete .!

Item was added:
+ ----- Method: MorphicUIManagerTest>>testShowAllBinParts (in category 'as yet unclassified') -----
+ testShowAllBinParts
+ 	"self new testShowAllBinParts"
+ 	"MorphicUIBugTest run: #testShowAllBinParts"
+ 
+ 	self assert: ( Smalltalk isMorphic ) .
+ 	self shouldnt: [cases := Array with: ObjectsTool  initializedInstance showAll openCenteredInWorld  ] raise: Error .
+ 
+ 
+ 
+ 
+ !

Item was added:
+ ----- Method: MorphicUIManagerTest>>testUIManagerNoAcceptInitially (in category 'as yet unclassified') -----
+ testUIManagerNoAcceptInitially
+ 	"Ensure that UIManager does not invoke the accept: action initially."
+ 
+ 	| accepted window |
+ 	accepted := false.
+ 	window := UIManager default edit: Text new label: 'Test' accept: [:val| accepted := true].
+ 	window delete.
+ 	self deny: accepted.!

Item was changed:
+ AnObsoleteMorphicUIBugTest subclass: #StickynessBugz
- MorphicUIBugTest subclass: #StickynessBugz
  	instanceVariableNames: ''
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'MorphicTests-Basic'!
  
  !StickynessBugz commentStamp: 'wiz 11/24/2006 00:24' prior: 0!
  A StickynessBugz is for mantis #5500 rectangles and ellipses don't act sticky when rotated even when they are..
  
  Instance Variables
  !



More information about the Squeak-dev mailing list