-
Notifications
You must be signed in to change notification settings - Fork 2
Guide: dom-events.md #19
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
Conversation
Première traduction
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.
Top @mdartic !
Le gros de ce que j'ai vu c'est la ponctuation FR, ne pas traduire les propriétés, méthode et nom de fichir et utiliser la graphie post 1990 :)
Merci pour la trad !
docs/en/guides/README.md
Outdated
@@ -2,7 +2,7 @@ | |||
|
|||
* [Commencer](./getting-started.md) | |||
* [Astuces](./common-tips.md) | |||
* [Mouse, Key and other DOM Events (EN)](guides/dom-events.md) | |||
* [Mouse, Key and other DOM Events (EN)](./dom-events.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.
Tu peux retirer le EN :) Et traduire la ligne :)
docs/en/guides/dom-events.md
Outdated
@@ -1,16 +1,17 @@ | |||
# Testing Key, Mouse and other DOM events | |||
# Tester le clavier, la souris et les autres événements DOM |
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.
On utilise la graphie post 1990. Donc
évèments
docs/en/guides/dom-events.md
Outdated
|
||
The `Wrapper` expose a `trigger` method. It can be used to trigger DOM events. | ||
|
||
Le `Wrapper` expose une méthode `trigger` method. Elle peut être utilisée pour déclencher des événements du DOM. |
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.
method.
docs/en/guides/dom-events.md
Outdated
|
||
```js | ||
const wrapper = mount(MyButton) | ||
|
||
wrapper.trigger('click') | ||
``` | ||
|
||
You should be aware, that find returns a wrapper as well. Assuming `MyComponent` contains a button, the following code clicks the button. | ||
Vous devez être au courant que la méthode find retourne un wrapper aussi. Partant du principe que `MyComponent` contient un bouton, le code suivant clique sur le bouton. |
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.
`find`
(Tu peux PR l'original)
docs/en/guides/dom-events.md
Outdated
@@ -20,9 +21,9 @@ wrapper.find('button').trigger('click') | |||
|
|||
## Options | |||
|
|||
The trigger method takes an optional `options` object. The properties in the `options` object are added to the Event. | |||
La méthode trigger prend en paramètre optionnel l'objet `options`. Les propriétés de l'objet `options` sont ajoutées à l'événement Event. |
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 méthode `trigger`
sont ajoutées à l'évènement Event
.
ou
sont ajoutées à l'évènement.
docs/en/guides/dom-events.md
Outdated
it('Quantity is zero by default', () => { | ||
const wrapper = mount(QuantityComponent) | ||
expect(wrapper.vm.quantity).to.equal(0) | ||
describe('Tests événement clavier', () => { |
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.
évènement
docs/en/guides/dom-events.md
Outdated
expect(wrapper.vm.quantity).to.equal(0) | ||
describe('Tests événement clavier', () => { | ||
it('La quantité est zéro par défaut', () => { | ||
const wrapper = mount(QuantiteComponent) |
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.
Remettre en EN et le reste du code (garder en FR ce qui est dans it(
docs/en/guides/dom-events.md
Outdated
it('Escape sets quantity to 0', () => { | ||
const wrapper = mount(QuantityComponent) | ||
wrapper.vm.quantity = 5 | ||
it('La touche Echap positionne la quantité à 0', () => { |
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 touche Échap
docs/en/guides/dom-events.md
Outdated
}) | ||
}) | ||
|
||
``` | ||
|
||
**Limitations** | ||
|
||
A key name after the dot `keydown.up` is translated to a `keyCode`. This is supported for the following names: | ||
Un nom de touche après le point `keydown.up` est traduit vers un `keyCode`. Cela est supporté pour les noms suivant: |
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.
les noms suivant : (espace avant les :
)
docs/en/guides/dom-events.md
Outdated
|
||
* enter, tab, delete, esc, space, up, down, left, right | ||
|
||
## Important | ||
|
||
vue-test-utils triggers event synchronously. Consequently, `vue.nextTick` is not required. | ||
vue-test-utils déclenche les événements de façon synchrone. Par conséquent, `vue.nextTick` n'est pas requis. |
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.
évènements
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.
Niveau orthographe c'est plutôt ok pour moi! Juste événements à changer pour évènements comme souligné par @haeresis
Le paramètre de this.callMe('yes') est une chaîne de caractères, donc on le traduit. |
T'en fais pas, je m'en occupe après merge, j'ai pas le contexte complet sur mon mobile, j'imagine qu'en fait c'est plus subtile ?! |
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.
Voilà ma review, bonne trad :)
docs/en/guides/dom-events.md
Outdated
|
||
```js | ||
const wrapper = mount(MyButton) | ||
|
||
wrapper.trigger('click') | ||
``` | ||
|
||
You should be aware, that find returns a wrapper as well. Assuming `MyComponent` contains a button, the following code clicks the button. | ||
Vous devez être au courant que la méthode `find` retourne un wrapper aussi. Partant du principe que `MyComponent` contient un bouton, le code suivant clique sur le bouton. |
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.
retourne aussi un wrapper.
En partant du principe
docs/en/guides/dom-events.md
Outdated
|
||
**Component under test** | ||
**Componsant à tester** |
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.
Composant
docs/en/guides/dom-events.md
Outdated
describe('Click event', () => { | ||
it('Click on yes button calls our method with argument "yes"', () => { | ||
describe('Évènement click', () => { | ||
it('Cliquer sur le bouton oui appelle notre méthode avec l\'argument "yes"', () => { |
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.
"Cliquer sur le bouton oui appelle notre méthode avec l'argument 'yes'", on avait fait ça pour les autres fichiers afin d'éviter les backslashs
Done |
Pour moi c'est tout bon, le libélé du bouton cliqué est bien « Oui » |
Traduction de la partie dom-events, merci de relire !