File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -502,3 +502,30 @@ BlEventTest >> testSimulateMouseMoveOutside [
502502 self assert: mouseEnter equals: 0 .
503503 self assert: mouseLeave equals: 0
504504]
505+
506+ { #category : #tests }
507+ BlEventTest >> testSimulateSecondaryClick [
508+
509+ | element mouseDown mouseUp click |
510+ element := self newBlueElement.
511+ element extent: 100 @ 100 .
512+ element position: 0 @ 0 .
513+
514+ mouseDown := mouseUp := click := 0 .
515+
516+ element
517+ addEventHandlerOn: BlSecondaryMouseDownEvent
518+ do: [ mouseDown := mouseDown + 1 ].
519+ element
520+ addEventHandlerOn: BlSecondaryMouseUpEvent
521+ do: [ mouseUp := mouseUp + 1 ].
522+ element
523+ addEventHandlerOn: BlSecondaryClickEvent
524+ do: [ click := click + 1 ].
525+
526+ BlSpace simulateSecondaryClickOn: element.
527+
528+ self assert: mouseDown equals: 1 .
529+ self assert: mouseUp equals: 1 .
530+ self assert: click equals: 1
531+ ]
You can’t perform that action at this time.
0 commit comments