Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1436,7 +1436,7 @@ isVisible(): boolean
**Details:**

::: warning
`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachto)
`isVisible()` only works correctly if the wrapper is attached to the DOM using [`attachTo`](#attachTo)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch thanks. Can you change this in the french docs as well please?

Copy link
Contributor Author

@matusekma matusekma Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! There is no equivalent in the French docs. I speak some French so I can try to add it. What's your suggestion?

Copy link
Member

@cexbrayat cexbrayat Feb 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it would be great to add the warning there as well 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again @cexbrayat,
sorry for the late change. Could you please rereview my changes? I added the French warning + changed the examples for both languages bacause I think they did not follow the warning.
Thanks

:::

```js
Expand All @@ -1445,9 +1445,11 @@ const Component = {
}

test('isVisible', () => {
const wrapper = mount(Component)
const wrapper = mount(Component, {
attachTo: document.body
});

expect(wrapper.find('span').isVisible()).toBe(false)
expect(wrapper.find('span').isVisible()).toBe(false);
})
```

Expand Down
8 changes: 7 additions & 1 deletion docs/fr/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -1429,13 +1429,19 @@ isVisible(): boolean

**Utilisation :**

::: warning
`isVisible()` ne fonctionne correctement que si le wrapper est attaché au DOM en utilisant [`attachTo`](#attachTo)
:::

```js
const Component = {
template: `<div v-show="false"><span /></div>`,
};

test('isVisible', () => {
const wrapper = mount(Component);
const wrapper = mount(Component, {
attachTo: document.body
});

expect(wrapper.find('span').isVisible()).toBe(false);
});
Expand Down