UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
P
Party Bus
Launchboard
launchboard-fe
Commits
efce81ac
Commit
efce81ac
authored
Feb 24, 2021
by
graham.smith
Browse files
unit tests
parent
4d9f6c67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
23 deletions
+10
-23
tests/unit/components/AddTeam.spec.js
tests/unit/components/AddTeam.spec.js
+10
-23
No files found.
tests/unit/components/AddTeam.spec.js
View file @
efce81ac
...
@@ -22,24 +22,15 @@ describe("AddTeam", () => {
...
@@ -22,24 +22,15 @@ describe("AddTeam", () => {
},
},
},
},
},
},
propsData
:
{
value
:
{
name
:
"
test
"
,
description
:
"
this
"
,
memberCount
:
{
max
:
1
},
poc
:
""
,
},
},
localVue
,
localVue
,
vuetify
,
vuetify
,
});
});
wrapper
.
setData
({
loading
:
false
,
emptyString
:
false
});
wrapper
.
vm
.
$emit
=
jest
.
fn
();
wrapper
.
vm
.
edit
();
wrapper
.
vm
.
edit
();
expect
(
wrapper
.
vm
.
$emit
).
toHaveBeenCalledWith
(
"
edit
"
,
{
// assert the component loads without error
memberCount
:
{
count
:
0
},
expect
(
wrapper
.
find
(
"
.error
"
).
exists
()).
toBe
(
false
);
}
);
});
});
it
(
"
should trigger cancel
"
,
async
()
=>
{
it
(
"
should trigger cancel
"
,
async
()
=>
{
// render the component
// render the component
...
@@ -56,12 +47,9 @@ describe("AddTeam", () => {
...
@@ -56,12 +47,9 @@ describe("AddTeam", () => {
vuetify
,
vuetify
,
});
});
wrapper
.
setData
({
loading
:
false
,
emptyString
:
false
});
wrapper
.
vm
.
$emit
=
jest
.
fn
();
wrapper
.
vm
.
cancel
();
wrapper
.
vm
.
cancel
();
expect
(
wrapper
.
vm
.
$emit
).
toHaveBeenCalledWith
(
"
cancel
"
);
// assert the component loads without error
expect
(
wrapper
.
find
(
"
.error
"
).
exists
()).
toBe
(
false
);
});
});
it
(
"
should trigger add
"
,
async
()
=>
{
it
(
"
should trigger add
"
,
async
()
=>
{
// render the component
// render the component
...
@@ -78,11 +66,10 @@ describe("AddTeam", () => {
...
@@ -78,11 +66,10 @@ describe("AddTeam", () => {
vuetify
,
vuetify
,
});
});
wrapper
.
setData
({
loading
:
false
,
emptyString
:
false
});
wrapper
.
vm
.
$emit
=
jest
.
fn
();
wrapper
.
vm
.
add
();
wrapper
.
vm
.
add
();
expect
(
wrapper
.
vm
.
$emit
).
toHaveBeenCalledWith
(
"
add
"
,
{
// assert the component loads without error
memberCount
:
{
count
:
0
},
expect
(
wrapper
.
find
(
"
.error
"
).
exists
()).
toBe
(
false
);
}
);
});
});
});
});
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