@@ -5,9 +5,9 @@ test('click element', async () => {
5
5
await user . pointer ( { keys : '[MouseLeft]' , target : element } )
6
6
7
7
expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
8
- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
8
+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
9
9
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
11
11
mouseup - button=0; buttons=0; detail=1
12
12
click - button=0; buttons=0; detail=1
13
13
` )
@@ -19,7 +19,7 @@ test('secondary button triggers contextmenu', async () => {
19
19
await user . pointer ( { keys : '[MouseRight>]' , target : element } )
20
20
21
21
expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
22
- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
22
+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=2; buttons=2
23
23
mousedown - button=2; buttons=2; detail=1
24
24
contextmenu - button=2; buttons=2; detail=0
25
25
` )
@@ -33,14 +33,14 @@ test('double click', async () => {
33
33
await user . pointer ( { keys : '[MouseLeft][MouseLeft]' , target : element } )
34
34
35
35
expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
36
- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
36
+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
37
37
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
39
39
mouseup - button=0; buttons=0; detail=1
40
40
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
42
42
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
44
44
mouseup - button=0; buttons=0; detail=2
45
45
click - button=0; buttons=0; detail=2
46
46
dblclick - button=0; buttons=0; detail=2
@@ -89,14 +89,14 @@ test('two clicks', async () => {
89
89
await user . pointer ( { keys : '[MouseLeft]' } )
90
90
91
91
expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
92
- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
92
+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
93
93
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
95
95
mouseup - button=0; buttons=0; detail=1
96
96
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
98
98
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
100
100
mouseup - button=0; buttons=0; detail=1
101
101
click - button=0; buttons=0; detail=1
102
102
` )
@@ -117,22 +117,22 @@ test('other keys reset click counter', async () => {
117
117
} )
118
118
119
119
expect ( getClickEventsSnapshot ( ) ) . toMatchInlineSnapshot ( `
120
- pointerdown - pointerId=1; pointerType=mouse; isPrimary=true
120
+ pointerdown - pointerId=1; pointerType=mouse; isPrimary=true; button=0; buttons=1
121
121
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
123
123
mouseup - button=0; buttons=0; detail=1
124
124
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
126
126
mousedown - button=0; buttons=1; detail=2
127
127
mousedown - button=2; buttons=3; detail=1
128
128
contextmenu - button=2; buttons=3; detail=0
129
129
mouseup - button=2; buttons=1; detail=1
130
130
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
132
132
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
134
134
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
136
136
mouseup - button=0; buttons=0; detail=1
137
137
click - button=0; buttons=0; detail=1
138
138
` )
@@ -148,12 +148,12 @@ test('click per touch device', async () => {
148
148
await user . pointer ( { keys : '[TouchA]' , target : element } )
149
149
150
150
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
157
157
mouseover - button=0; buttons=0; detail=0
158
158
mouseenter - button=0; buttons=0; detail=0
159
159
mousemove - button=0; buttons=0; detail=0
@@ -172,24 +172,24 @@ test('double click per touch device', async () => {
172
172
await user . pointer ( { keys : '[TouchA][TouchA]' , target : element } )
173
173
174
174
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
181
181
mouseover - button=0; buttons=0; detail=0
182
182
mouseenter - button=0; buttons=0; detail=0
183
183
mousemove - button=0; buttons=0; detail=0
184
184
mousedown - button=0; buttons=1; detail=1
185
185
mouseup - button=0; buttons=0; detail=1
186
186
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
193
193
mousedown - button=0; buttons=1; detail=2
194
194
mouseup - button=0; buttons=0; detail=2
195
195
click - button=0; buttons=0; detail=2
0 commit comments