File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1436,7 +1436,7 @@ isVisible(): boolean
14361436**Details:**
14371437
14381438::: 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 )
14401440:::
14411441
14421442` ` ` js
@@ -1445,9 +1445,11 @@ const Component = {
14451445}
14461446
14471447test (' isVisible' , () => {
1448- const wrapper = mount (Component )
1448+ const wrapper = mount (Component , {
1449+ attachTo: document .body
1450+ });
14491451
1450- expect(wrapper.find(' span' ).isVisible()).toBe(false )
1452+ expect(wrapper.find(' span' ).isVisible()).toBe(false );
14511453})
14521454` ` `
14531455
Original file line number Diff line number Diff line change @@ -1429,13 +1429,19 @@ isVisible(): boolean
14291429
14301430** Utilisation & nbsp ;:**
14311431
1432+ ::: warning
1433+ ` isVisible() ` ne fonctionne correctement que si le wrapper est attach é au DOM en utilisant [` attachTo ` ](#attachTo )
1434+ :::
1435+
14321436` ` ` js
14331437const Component = {
14341438 template: ` < div v - show = " false" > <span /></div >` ,
14351439};
14361440
14371441test('isVisible', () => {
1438- const wrapper = mount(Component);
1442+ const wrapper = mount(Component, {
1443+ attachTo: document.body
1444+ });
14391445
14401446 expect(wrapper.find('span').isVisible()).toBe(false);
14411447});
You can’t perform that action at this time.
0 commit comments