Skip to content

Commit 36dbdac

Browse files
authored
Use BlSpace class-side simulation API
1 parent 049cbda commit 36dbdac

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

src/Bloc-Examples/BlSharedEventDistributorTest.class.st

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ BlSharedEventDistributorTest >> testMouseEnterEventOneOutOfTwoElements [
107107
aContainer := self newContainer.
108108
aContainer addChildren: aHandler elements.
109109
aSpace root addChild: aContainer.
110+
111+
BlSpace simulateMouseMoveInside: elementA.
110112
elementA eventSimulator
111113
mouseMoveInside;
112114
waitPendingWork.
@@ -144,10 +146,18 @@ BlSharedEventDistributorTest >> testMouseLeaveEventOneOutOfTwoElements [
144146
aContainer := self newContainer.
145147
aContainer addChildren: aHandler elements.
146148
aSpace root addChild: aContainer.
147-
elementA eventSimulator
148-
mouseMoveInside;
149-
mouseMoveOutside.
150-
self waitTestingSpaces.
149+
150+
BlSpace
151+
simulateEvents: {
152+
(BlMouseMoveEvent new
153+
position: (BlSpace locationInside: elementA);
154+
screenPosition: 0 @ 0;
155+
yourself).
156+
(BlMouseMoveEvent new
157+
position: (BlSpace locationOutside: aContainer);
158+
screenPosition: 0 @ 0;
159+
yourself) }
160+
on: aContainer.
151161

152162
self assert: countA equals: 1.
153163
self assert: countB equals: 1

0 commit comments

Comments
 (0)