Skip to content
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

Merged
merged 5 commits into from
Oct 21, 2017
Merged

Guide: getting-started.md #8

merged 5 commits into from
Oct 21, 2017

Conversation

Yaty
Copy link

@Yaty Yaty commented Oct 14, 2017

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 :)

@Yaty Yaty self-assigned this Oct 14, 2017
@Kocal Kocal self-requested a review October 15, 2017 06:15
@MachinisteWeb MachinisteWeb self-requested a review October 16, 2017 12:28
Copy link
Member

@MachinisteWeb MachinisteWeb left a 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 !


```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
Copy link
Member

@MachinisteWeb MachinisteWeb Oct 16, 2017

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


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.
Copy link
Member

Choose a reason for hiding this comment

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

retournés dans un ?

Copy link
Member

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 ?

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
Copy link
Member

@MachinisteWeb MachinisteWeb Oct 16, 2017

Choose a reason for hiding this comment

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

`wrapper.vm`


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.
Copy link
Member

Choose a reason for hiding this comment

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

est de vérifier

Copy link
Member

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é »

Copy link
Author

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 !

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
Copy link
Member

Choose a reason for hiding this comment

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

aussi


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.
Copy link
Member

Choose a reason for hiding this comment

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

causés


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.
Copy link
Member

Choose a reason for hiding this comment

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

besoin


*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.*
Copy link
Member

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.


*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.*
Copy link
Member

@MachinisteWeb MachinisteWeb Oct 16, 2017

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 :)

Copy link
Member

@MachinisteWeb MachinisteWeb left a 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 :)


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.
Copy link
Member

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 ?


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.
Copy link
Member

@MachinisteWeb MachinisteWeb Oct 17, 2017

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)

Copy link

Choose a reason for hiding this comment

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

@haeresis & @forresst

C'est pas "d'éventuels"?

Copy link

@forresst forresst left a 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


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 :

Choose a reason for hiding this comment

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

démontration => démonstration

Copy link

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


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.

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

// 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 !

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


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.

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.


### Simulating User Interaction
### Simuler des interactions utilisateur

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


- 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)

Choose a reason for hiding this comment

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

Intégrer => Intégrez


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 :
Copy link

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

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
Copy link

Choose a reason for hiding this comment

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

"élément"


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.
Copy link

Choose a reason for hiding this comment

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

@haeresis & @forresst

C'est pas "d'éventuels"?


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 :
Copy link

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

@MachinisteWeb MachinisteWeb merged commit 43d251c into vuejs-fr:working Oct 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants