@@ -25,12 +25,12 @@ test.describe("attributes", () => {
25
25
await expect ( input ) . toHaveAttribute ( "aria-required" , "false" ) ;
26
26
await expect ( input ) . toHaveAttribute ( "draggable" , "false" ) ;
27
27
await expect ( input ) . toHaveAttribute ( "spellcheck" , "false" ) ;
28
- await expect ( input ) . not . hasAttribute ( "required" ) ;
29
- await expect ( input ) . not . hasAttribute ( "title" ) ;
28
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
29
+ await expect ( input ) . not . toHaveAttribute ( "title" ) ;
30
30
31
31
await expect ( label ) . toHaveAttribute ( "for" , "even" ) ;
32
32
await expect ( label ) . toHaveAttribute ( "form" , "my-form" ) ;
33
- await expect ( label ) . not . hasAttribute ( "title" ) ;
33
+ await expect ( label ) . not . toHaveAttribute ( "title" ) ;
34
34
35
35
await expect ( svg ) . toHaveAttribute ( "width" , "15" ) ;
36
36
await expect ( svg ) . toHaveAttribute ( "height" , "15" ) ;
@@ -91,7 +91,7 @@ test.describe("attributes", () => {
91
91
await expect ( input ) . toHaveAttribute ( "aria-required" , "false" ) ;
92
92
await expect ( input ) . toHaveAttribute ( "draggable" , "false" ) ;
93
93
await expect ( input ) . toHaveAttribute ( "spellcheck" , "false" ) ;
94
- await expect ( input ) . not . hasAttribute ( "required" ) ;
94
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
95
95
await expect ( renders ) . toHaveText ( "1" ) ;
96
96
} ) ;
97
97
@@ -109,8 +109,8 @@ test.describe("attributes", () => {
109
109
110
110
await countBtn . click ( ) ;
111
111
await expect ( input ) . not . toHaveAttribute ( "title" , "some title" ) ;
112
- await expect ( input ) . not . hasAttribute ( "title" ) ;
113
- await expect ( label ) . not . hasAttribute ( "title" ) ;
112
+ await expect ( input ) . not . toHaveAttribute ( "title" ) ;
113
+ await expect ( label ) . not . toHaveAttribute ( "title" ) ;
114
114
await expect ( renders ) . toHaveText ( "1" ) ;
115
115
} ) ;
116
116
@@ -127,7 +127,7 @@ test.describe("attributes", () => {
127
127
await expect ( input ) . toHaveAttribute ( "aria-required" , "false" ) ;
128
128
await expect ( input ) . toHaveAttribute ( "draggable" , "false" ) ;
129
129
await expect ( input ) . toHaveAttribute ( "spellcheck" , "false" ) ;
130
- await expect ( input ) . not . hasAttribute ( "required" ) ;
130
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
131
131
await expect ( svg ) . toHaveAttribute ( "aria-hidden" , "false" ) ;
132
132
await expect ( renders ) . toHaveText ( "1" ) ;
133
133
} ) ;
@@ -144,7 +144,7 @@ test.describe("attributes", () => {
144
144
await expect ( input ) . toHaveAttribute ( "aria-required" , "true" ) ;
145
145
await expect ( input ) . toHaveAttribute ( "draggable" , "true" ) ;
146
146
await expect ( input ) . toHaveAttribute ( "spellcheck" , "true" ) ;
147
- await expect ( input ) . hasAttribute ( "required" ) ;
147
+ await expect ( input ) . toHaveAttribute ( "required" ) ;
148
148
await expect ( renders ) . toHaveText ( "1" ) ;
149
149
} ) ;
150
150
@@ -159,13 +159,13 @@ test.describe("attributes", () => {
159
159
await hideBtn . click ( ) ;
160
160
await expect ( input ) . not . toHaveAttribute ( "aria-hidden" , "true" ) ;
161
161
162
- await expect ( input ) . not . hasAttribute ( "aria-hidden" ) ;
163
- await expect ( input ) . not . hasAttribute ( "aria-label" ) ;
164
- await expect ( input ) . not . hasAttribute ( "tabindex" ) ;
165
- await expect ( input ) . not . hasAttribute ( "required" ) ;
166
- await expect ( input ) . not . hasAttribute ( "aria-required" ) ;
167
- await expect ( input ) . not . hasAttribute ( "draggable" ) ;
168
- await expect ( input ) . not . hasAttribute ( "spellcheck" ) ;
162
+ await expect ( input ) . not . toHaveAttribute ( "aria-hidden" ) ;
163
+ await expect ( input ) . not . toHaveAttribute ( "aria-label" ) ;
164
+ await expect ( input ) . not . toHaveAttribute ( "tabindex" ) ;
165
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
166
+ await expect ( input ) . not . toHaveAttribute ( "aria-required" ) ;
167
+ await expect ( input ) . not . toHaveAttribute ( "draggable" ) ;
168
+ await expect ( input ) . not . toHaveAttribute ( "spellcheck" ) ;
169
169
await expect ( renders ) . toHaveText ( "2" ) ;
170
170
} ) ;
171
171
@@ -180,20 +180,20 @@ test.describe("attributes", () => {
180
180
await countBtn . click ( ) ;
181
181
await expect ( input ) . not . toHaveAttribute ( "aria-hidden" , "true" ) ;
182
182
183
- await expect ( input ) . not . hasAttribute ( "aria-hidden" ) ;
184
- await expect ( input ) . not . hasAttribute ( "aria-label" ) ;
185
- await expect ( input ) . not . hasAttribute ( "tabindex" ) ;
186
- await expect ( input ) . not . hasAttribute ( "required" ) ;
187
- await expect ( input ) . not . hasAttribute ( "aria-required" ) ;
188
- await expect ( input ) . not . hasAttribute ( "draggable" ) ;
189
- await expect ( input ) . not . hasAttribute ( "spellcheck" ) ;
190
- await expect ( label ) . not . hasAttribute ( "for" ) ;
191
- await expect ( label ) . not . hasAttribute ( "form" ) ;
192
- await expect ( svg ) . not . hasAttribute ( "width" ) ;
193
- await expect ( svg ) . not . hasAttribute ( "height" ) ;
194
- await expect ( svg ) . not . hasAttribute ( "preserveAspectRatio" ) ;
183
+ await expect ( input ) . not . toHaveAttribute ( "aria-hidden" ) ;
184
+ await expect ( input ) . not . toHaveAttribute ( "aria-label" ) ;
185
+ await expect ( input ) . not . toHaveAttribute ( "tabindex" ) ;
186
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
187
+ await expect ( input ) . not . toHaveAttribute ( "aria-required" ) ;
188
+ await expect ( input ) . not . toHaveAttribute ( "draggable" ) ;
189
+ await expect ( input ) . not . toHaveAttribute ( "spellcheck" ) ;
190
+ await expect ( label ) . not . toHaveAttribute ( "for" ) ;
191
+ await expect ( label ) . not . toHaveAttribute ( "form" ) ;
192
+ await expect ( svg ) . not . toHaveAttribute ( "width" ) ;
193
+ await expect ( svg ) . not . toHaveAttribute ( "height" ) ;
194
+ await expect ( svg ) . not . toHaveAttribute ( "preserveAspectRatio" ) ;
195
195
await expect ( svg ) . toHaveClass ( "" ) ;
196
- await expect ( svg ) . not . hasAttribute ( "aria-hidden" ) ;
196
+ await expect ( svg ) . not . toHaveAttribute ( "aria-hidden" ) ;
197
197
198
198
await expect ( renders ) . toHaveText ( "2" ) ;
199
199
@@ -202,7 +202,7 @@ test.describe("attributes", () => {
202
202
await expect ( input ) . toHaveAttribute ( "aria-hidden" , "true" ) ;
203
203
await expect ( input ) . toHaveAttribute ( "aria-label" , "even" ) ;
204
204
await expect ( input ) . toHaveAttribute ( "tabindex" , "-1" ) ;
205
- await expect ( input ) . not . hasAttribute ( "required" ) ;
205
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
206
206
await expect ( input ) . toHaveAttribute ( "aria-required" , "false" ) ;
207
207
await expect ( input ) . toHaveAttribute ( "draggable" , "false" ) ;
208
208
await expect ( input ) . toHaveAttribute ( "spellcheck" , "false" ) ;
@@ -222,19 +222,19 @@ test.describe("attributes", () => {
222
222
223
223
await countBtn . click ( ) ;
224
224
await expect ( svg ) . not . toHaveAttribute ( "aria-hidden" , "true" ) ;
225
- await expect ( input ) . not . hasAttribute ( "aria-hidden" ) ;
226
- await expect ( input ) . not . hasAttribute ( "aria-label" ) ;
227
- await expect ( input ) . not . hasAttribute ( "tabindex" ) ;
228
- await expect ( input ) . not . hasAttribute ( "required" ) ;
229
- await expect ( input ) . not . hasAttribute ( "aria-required" ) ;
230
- await expect ( input ) . not . hasAttribute ( "draggable" ) ;
231
- await expect ( input ) . not . hasAttribute ( "spellcheck" ) ;
232
- await expect ( label ) . not . hasAttribute ( "for" ) ;
233
- await expect ( label ) . not . hasAttribute ( "form" ) ;
234
- await expect ( svg ) . not . hasAttribute ( "width" ) ;
235
- await expect ( svg ) . not . hasAttribute ( "height" ) ;
236
- await expect ( svg ) . not . hasAttribute ( "preserveAspectRatio" ) ;
237
- await expect ( svg ) . not . hasAttribute ( "aria-hidden" ) ;
225
+ await expect ( input ) . not . toHaveAttribute ( "aria-hidden" ) ;
226
+ await expect ( input ) . not . toHaveAttribute ( "aria-label" ) ;
227
+ await expect ( input ) . not . toHaveAttribute ( "tabindex" ) ;
228
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
229
+ await expect ( input ) . not . toHaveAttribute ( "aria-required" ) ;
230
+ await expect ( input ) . not . toHaveAttribute ( "draggable" ) ;
231
+ await expect ( input ) . not . toHaveAttribute ( "spellcheck" ) ;
232
+ await expect ( label ) . not . toHaveAttribute ( "for" ) ;
233
+ await expect ( label ) . not . toHaveAttribute ( "form" ) ;
234
+ await expect ( svg ) . not . toHaveAttribute ( "width" ) ;
235
+ await expect ( svg ) . not . toHaveAttribute ( "height" ) ;
236
+ await expect ( svg ) . not . toHaveAttribute ( "preserveAspectRatio" ) ;
237
+ await expect ( svg ) . not . toHaveAttribute ( "aria-hidden" ) ;
238
238
await expect ( svg ) . toHaveClass ( "" ) ;
239
239
await expect ( renders ) . toHaveText ( "4" ) ;
240
240
@@ -243,7 +243,7 @@ test.describe("attributes", () => {
243
243
await expect ( input ) . toHaveAttribute ( "aria-hidden" , "true" ) ;
244
244
await expect ( input ) . toHaveAttribute ( "aria-label" , "even" ) ;
245
245
await expect ( input ) . toHaveAttribute ( "tabindex" , "-1" ) ;
246
- await expect ( input ) . not . hasAttribute ( "required" ) ;
246
+ await expect ( input ) . not . toHaveAttribute ( "required" ) ;
247
247
await expect ( input ) . toHaveAttribute ( "aria-required" , "false" ) ;
248
248
await expect ( input ) . toHaveAttribute ( "draggable" , "false" ) ;
249
249
await expect ( input ) . toHaveAttribute ( "spellcheck" , "false" ) ;
@@ -276,9 +276,9 @@ test.describe("attributes", () => {
276
276
await button . click ( ) ;
277
277
278
278
await expect ( button ) . toHaveClass ( "moop" ) ;
279
- await expect ( button ) . not . hasAttribute ( "data-works" ) ;
280
- await expect ( button ) . not . hasAttribute ( "aria-label" ) ;
281
- await expect ( button ) . not . hasAttribute ( "title" ) ;
279
+ await expect ( button ) . not . toHaveAttribute ( "data-works" ) ;
280
+ await expect ( button ) . not . toHaveAttribute ( "aria-label" ) ;
281
+ await expect ( button ) . not . toHaveAttribute ( "title" ) ;
282
282
} ) ;
283
283
284
284
test ( "issue 4718 (undefined)" , async ( { page } ) => {
@@ -291,9 +291,9 @@ test.describe("attributes", () => {
291
291
await button . click ( ) ;
292
292
293
293
await expect ( button ) . toHaveClass ( "moop" ) ;
294
- await expect ( button ) . not . hasAttribute ( "data-works" ) ;
295
- await expect ( button ) . not . hasAttribute ( "aria-label" ) ;
296
- await expect ( button ) . not . hasAttribute ( "title" ) ;
294
+ await expect ( button ) . not . toHaveAttribute ( "data-works" ) ;
295
+ await expect ( button ) . not . toHaveAttribute ( "aria-label" ) ;
296
+ await expect ( button ) . not . toHaveAttribute ( "title" ) ;
297
297
} ) ;
298
298
}
299
299
0 commit comments