-
Notifications
You must be signed in to change notification settings - Fork 668
[Doc FR]: guides/*.md
translated.
#159
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ee0b51f
Add french part
MachinisteWeb 3906f09
Message for part still not translated.
MachinisteWeb 4f6a89f
Merge remote-tracking branch 'upstream/dev' into dev
MachinisteWeb 1920f4b
Last changes added
MachinisteWeb b50a3e6
Review from original repo
MachinisteWeb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
* [English](en/) | ||
* [Français](fr/) | ||
* [日本語](ja/) | ||
* [简体中文](zh-cn/) | ||
* [Portuguese (Brazil)](pt-br/) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# vue-test-utils | ||
|
||
`vue-test-utils` est la bibliothèque officielle de tests unitaires pour Vue.js. | ||
|
||
## Table of Contents | ||
|
||
* [Guides](guides/README.md) | ||
* [Commencer](guides/getting-started.md) | ||
* [Astuces](guides/common-tips.md) | ||
* [La souris, le clavier et les autres évènements DOM](guides/dom-events.md) | ||
* [Choisir un lanceur de tests](guides/choosing-a-test-runner.md) | ||
* [Tester des composants monofichiers avec Jest](guides/testing-SFCs-with-jest.md) | ||
* [Tester des composants monofichiers avec Mocha et webpack](guides/testing-SFCs-with-mocha-webpack.md) | ||
* [Utiliser avec Vue Router](guides/using-with-vue-router.md) | ||
* [Utiliser avec Vuex](guides/using-with-vuex.md) | ||
* [API](api/README.md) | ||
* [mount](api/mount.md) | ||
* [shallow](api/shallow.md) | ||
* [Options de montage](api/options.md) | ||
- [context](api/options.md#context) | ||
- [slots](api/options.md#slots) | ||
- [stubs](api/options.md#stubs) | ||
- [mocks](api/options.md#mocks) | ||
- [localVue](api/options.md#localvue) | ||
- [attachToDocument](api/options.md#attachtodocument) | ||
- [attrs](api/options.md#attrs) | ||
- [listeners](api/options.md#listeners) | ||
- [clone](api/options.md#clone) | ||
* [Wrapper](api/wrapper/README.md) | ||
* [contains](api/wrapper/contains.md) | ||
* [emitted](api/wrapper/emitted.md) | ||
* [emittedByOrder](api/wrapper/emittedByOrder.md) | ||
* [find](api/wrapper/find.md) | ||
* [findAll](api/wrapper/findAll.md) | ||
* [hasAttribute](api/wrapper/hasAttribute.md) | ||
* [hasClass](api/wrapper/hasClass.md) | ||
* [hasProp](api/wrapper/hasProp.md) | ||
* [hasStyle](api/wrapper/hasStyle.md) | ||
* [html](api/wrapper/html.md) | ||
* [is](api/wrapper/is.md) | ||
* [isEmpty](api/wrapper/isEmpty.md) | ||
* [isVueInstance](api/wrapper/isVueInstance.md) | ||
* [name](api/wrapper/name.md) | ||
* [setComputed](api/wrapper/setComputed.md) | ||
* [setData](api/wrapper/setData.md) | ||
* [setMethods](api/wrapper/setMethods.md) | ||
* [setProps](api/wrapper/setProps.md) | ||
* [text](api/wrapper/text.md) | ||
* [trigger](api/wrapper/trigger.md) | ||
* [update](api/wrapper/update.md) | ||
* [destroy](api/wrapper/destroy.md) | ||
* [WrapperArray](api/wrapper-array/README.md) | ||
* [at](api/wrapper-array/at.md) | ||
* [contains](api/wrapper-array/contains.md) | ||
* [hasAttribute](api/wrapper-array/hasAttribute.md) | ||
* [hasClass](api/wrapper-array/hasClass.md) | ||
* [hasProp](api/wrapper-array/hasProp.md) | ||
* [hasStyle](api/wrapper-array/hasStyle.md) | ||
* [is](api/wrapper-array/is.md) | ||
* [isEmpty](api/wrapper-array/isEmpty.md) | ||
* [isVueInstance](api/wrapper-array/isVueInstance.md) | ||
* [setComputed](api/wrapper-array/setComputed.md) | ||
* [setData](api/wrapper-array/setData.md) | ||
* [setMethods](api/wrapper-array/setMethods.md) | ||
* [setProps](api/wrapper-array/setProps.md) | ||
* [trigger](api/wrapper-array/trigger.md) | ||
* [update](api/wrapper-array/update.md) | ||
* [destroy](api/wrapper-array/destroy.md) | ||
* [components](api/components/README.md) | ||
* [TransitionStub](api/components/TransitionStub.md) | ||
* [TransitionGroupStub](api/components/TransitionGroupStub.md) | ||
* [Selecteurs](api/selectors.md) | ||
* [createLocalVue](api/createLocalVue.md) | ||
* [config](api/config.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
## Table of Contents | ||
|
||
* [Guides](guides/README.md) | ||
* [Commencer](guides/getting-started.md) | ||
* [Astuces](guides/common-tips.md) | ||
* [Mouse, Key and other DOM Events (EN)](guides/dom-events.md) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. idem |
||
* [Choisir un lanceur de tests](guides/choosing-a-test-runner.md) | ||
* [Tester des composants monofichiers avec Jest](guides/testing-SFCs-with-jest.md) | ||
* [Tester des composants monofichiers avec Mocha et webpack](guides/testing-SFCs-with-mocha-webpack.md) | ||
* [Utiliser avec Vue Router](guides/using-with-vue-router.md) | ||
* [Utiliser avec Vuex](guides/using-with-vuex.md) | ||
* [API](api/README.md) | ||
* [mount](api/mount.md) | ||
* [shallow](api/shallow.md) | ||
* [Options de montage](api/options.md) | ||
- [context](api/options.md#context) | ||
- [slots](api/options.md#slots) | ||
- [stubs](api/options.md#stubs) | ||
- [mocks](api/options.md#mocks) | ||
- [localVue](api/options.md#localvue) | ||
- [attachToDocument](api/options.md#attachtodocument) | ||
- [attrs](api/options.md#attrs) | ||
- [listeners](api/options.md#listeners) | ||
- [clone](api/options.md#clone) | ||
* [Wrapper](api/wrapper/README.md) | ||
* [contains](api/wrapper/contains.md) | ||
* [emitted](api/wrapper/emitted.md) | ||
* [emittedByOrder](api/wrapper/emittedByOrder.md) | ||
* [find](api/wrapper/find.md) | ||
* [findAll](api/wrapper/findAll.md) | ||
* [hasAttribute](api/wrapper/hasAttribute.md) | ||
* [hasClass](api/wrapper/hasClass.md) | ||
* [hasProp](api/wrapper/hasProp.md) | ||
* [hasStyle](api/wrapper/hasStyle.md) | ||
* [html](api/wrapper/html.md) | ||
* [is](api/wrapper/is.md) | ||
* [isEmpty](api/wrapper/isEmpty.md) | ||
* [isVueInstance](api/wrapper/isVueInstance.md) | ||
* [name](api/wrapper/name.md) | ||
* [setComputed](api/wrapper/setComputed.md) | ||
* [setData](api/wrapper/setData.md) | ||
* [setMethods](api/wrapper/setMethods.md) | ||
* [setProps](api/wrapper/setProps.md) | ||
* [text](api/wrapper/text.md) | ||
* [trigger](api/wrapper/trigger.md) | ||
* [update](api/wrapper/update.md) | ||
* [destroy](api/wrapper/destroy.md) | ||
* [WrapperArray](api/wrapper-array/README.md) | ||
* [at](api/wrapper-array/at.md) | ||
* [contains](api/wrapper-array/contains.md) | ||
* [hasAttribute](api/wrapper-array/hasAttribute.md) | ||
* [hasClass](api/wrapper-array/hasClass.md) | ||
* [hasProp](api/wrapper-array/hasProp.md) | ||
* [hasStyle](api/wrapper-array/hasStyle.md) | ||
* [is](api/wrapper-array/is.md) | ||
* [isEmpty](api/wrapper-array/isEmpty.md) | ||
* [isVueInstance](api/wrapper-array/isVueInstance.md) | ||
* [setComputed](api/wrapper-array/setComputed.md) | ||
* [setData](api/wrapper-array/setData.md) | ||
* [setMethods](api/wrapper-array/setMethods.md) | ||
* [setProps](api/wrapper-array/setProps.md) | ||
* [trigger](api/wrapper-array/trigger.md) | ||
* [update](api/wrapper-array/update.md) | ||
* [destroy](api/wrapper-array/destroy.md) | ||
* [components](api/components/README.md) | ||
* [TransitionStub](api/components/TransitionStub.md) | ||
* [TransitionGroupStub](api/components/TransitionGroupStub.md) | ||
* [Selectors](api/selectors.md) | ||
* [createLocalVue](api/createLocalVue.md) | ||
* [config](api/config.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# API | ||
|
||
* [mount (EN)](./mount.md) | ||
* [shallow (EN)](./shallow.md) | ||
* [Options de montage (EN)](./options.md) | ||
- [context (EN)](./options.md#context) | ||
- [slots (EN)](./options.md#slots) | ||
- [stubs (EN)](./options.md#stubs) | ||
- [mocks (EN)](./options.md#mocks) | ||
- [localVue (EN)](./options.md#localvue) | ||
- [attachToDocument (EN)](./options.md#attachtodocument) | ||
- [attrs (EN)](./options.md#attrs) | ||
- [listeners (EN)](./options.md#listeners) | ||
- [clone (EN)](./options.md#clone) | ||
* [Wrapper (EN)](./wrapper/README.md) | ||
* [contains (EN)](./wrapper/contains.md) | ||
* [emitted (EN)](./wrapper/emitted.md) | ||
* [emittedByOrder (EN)](./wrapper/emittedByOrder.md) | ||
* [find (EN)](./wrapper/find.md) | ||
* [findAll (EN)](./wrapper/findAll.md) | ||
* [hasAttribute (EN)](./wrapper/hasAttribute.md) | ||
* [hasClass (EN)](./wrapper/hasClass.md) | ||
* [hasProp (EN)](./wrapper/hasProp.md) | ||
* [hasStyle (EN)](./wrapper/hasStyle.md) | ||
* [html (EN)](./wrapper/html.md) | ||
* [is (EN)](./wrapper/is.md) | ||
* [isEmpty (EN)](./wrapper/isEmpty.md) | ||
* [isVueInstance (EN)](./wrapper/isVueInstance.md) | ||
* [name (EN)](./wrapper/name.md) | ||
* [setComputed](./wrapper/setComputed.md) | ||
* [setData](./wrapper/setData.md) | ||
* [setMethods](./wrapper/setMethods.md) | ||
* [setProps](./wrapper/setProps.md) | ||
* [text](./wrapper/text.md) | ||
* [trigger (EN)](./wrapper/trigger.md) | ||
* [update (EN)](./wrapper/update.md) | ||
* [destroy (EN)](./wrapper/destroy.md) | ||
* [WrapperArray (EN)](./wrapper-array/README.md) | ||
* [at (EN)](./wrapper-array/at.md) | ||
* [contains (EN)](./wrapper-array/contains.md) | ||
* [hasAttribute (EN)](./wrapper-array/hasAttribute.md) | ||
* [hasClass (EN)](./wrapper-array/hasClass.md) | ||
* [hasProp (EN)](./wrapper-array/hasProp.md) | ||
* [hasStyle (EN)](./wrapper-array/hasStyle.md) | ||
* [is (EN)](./wrapper-array/is.md) | ||
* [isEmpty (EN)](./wrapper-array/isEmpty.md) | ||
* [isVueInstance (EN)](./wrapper-array/isVueInstance.md) | ||
* [setComputed (EN)](./wrapper-array/setComputed.md) | ||
* [setData (EN)](./wrapper-array/setData.md) | ||
* [setMethods (EN)](./wrapper-array/setMethods.md) | ||
* [setProps (EN)](./wrapper-array/setProps.md) | ||
* [trigger (EN)](./wrapper-array/trigger.md) | ||
* [update (EN)](./wrapper-array/update.md) | ||
* [destroy (EN)](./wrapper-array/destroy.md) | ||
* [components](./components/README.md) | ||
* [TransitionStub](./components/TransitionStub.md) | ||
* [TransitionGroupStub](./components/TransitionGroupStub.md) | ||
* [createLocalVue (EN)](./createLocalVue.md) | ||
* [Selecteurs (EN)](./selectors.md) | ||
* [config (EN)](./config.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Components | ||
|
||
vue-test-utils includes utility components you can use to stub components. | ||
|
||
[TransitionStub](./TransitionStub.md) and [TransitionGroupStub](./TransitionGroupStub.md) are used to stub `transition` and `transition-group` components by default. You can edit the stubs by editing the config. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# TransitionGroupStub | ||
|
||
A component to stub the `transition-group` wrapper component. Instead of performing transitions asynchronously, it returns the child components synchronously. | ||
|
||
This is set to stub all `transition-group` components by default in the `vue-test-utils` config. To use the built-in `transition-group` wrapper component set `config.stubs['transition-group']` to false: | ||
|
||
```js | ||
import VueTestUtils from 'vue-test-utils' | ||
|
||
VueTestUtils.config.stubs['transition-group'] = false | ||
``` | ||
|
||
To reset it to stub transition components: | ||
|
||
```js | ||
import VueTestUtils, { TransitionGroupStub } from 'vue-test-utils' | ||
|
||
VueTestUtils.config.stubs['transition-group'] = TransitionGroupStub | ||
``` | ||
|
||
To set it as a stub in mounting options: | ||
|
||
```js | ||
import { mount, TransitionGroupStub } from 'vue-test-utils' | ||
|
||
mount(Component, { | ||
stubs: { | ||
'transition-group': TransitionGroupStub | ||
} | ||
}) | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# TransitionStub | ||
|
||
A component to stub the `transition` wrapper component. Instead of performing transitions asynchronously, it returns the child component synchronously. | ||
|
||
This is set to stub all `transition` components by default in the vue-test-utils config. To use the built-in `transition` wrapper component set `config.stubs.transition` to false: | ||
|
||
```js | ||
import VueTestUtils from 'vue-test-utils' | ||
|
||
VueTestUtils.config.stubs.transition = false | ||
``` | ||
|
||
To reset it to stub transition components: | ||
```js | ||
import VueTestUtils, { TransitionStub } from 'vue-test-utils' | ||
|
||
VueTestUtils.config.stubs.transition = TransitionStub | ||
``` | ||
|
||
To set it as a stub in mounting options: | ||
|
||
```js | ||
import { mount, TransitionStub } from 'vue-test-utils' | ||
|
||
mount(Component, { | ||
stubs: { | ||
transition: TransitionStub | ||
} | ||
}) | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Config | ||
|
||
vue-test-utils includes a config object to defined options used by vue-test-utils. | ||
|
||
## `vue-test-utils` Config Options | ||
|
||
### `stubs` | ||
|
||
- type: `Object` | ||
- default: `{ | ||
transition: TransitionStub, | ||
'transition-group': TransitionGroupStub | ||
}` | ||
|
||
Stubs to use in components. These are overwritten by `stubs` passed in the mounting options. | ||
|
||
When passing `stubs` as an array in the mounting options, `config.stubs` are converted to an array, and will stub components with a basic component that returns a div. | ||
|
||
Example: | ||
|
||
```js | ||
import VueTestUtils from 'vue-test-utils' | ||
|
||
VueTestUtils.config.stubs['my-compomnent'] = '<div />' | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# `createLocalVue()` | ||
|
||
- **Returns:** | ||
- `{Component}` | ||
|
||
- **Usage:** | ||
|
||
<p><strong>⚠Cette page est actuellement en cours de traduction française. Vous pouvez repasser plus tard ou <a href="https://github.com/vuejs-fr/vue-test-utils" target="_blank">participer à la traduction</a> de celle-ci dès maintenant !</strong></p><p>`createLocalVue` returns a Vue class for you to add components, mixins and install plugins without polluting the global Vue class.</p> | ||
|
||
Use it with `options.localVue`: | ||
|
||
```js | ||
import { createLocalVue, shallow } from 'vue-test-utils' | ||
import { expect } from 'chai' | ||
import Foo from './Foo.vue' | ||
|
||
const localVue = createLocalVue() | ||
const wrapper = shallow(Foo, { | ||
localVue, | ||
mocks: { foo: true } | ||
}) | ||
expect(wrapper.vm.foo).toBe(true) | ||
|
||
const freshWrapper = shallow(Foo) | ||
expect(freshWrapper.vm.foo).toBe(false) | ||
``` | ||
|
||
- **See also:** [Common Tips](../guides/common-tips.md#applying-global-plugins-and-mixins) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 penseque ça serait bien d'avoir le fichier entier traduit