Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
admin-fe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Angelina Filippova
admin-fe
Commits
80631d77
Commit
80631d77
authored
5 years ago
by
Angelina Filippova
Browse files
Options
Downloads
Patches
Plain Diff
Refactoring
parent
13409efa
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/views/users/index.test.js
+12
-20
12 additions, 20 deletions
test/views/users/index.test.js
with
12 additions
and
20 deletions
test/views/users/index.test.js
+
12
−
20
View file @
80631d77
...
...
@@ -6,6 +6,8 @@ import storeConfig from './store.conf'
import
{
cloneDeep
}
from
'
lodash
'
config
.
mocks
[
"
$t
"
]
=
()
=>
{}
config
.
stubs
[
'
users-filter
'
]
=
'
<div />
'
const
localVue
=
createLocalVue
()
localVue
.
use
(
Vuex
)
...
...
@@ -23,8 +25,7 @@ describe('Search and filter users', () => {
it
(
'
fetches initial list of users
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -35,8 +36,7 @@ describe('Search and filter users', () => {
it
(
'
starts a search on input change
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
wrapper
.
vm
.
handleDebounceSearchInput
=
(
query
)
=>
{
...
...
@@ -72,8 +72,7 @@ describe('Users actions', () => {
it
(
'
grants admin and moderator rights to a local user
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -95,8 +94,7 @@ describe('Users actions', () => {
it
(
'
does not show actions that grant admin and moderator rights to external users
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -110,8 +108,7 @@ describe('Users actions', () => {
it
(
'
toggles activation status
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -129,8 +126,7 @@ describe('Users actions', () => {
it
(
'
deactivates user when Delete action is called
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -148,8 +144,7 @@ describe('Users actions', () => {
it
(
'
adds tags
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -173,8 +168,7 @@ describe('Users actions', () => {
it
(
'
deletes tags
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -192,8 +186,7 @@ describe('Users actions', () => {
it
(
'
shows check icon when tag is added
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
@@ -209,8 +202,7 @@ describe('Users actions', () => {
it
(
'
does not change user index in array when tag is added
'
,
async
(
done
)
=>
{
const
wrapper
=
mount
(
Users
,
{
store
,
localVue
,
stubs
:
[
'
users-filter
'
]
localVue
})
await
wrapper
.
vm
.
$nextTick
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment