@@ -5,9 +5,9 @@ test('click element', async () => {
55 await user . pointer ( { keys : '[MouseLeft]' , target : element } )
66
77 expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
8- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
8+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
99 mousedown - button=0; buttons=1; detail=1
10- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
10+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
1111 mouseup - button=0; buttons=0; detail=1
1212 click - button=0; buttons=0; detail=1
1313 ` )
@@ -19,7 +19,7 @@ test('secondary button triggers contextmenu', async () => {
1919 await user . pointer ( { keys : '[MouseRight>]' , target : element } )
2020
2121 expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
22- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
22+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=2; buttons=2
2323 mousedown - button=2; buttons=2; detail=1
2424 contextmenu - button=2; buttons=2; detail=0
2525 ` )
@@ -33,14 +33,14 @@ test('double click', async () => {
3333 await user . pointer ( { keys : '[MouseLeft][MouseLeft]' , target : element } )
3434
3535 expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
36- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
36+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
3737 mousedown - button=0; buttons=1; detail=1
38- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
38+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
3939 mouseup - button=0; buttons=0; detail=1
4040 click - button=0; buttons=0; detail=1
41- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
41+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
4242 mousedown - button=0; buttons=1; detail=2
43- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
43+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
4444 mouseup - button=0; buttons=0; detail=2
4545 click - button=0; buttons=0; detail=2
4646 dblclick - button=0; buttons=0; detail=2
@@ -89,14 +89,14 @@ test('two clicks', async () => {
8989 await user . pointer ( { keys : '[MouseLeft]' } )
9090
9191 expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
92- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
92+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
9393 mousedown - button=0; buttons=1; detail=1
94- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
94+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
9595 mouseup - button=0; buttons=0; detail=1
9696 click - button=0; buttons=0; detail=1
97- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
97+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
9898 mousedown - button=0; buttons=1; detail=1
99- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
99+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
100100 mouseup - button=0; buttons=0; detail=1
101101 click - button=0; buttons=0; detail=1
102102 ` )
@@ -117,22 +117,22 @@ test('other keys reset click counter', async () => {
117117 } )
118118
119119 expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
120- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
120+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
121121 mousedown - button=0; buttons=1; detail=1
122- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
122+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
123123 mouseup - button=0; buttons=0; detail=1
124124 click - button=0; buttons=0; detail=1
125- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
125+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
126126 mousedown - button=0; buttons=1; detail=2
127127 mousedown - button=2; buttons=3; detail=1
128128 contextmenu - button=2; buttons=3; detail=0
129129 mouseup - button=2; buttons=1; detail=1
130130 auxclick - button=2; buttons=1; detail=1
131- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
131+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
132132 mouseup - button=0; buttons=0; detail=0
133- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
133+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
134134 mousedown - button=0; buttons=1; detail=1
135- pointerup - pointerId=1; pointerType=mouse; isPrimary=true
135+ pointerup - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=0
136136 mouseup - button=0; buttons=0; detail=1
137137 click - button=0; buttons=0; detail=1
138138 ` )
@@ -148,12 +148,12 @@ test('click per touch device', async () => {
148148 await user . pointer ( { keys : '[TouchA]' , target : element } )
149149
150150 expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
151- pointerover - pointerId=2; pointerType=touch; isPrimary=true
152- pointerenter - pointerId=2; pointerType=touch; isPrimary=true
153- pointerdown - pointerId=2; pointerType=touch; isPrimary=true
154- pointerup - pointerId=2; pointerType=touch; isPrimary=true
155- pointerout - pointerId=2; pointerType=touch; isPrimary=true
156- pointerleave - pointerId=2; pointerType=touch; isPrimary=true
151+ pointerover - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=1
152+ pointerenter - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=1
153+ pointerdown - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=1
154+ pointerup - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=0
155+ pointerout - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=0
156+ pointerleave - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=0
157157 mouseover - button=0; buttons=0; detail=0
158158 mouseenter - button=0; buttons=0; detail=0
159159 mousemove - button=0; buttons=0; detail=0
@@ -172,24 +172,24 @@ test('double click per touch device', async () => {
172172 await user . pointer ( { keys : '[TouchA][TouchA]' , target : element } )
173173
174174 expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
175- pointerover - pointerId=2; pointerType=touch; isPrimary=true
176- pointerenter - pointerId=2; pointerType=touch; isPrimary=true
177- pointerdown - pointerId=2; pointerType=touch; isPrimary=true
178- pointerup - pointerId=2; pointerType=touch; isPrimary=true
179- pointerout - pointerId=2; pointerType=touch; isPrimary=true
180- pointerleave - pointerId=2; pointerType=touch; isPrimary=true
175+ pointerover - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=1
176+ pointerenter - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=1
177+ pointerdown - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=1
178+ pointerup - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=0
179+ pointerout - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=0
180+ pointerleave - pointerId=2; pointerType=touch; isPrimary=true; button=0; buttons=0
181181 mouseover - button=0; buttons=0; detail=0
182182 mouseenter - button=0; buttons=0; detail=0
183183 mousemove - button=0; buttons=0; detail=0
184184 mousedown - button=0; buttons=1; detail=1
185185 mouseup - button=0; buttons=0; detail=1
186186 click - button=0; buttons=0; detail=1
187- pointerover - pointerId=3; pointerType=touch; isPrimary=true
188- pointerenter - pointerId=3; pointerType=touch; isPrimary=true
189- pointerdown - pointerId=3; pointerType=touch; isPrimary=true
190- pointerup - pointerId=3; pointerType=touch; isPrimary=true
191- pointerout - pointerId=3; pointerType=touch; isPrimary=true
192- pointerleave - pointerId=3; pointerType=touch; isPrimary=true
187+ pointerover - pointerId=3; pointerType=touch; isPrimary=true; button=0; buttons=1
188+ pointerenter - pointerId=3; pointerType=touch; isPrimary=true; button=0; buttons=1
189+ pointerdown - pointerId=3; pointerType=touch; isPrimary=true; button=0; buttons=1
190+ pointerup - pointerId=3; pointerType=touch; isPrimary=true; button=0; buttons=0
191+ pointerout - pointerId=3; pointerType=touch; isPrimary=true; button=0; buttons=0
192+ pointerleave - pointerId=3; pointerType=touch; isPrimary=true; button=0; buttons=0
193193 mousedown - button=0; buttons=1; detail=2
194194 mouseup - button=0; buttons=0; detail=2
195195 click - button=0; buttons=0; detail=2
0 commit comments