@@ -60,10 +60,10 @@ ToSkinDemoStyleSheetTest >> testRuleBackgroundDependsOnParentOrChildren [
6060 position: 150 @ 50 .
6161 childElem := ToElement new .
6262 parentElem addChild: childElem.
63- space toTheme: theme.
64- space root addChild: elem .
65- space root addChild: parentElem .
66- self waitTestingSpaces .
63+ space deferAndSettle: [
64+ space toTheme: theme .
65+ space root addChild: elem .
66+ space root addChild: parentElem ] .
6767 self assert: elem background paint color equals: Color red.
6868 self assert: parentElem background paint color equals: Color blue.
6969 self assert: childElem background paint color equals: Color green
@@ -112,9 +112,9 @@ ToSkinDemoStyleSheetTest >> testRuleBackgroundDependsOnSibling [
112112 sibling1.
113113 sibling2 }.
114114
115- space toTheme: theme.
116- space root addChild: container .
117- self waitTestingSpaces .
115+ space deferAndSettle: [
116+ space toTheme: theme .
117+ space root addChild: container ] .
118118 self assert: sibling1 background paint color equals: Color blue.
119119 self assert: sibling2 background paint color equals: Color green.
120120 self assert: container background paint color equals: Color red
@@ -168,27 +168,18 @@ ToSkinDemoStyleSheetTest >> testRuleBackgroundDependsOnSizeWithActionBlock [
168168 extent: 100 asPoint;
169169 position: 150 asPoint.
170170
171- space root addChild: elem.
172- space root addChild: verticalElem.
173- space root addChild: horizontalElem.
174- space root addChild: biggerElem.
175-
176- assertsTested := false .
177- space root whenLayoutedDoOnce: [
178- assertsTested := true .
179- space toTheme: theme.
180- self waitTestingSpaces.
181- self assert: elem background paint color equals: Color green.
182- self
183- assert: verticalElem background paint color
184- equals: Color yellow.
185- self
186- assert: horizontalElem background paint color
187- equals: Color blue.
188- self assert: biggerElem background paint color equals: Color red ].
189-
190- space root forceLayout.
191- self assert: assertsTested
171+ space deferAndSettle: [
172+ space root addChild: elem.
173+ space root addChild: verticalElem.
174+ space root addChild: horizontalElem.
175+ space root addChild: biggerElem ].
176+
177+ space deferAndSettle: [ space toTheme: theme ].
178+
179+ self assert: elem background paint color equals: Color green.
180+ self assert: verticalElem background paint color equals: Color yellow.
181+ self assert: horizontalElem background paint color equals: Color blue.
182+ self assert: biggerElem background paint color equals: Color red
192183]
193184
194185{ #category : #tests }
0 commit comments