@@ -24,110 +24,110 @@ describe("Mouse class", () => {
2424 expect ( SUT . config . autoDelayMs ) . toEqual ( 100 ) ;
2525 } ) ;
2626
27- it ( "should forward scrollLeft to the native adapter class" , ( ) => {
27+ it ( "should forward scrollLeft to the native adapter class" , async ( ) => {
2828 // GIVEN
2929 const nativeAdapterMock = new NativeAdapter ( ) ;
3030 const SUT = new Mouse ( nativeAdapterMock ) ;
3131 const scrollAmount = 5 ;
3232
3333 // WHEN
34- const result = SUT . scrollLeft ( scrollAmount ) ;
34+ const result = await SUT . scrollLeft ( scrollAmount ) ;
3535
3636 // THEN
3737 expect ( nativeAdapterMock . scrollLeft ) . toBeCalledWith ( scrollAmount ) ;
3838 expect ( result ) . toBe ( SUT ) ;
3939 } ) ;
4040
41- it ( "should forward scrollRight to the native adapter class" , ( ) => {
41+ it ( "should forward scrollRight to the native adapter class" , async ( ) => {
4242 // GIVEN
4343 const nativeAdapterMock = new NativeAdapter ( ) ;
4444 const SUT = new Mouse ( nativeAdapterMock ) ;
4545 const scrollAmount = 5 ;
4646
4747 // WHEN
48- const result = SUT . scrollRight ( scrollAmount ) ;
48+ const result = await SUT . scrollRight ( scrollAmount ) ;
4949
5050 // THEN
5151 expect ( nativeAdapterMock . scrollRight ) . toBeCalledWith ( scrollAmount ) ;
5252 expect ( result ) . toBe ( SUT ) ;
5353 } ) ;
5454
55- it ( "should forward scrollDown to the native adapter class" , ( ) => {
55+ it ( "should forward scrollDown to the native adapter class" , async ( ) => {
5656 // GIVEN
5757 const nativeAdapterMock = new NativeAdapter ( ) ;
5858 const SUT = new Mouse ( nativeAdapterMock ) ;
5959 const scrollAmount = 5 ;
6060
6161 // WHEN
62- const result = SUT . scrollDown ( scrollAmount ) ;
62+ const result = await SUT . scrollDown ( scrollAmount ) ;
6363
6464 // THEN
6565 expect ( nativeAdapterMock . scrollDown ) . toBeCalledWith ( scrollAmount ) ;
6666 expect ( result ) . toBe ( SUT ) ;
6767 } ) ;
6868
69- it ( "should forward scrollUp to the native adapter class" , ( ) => {
69+ it ( "should forward scrollUp to the native adapter class" , async ( ) => {
7070 // GIVEN
7171 const nativeAdapterMock = new NativeAdapter ( ) ;
7272 const SUT = new Mouse ( nativeAdapterMock ) ;
7373 const scrollAmount = 5 ;
7474
7575 // WHEN
76- const result = SUT . scrollUp ( scrollAmount ) ;
76+ const result = await SUT . scrollUp ( scrollAmount ) ;
7777
7878 // THEN
7979 expect ( nativeAdapterMock . scrollUp ) . toBeCalledWith ( scrollAmount ) ;
8080 expect ( result ) . toBe ( SUT ) ;
8181 } ) ;
8282
83- it ( "should forward leftClick to the native adapter class" , ( ) => {
83+ it ( "should forward leftClick to the native adapter class" , async ( ) => {
8484 // GIVEN
8585 const nativeAdapterMock = new NativeAdapter ( ) ;
8686 const SUT = new Mouse ( nativeAdapterMock ) ;
8787
8888 // WHEN
89- const result = SUT . leftClick ( ) ;
89+ const result = await SUT . leftClick ( ) ;
9090
9191 // THEN
9292 expect ( nativeAdapterMock . leftClick ) . toBeCalled ( ) ;
9393 expect ( result ) . toBe ( SUT ) ;
9494 } ) ;
9595
96- it ( "should forward rightClick to the native adapter class" , ( ) => {
96+ it ( "should forward rightClick to the native adapter class" , async ( ) => {
9797 // GIVEN
9898 const nativeAdapterMock = new NativeAdapter ( ) ;
9999 const SUT = new Mouse ( nativeAdapterMock ) ;
100100
101101 // WHEN
102- const result = SUT . rightClick ( ) ;
102+ const result = await SUT . rightClick ( ) ;
103103
104104 // THEN
105105 expect ( nativeAdapterMock . rightClick ) . toBeCalled ( ) ;
106106 expect ( result ) . toBe ( SUT ) ;
107107 } ) ;
108108
109- it ( "update mouse position along path on move" , ( ) => {
109+ it ( "update mouse position along path on move" , async ( ) => {
110110 // GIVEN
111111 const nativeAdapterMock = new NativeAdapter ( ) ;
112112 const SUT = new Mouse ( nativeAdapterMock ) ;
113113 const path = linehelper . straightLine ( new Point ( 0 , 0 ) , new Point ( 10 , 10 ) ) ;
114114
115115 // WHEN
116- const result = SUT . move ( path ) ;
116+ const result = await SUT . move ( path ) ;
117117
118118 // THEN
119119 expect ( nativeAdapterMock . setMousePosition ) . toBeCalledTimes ( path . length ) ;
120120 expect ( result ) . toBe ( SUT ) ;
121121 } ) ;
122122
123- it ( "should press and hold left mouse button, move and release left mouse button on drag" , ( ) => {
123+ it ( "should press and hold left mouse button, move and release left mouse button on drag" , async ( ) => {
124124 // GIVEN
125125 const nativeAdapterMock = new NativeAdapter ( ) ;
126126 const SUT = new Mouse ( nativeAdapterMock ) ;
127127 const path = linehelper . straightLine ( new Point ( 0 , 0 ) , new Point ( 10 , 10 ) ) ;
128128
129129 // WHEN
130- const result = SUT . drag ( path ) ;
130+ const result = await SUT . drag ( path ) ;
131131
132132 // THEN
133133 expect ( nativeAdapterMock . pressButton ) . toBeCalledWith ( Button . LEFT ) ;
0 commit comments