File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1436,7 +1436,7 @@ isVisible(): boolean
1436
1436
**Details:**
1437
1437
1438
1438
::: warning
1439
- ` isVisible ()` only works correctly if the wrapper is attached to the DOM using [ ` attachTo ` ](#attachto )
1439
+ ` isVisible ()` only works correctly if the wrapper is attached to the DOM using [ ` attachTo ` ](#attachTo )
1440
1440
:::
1441
1441
1442
1442
` ` ` js
@@ -1445,9 +1445,11 @@ const Component = {
1445
1445
}
1446
1446
1447
1447
test (' isVisible' , () => {
1448
- const wrapper = mount (Component )
1448
+ const wrapper = mount (Component , {
1449
+ attachTo: document .body
1450
+ });
1449
1451
1450
- expect(wrapper.find(' span' ).isVisible()).toBe(false )
1452
+ expect(wrapper.find(' span' ).isVisible()).toBe(false );
1451
1453
})
1452
1454
` ` `
1453
1455
Original file line number Diff line number Diff line change @@ -1429,13 +1429,19 @@ isVisible(): boolean
1429
1429
1430
1430
** Utilisation & nbsp ;:**
1431
1431
1432
+ ::: warning
1433
+ ` isVisible() ` ne fonctionne correctement que si le wrapper est attach é au DOM en utilisant [` attachTo ` ](#attachTo )
1434
+ :::
1435
+
1432
1436
` ` ` js
1433
1437
const Component = {
1434
1438
template: ` < div v - show = " false" > <span /></div >` ,
1435
1439
};
1436
1440
1437
1441
test('isVisible', () => {
1438
- const wrapper = mount(Component);
1442
+ const wrapper = mount(Component, {
1443
+ attachTo: document.body
1444
+ });
1439
1445
1440
1446
expect(wrapper.find('span').isVisible()).toBe(false);
1441
1447
});
You can’t perform that action at this time.
0 commit comments