@@ -86,6 +86,7 @@ describe('modal', () => {
86
86
})
87
87
88
88
expect(wrapper.isVueInstance()).toBe(true)
89
+
89
90
await waitNT(wrapper.vm)
90
91
91
92
expect(wrapper.isEmpty()).toBe(true)
@@ -103,6 +104,7 @@ describe('modal', () => {
103
104
})
104
105
105
106
expect(wrapper.isVueInstance()).toBe(true)
107
+
106
108
await waitNT(wrapper.vm)
107
109
108
110
expect(wrapper.isEmpty()).toBe(true)
@@ -127,9 +129,6 @@ describe('modal', () => {
127
129
})
128
130
129
131
expect(wrapper.isVueInstance()).toBe(true)
130
-
await waitNT(wrapper.vm)
131
-
await waitRAF()
132
-
await waitNT(wrapper.vm)
133
132
await waitRAF()
134
133
135
134
// Main outer wrapper (has z-index, etc)... The stacker <div>
@@ -186,11 +185,6 @@ describe('modal', () => {
186
185
})
187
186
188
187
expect(wrapper.isVueInstance()).toBe(true)
189
-
await waitNT(wrapper.vm)
190
-
await waitRAF()
191
-
await waitNT(wrapper.vm)
192
-
await waitRAF()
193
-
await waitNT(wrapper.vm)
194
188
await waitRAF()
195
189
196
190
expect(wrapper.isEmpty()).toBe(true)
@@ -208,10 +202,6 @@ describe('modal', () => {
208
202
// Destroy modal
209
203
wrapper.destroy()
210
204
211
-
await waitNT(wrapper.vm)
212
-
await waitRAF()
213
-
await waitNT(wrapper.vm)
214
-
await waitRAF()
215
205
await waitNT(wrapper.vm)
216
206
await waitRAF()
217
207
@@ -235,10 +225,7 @@ describe('modal', () => {
235
225
})
236
226
237
227
expect(wrapper.isVueInstance()).toBe(true)
238
-
await waitNT(wrapper.vm)
239
-
await waitRAF()
240
-
await waitNT(wrapper.vm)
241
-
await waitRAF()
228
+
242
229
await waitNT(wrapper.vm)
243
230
await waitRAF()
244
231
@@ -268,8 +255,6 @@ describe('modal', () => {
268
255
await waitRAF()
269
256
await waitNT(wrapper.vm)
270
257
await waitRAF()
271
-
await waitNT(wrapper.vm)
272
-
await waitRAF()
273
258
274
259
expect($modal.attributes('aria-hidden')).toBeDefined()
275
260
expect($modal.attributes('aria-hidden')).toEqual('true')
@@ -293,7 +278,6 @@ describe('modal', () => {
293
278
})
294
279
295
280
expect(wrapper.isVueInstance()).toBe(true)
296
-
await waitNT(wrapper.vm)
297
281
298
282
// Modal title
299
283
const $title = wrapper.find('.modal-title')
@@ -441,6 +425,7 @@ describe('modal', () => {
441
425
442
426
// Try and close modal (but we prevent it)
443
427
$close.trigger('click')
428
+
await waitNT(wrapper.vm)
444
429
expect(trigger).toEqual('headerclose')
445
430
expect(evt).toBeInstanceOf(BvModalEvent)
446
431
@@ -457,6 +442,7 @@ describe('modal', () => {
457
442
trigger = null
458
443
evt = null
459
444
$close.trigger('click')
445
+
await waitNT(wrapper.vm)
460
446
expect(trigger).toEqual('headerclose')
461
447
expect(evt).toBeInstanceOf(BvModalEvent)
462
448
@@ -522,6 +508,7 @@ describe('modal', () => {
522
508
523
509
// Try and close modal (but we prevent it)
524
510
$ok.trigger('click')
511
+
await waitNT(wrapper.vm)
525
512
expect(trigger).toEqual('ok')
526
513
527
514
await waitNT(wrapper.vm)
@@ -536,6 +523,7 @@ describe('modal', () => {
536
523
cancelHide = false
537
524
trigger = null
538
525
$cancel.trigger('click')
526
+
await waitNT(wrapper.vm)
539
527
expect(trigger).toEqual('cancel')
540
528
541
529
await waitNT(wrapper.vm)
@@ -593,6 +581,7 @@ describe('modal', () => {
593
581
594
582
// Try and close modal via ESC
595
583
$modal.trigger('keydown.esc')
584
+
await waitNT(wrapper.vm)
596
585
expect(trigger).toEqual('esc')
597
586
598
587
await waitNT(wrapper.vm)
@@ -651,6 +640,7 @@ describe('modal', () => {
651
640
652
641
// Try and close modal via click out
653
642
$modal.trigger('click')
643
+
await waitNT(wrapper.vm)
654
644
expect(trigger).toEqual('backdrop')
655
645
656
646
await waitNT(wrapper.vm)
@@ -1211,14 +1201,12 @@ describe('modal', () => {
1211
1201
// Try and set focusin on external button
1212
1202
$button.trigger('focusin')
1213
1203
await waitNT(wrapper.vm)
1214
-
await waitNT(wrapper.vm)
1215
1204
expect(document.activeElement).not.toBe($button.element)
1216
1205
expect(document.activeElement).toBe($content.element)
1217
1206
1218
1207
// Try and set focusin on external button
1219
1208
$button.trigger('focus')
1220
1209
await waitNT(wrapper.vm)
1221
-
await waitNT(wrapper.vm)
1222
1210
expect(document.activeElement).not.toBe($button.element)
1223
1211
expect(document.activeElement).toBe($content.element)
1224
1212
@@ -1235,7 +1223,6 @@ describe('modal', () => {
1235
1223
$bottomTrap.trigger('focusin')
1236
1224
$bottomTrap.trigger('focus')
1237
1225
await waitNT(wrapper.vm)
1238
-
await waitNT(wrapper.vm)
1239
1226
expect(document.activeElement).not.toBe($bottomTrap.element)
1240
1227
expect(document.activeElement).not.toBe($content.element)
1241
1228
// The close (x) button (first tabable in modal) should be focused
@@ -1254,7 +1241,6 @@ describe('modal', () => {
1254
1241
$topTrap.trigger('focusin')
1255
1242
$topTrap.trigger('focus')
1256
1243
await waitNT(wrapper.vm)
1257
-
await waitNT(wrapper.vm)
1258
1244
expect(document.activeElement).not.toBe($topTrap.element)
1259
1245
expect(document.activeElement).not.toBe($bottomTrap.element)
1260
1246
expect(document.activeElement).not.toBe($content.element)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4