-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guide: getting-started.md #8
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellente traduction ! Mes retours !
docs/en/guides/getting-started.md
Outdated
|
||
```js | ||
// test.js | ||
|
||
// Import the mount() method from the test utils | ||
// and the component you want to test | ||
// Importe la méthode mount() depuis test utils |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`mount()`
hésite pas à PR l'originale
docs/en/guides/getting-started.md
Outdated
|
||
Mounted components are returned inside a [Wrapper](./api/wrapper.md), which exposes many convenience methods for manipulating, traversing and querying the underlying Vue component instance. | ||
Les composants montés sont retournés sous un [Wrapper](./api/wrapper.md), qui expose en quantité des méthodes pour manipuler, traverser et interroger l'instance du composant Vue en question. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retournés dans un ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu utilise un nom de titre pour justifier la majuscule à wrapper dans se cas. Comme c'est discutable (car tu ne mets pas clairement en évidence que tu te réfères au titre d'une section, même s'il y a un lien :) et donc que c'est discutable XD), je pense que le mieux est de sois écrire wrapper avec une minuscule ou alors de l'encadrer avec des ` pour faire référence à son objet.
Qu'en penses-tu ?
docs/en/guides/getting-started.md
Outdated
const wrapper = mount(Counter) | ||
|
||
// You can access the actual Vue instance via wrapper.vm | ||
// On accède à l'instance actuelle de Vue via wrapper.vm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`wrapper.vm`
docs/en/guides/getting-started.md
Outdated
|
||
Now that we have the wrapper, the first thing we can do is to verify that the rendered HTML output of the component matches what is expected. | ||
Nous avons maintenant un wrapper, la première chose que l'on peut faire et de vérifier que le contenu du rendu HTML du composant correspond à ce qu'il est sensé être. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
est de vérifier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
censé car peut être remplacé par « supposé »
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ouch merci elles sont pas belles !
docs/en/guides/getting-started.md
Outdated
expect(wrapper.html()).toContain('<span class="count">0</span>') | ||
}) | ||
|
||
// it's also easy to check for the existence of elements | ||
it('has a button', () => { | ||
// c'est auss très simple de vérifier qu'un élement existe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aussi
docs/en/guides/getting-started.md
Outdated
|
||
Vue batches pending DOM updates and applies them asynchronously to prevent unnecessary re-renders caused by multiple data mutations. This is why in practice we often have to use `Vue.nextTick` to wait until Vue has performed the actual DOM update after we trigger some state change. | ||
Vue groupe les mises à jour du DOM en attentes puis les appliquent de façon asynchrone pour prévenir d'éventuel multiples rendus causé par de multiples mutations de données. C'est pourquoi en pratique, on a souvent à utiliser `Vue.nextTick` pour attendre que Vue modifie le DOM actuel après avoir lancé quelques changements d'état. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
causés
docs/en/guides/getting-started.md
Outdated
|
||
To simplify usage, `vue-test-utils` applies all updates synchronously so you don't need to use `Vue.nextTick` to wait for DOM updates in your tests. | ||
Pour simplifier cela, `vue-test-utils` applique toutes les mises à jour de façon synchrone afin que vous n'ayez pas besin d'utiliser `Vue.nextTick` pour attendre des mises à jour du DOM dans vos tests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
besoin
docs/en/guides/getting-started.md
Outdated
|
||
*Note: `nextTick` is still necessary when you need to explictly advance the event loop, for operations such as asynchronous callbacks or promise resolution.* | ||
*Note : `nextTick` est encore nécessaire quand vous souhaitez explicitement faire avancer la boucle des événements, pour des opérations telles que des fonctions de rappel ou des résolutions de promise.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je mettrais est toujours plutôt que est encore.
docs/en/guides/getting-started.md
Outdated
|
||
*Note: `nextTick` is still necessary when you need to explictly advance the event loop, for operations such as asynchronous callbacks or promise resolution.* | ||
*Note : `nextTick` est encore nécessaire quand vous souhaitez explicitement faire avancer la boucle des événements, pour des opérations telles que des fonctions de rappel ou des résolutions de promise.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
résolutions de promesses (je préfère)
résolutions de `Promise` (j'aime moins)
Au choix :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'en est retrouvé une :)
docs/en/guides/getting-started.md
Outdated
|
||
Mounted components are returned inside a [Wrapper](./api/wrapper.md), which exposes many convenience methods for manipulating, traversing and querying the underlying Vue component instance. | ||
Les composants montés sont retournés sous un [Wrapper](./api/wrapper.md), qui expose en quantité des méthodes pour manipuler, traverser et interroger l'instance du composant Vue en question. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tu utilise un nom de titre pour justifier la majuscule à wrapper dans se cas. Comme c'est discutable (car tu ne mets pas clairement en évidence que tu te réfères au titre d'une section, même s'il y a un lien :) et donc que c'est discutable XD), je pense que le mieux est de sois écrire wrapper avec une minuscule ou alors de l'encadrer avec des ` pour faire référence à son objet.
Qu'en penses-tu ?
docs/en/guides/getting-started.md
Outdated
|
||
Vue batches pending DOM updates and applies them asynchronously to prevent unnecessary re-renders caused by multiple data mutations. This is why in practice we often have to use `Vue.nextTick` to wait until Vue has performed the actual DOM update after we trigger some state change. | ||
Vue groupe les mises à jour du DOM en attentes puis les appliquent de façon asynchrone pour prévenir d'éventuel multiples rendus causés par de multiples mutations de données. C'est pourquoi en pratique, on a souvent à utiliser `Vue.nextTick` pour attendre que Vue modifie le DOM actuel après avoir lancé quelques changements d'état. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
éventuelles éventuels (effectivement c'est « un rendu » comme @rspt le fait remarquer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quelques erreurs et remarques
docs/en/guides/getting-started.md
Outdated
|
||
To get a quick taste of using `vue-test-utils`, clone our demo repository with basic setup and install the dependencies: | ||
Pour avoir un rapide avant goût de `vue-test-utils`, clonez notre répertoire de démontration avec l'installation de base puis installez les dépendances : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
démontration => démonstration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"avant-gout" -> graphie rectifiée
docs/en/guides/getting-started.md
Outdated
|
||
Mounted components are returned inside a [Wrapper](./api/wrapper.md), which exposes many convenience methods for manipulating, traversing and querying the underlying Vue component instance. | ||
Les composants montés sont retournés dans un [Wrapper](./api/wrapper.md), qui expose en quantité des méthodes pour manipuler, traverser et interroger l'instance du composant Vue en question. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qui expose en quantité des méthodes => qui expose de nombreuses méthodes
docs/en/guides/getting-started.md
Outdated
// To inspect the wrapper deeper just log it to the console | ||
// and your adventure with the vue-test-utils begins | ||
// Pour inspecter le wrapper en profondeur, utilisez console | ||
// puis l'aventure avec vue-test-utils commence ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
puis l'aventure => puis votre aventure
docs/en/guides/getting-started.md
Outdated
|
||
Now that we have the wrapper, the first thing we can do is to verify that the rendered HTML output of the component matches what is expected. | ||
Nous avons maintenant un wrapper, la première chose que l'on peut faire est de vérifier que le contenu du rendu HTML du composant correspond à ce qu'il est censé être. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
la première chose que l'on peut faire est de vérifier => la première chose que l'on peut faire, c'est de vérifier
correspond à ce qu'il est censé être. => correspond à celui attendu.
docs/en/guides/getting-started.md
Outdated
|
||
### Simulating User Interaction | ||
### Simuler des interactions utilisateur |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simuler des interactions utilisateur => Simulation de l'interaction utilisateur
docs/en/guides/getting-started.md
Outdated
|
||
- Integrate `vue-test-utils` into your project by [choosing a test runner](./choosing-a-test-runner.md) | ||
- Learn more about [common techniques when writing tests](./common-tips.md) | ||
- Intégrer `vue-test-utils` dans votre projet en [choisissant votre lanceur de tests](./choosing-a-test-runner.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intégrer => Intégrez
docs/en/guides/getting-started.md
Outdated
|
||
To get a quick taste of using `vue-test-utils`, clone our demo repository with basic setup and install the dependencies: | ||
Pour avoir un rapide avant goût de `vue-test-utils`, clonez notre répertoire de démontration avec l'installation de base puis installez les dépendances : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"avant-gout" -> graphie rectifiée
docs/en/guides/getting-started.md
Outdated
expect(wrapper.html()).toContain('<span class="count">0</span>') | ||
}) | ||
|
||
// it's also easy to check for the existence of elements | ||
it('has a button', () => { | ||
// c'est aussi très simple de vérifier qu'un élement existe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"élément"
docs/en/guides/getting-started.md
Outdated
|
||
Vue batches pending DOM updates and applies them asynchronously to prevent unnecessary re-renders caused by multiple data mutations. This is why in practice we often have to use `Vue.nextTick` to wait until Vue has performed the actual DOM update after we trigger some state change. | ||
Vue groupe les mises à jour du DOM en attentes puis les appliquent de façon asynchrone pour prévenir d'éventuel multiples rendus causés par de multiples mutations de données. C'est pourquoi en pratique, on a souvent à utiliser `Vue.nextTick` pour attendre que Vue modifie le DOM actuel après avoir lancé quelques changements d'état. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docs/en/guides/getting-started.md
Outdated
|
||
To get a quick taste of using `vue-test-utils`, clone our demo repository with basic setup and install the dependencies: | ||
Pour avoir un rapide avant-goût de `vue-test-utils`, clonez notre répertoire de démonstration avec l'installation de base puis installez les dépendances : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"avant-gout" -> graphie rectifiée
Traduction du fichier getting-started.md
Je n'ai fait qu'une seule relecture, ça risque d'être un peu brut et pas forcement trop agréable à lire. A voir :)