Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
491e7db5
Commit
491e7db5
authored
Aug 21, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
26702212
fa1ee60f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
doc/development/testing_guide/frontend_testing.md
doc/development/testing_guide/frontend_testing.md
+8
-8
No files found.
doc/development/testing_guide/frontend_testing.md
View file @
491e7db5
...
...
@@ -232,7 +232,7 @@ module. GitLab has a custom `spyOnDependency` method which utilizes
[
babel-plugin-rewire
](
https://github.com/speedskater/babel-plugin-rewire
)
to
achieve this. It can be used like so:
```
j
s
```
j
avascript
// my_module.js
import
{
visitUrl
}
from
'
~/lib/utils/url_utility
'
;
...
...
@@ -241,7 +241,7 @@ export default function doSomething() {
}
```
```
j
s
```
j
avascript
// my_module_spec.js
import
doSomething
from
'
~/my_module
'
;
...
...
@@ -847,7 +847,7 @@ See also the [RSpec testing guidelines](../testing_guide/best_practices.md#rspec
A
`:js`
flag is added to the test to make sure the full environment is loaded.
```
js
```
ruby
scenario
'successfully'
,
:js
do
sign_in
(
create
(
:admin
))
end
...
...
@@ -857,7 +857,7 @@ The steps of each test are written using capybara methods ([documentation](https
Bear in mind
<abbr
title=
"XMLHttpRequest"
>
XHR
</abbr>
calls might require you to use
`wait_for_requests`
in between steps, like so:
```
r
spec
```
r
uby
find
(
'.form-control'
).
native
.
send_keys
(
:enter
)
wait_for_requests
...
...
@@ -871,7 +871,7 @@ expect(page).not_to have_selector('.card')
We have a helper available to make testing actions easier, as per
[
official documentation
](
https://vuex.vuejs.org/guide/testing.html
)
:
```
j
s
```
j
avascript
testAction
(
actions
.
actionName
,
// action
{
},
// params to be passed to action
...
...
@@ -899,7 +899,7 @@ To make mounting a Vue component easier and more readable, we have a few helpers
Examples of usage:
```
j
s
```
j
avascript
beforeEach
(()
=>
{
vm
=
createComponentWithStore
(
Component
,
store
);
...
...
@@ -909,7 +909,7 @@ beforeEach(() => {
});
```
```
j
s
```
j
avascript
beforeEach
(()
=>
{
vm
=
mountComponentWithStore
(
Component
,
{
el
:
'
#dummy-element
'
,
...
...
@@ -921,7 +921,7 @@ beforeEach(() => {
Don't forget to clean up:
```
j
s
```
j
avascript
afterEach
(()
=>
{
vm
.
$destroy
();
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment