BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
af3dd043
Commit
af3dd043
authored
May 11, 2018
by
Dennis Tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up component tests
parent
918077a0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
27 deletions
+20
-27
gke_machine_type_dropdown_spec.js
...er_dropdowns/components/gke_machine_type_dropdown_spec.js
+2
-2
gke_project_id_dropdown_spec.js
...ster_dropdowns/components/gke_project_id_dropdown_spec.js
+16
-23
gke_zone_dropdown_spec.js
...ke_cluster_dropdowns/components/gke_zone_dropdown_spec.js
+2
-2
No files found.
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown_spec.js
View file @
af3dd043
...
...
@@ -84,10 +84,10 @@ describe('GkeMachineTypeDropdown', () => {
expect
(
vm
.
$el
.
querySelector
(
'input'
).
value
).
toBe
(
''
);
vm
.
$store
.
commit
(
SET_MACHINE_TYPES
,
gapiMachineTypesResponseMock
.
items
);
vm
.
$nextTick
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
vm
.
$el
.
querySelector
(
'.dropdown-content button'
).
click
();
vm
.
$nextTick
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'input'
).
value
).
toBe
(
selectedMachineTypeMock
);
done
();
});
...
...
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js
View file @
af3dd043
...
...
@@ -43,34 +43,28 @@ describe('GkeProjectIdDropdown', () => {
});
it
(
'returns default toggle text'
,
done
=>
{
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
vm
.
setItem
(
emptyProjectMock
);
return
vm
.
$nextTick
().
then
(()
=>
{
vm
.
setItem
(
emptyProjectMock
);
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
DEFAULT
);
done
();
});
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
DEFAULT
);
done
();
});
});
it
(
'returns project name if project selected'
,
done
=>
{
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
toggleText
).
toBe
(
selectedProjectMock
.
name
);
done
();
});
return
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
toggleText
).
toBe
(
selectedProjectMock
.
name
);
done
();
});
});
it
(
'returns empty toggle text'
,
done
=>
{
vm
.
$nextTick
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
vm
.
$store
.
commit
(
SET_PROJECTS
,
[]);
vm
.
setItem
(
emptyProjectMock
);
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
EMPTY
);
done
();
});
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
EMPTY
);
done
();
});
});
});
...
...
@@ -79,13 +73,12 @@ describe('GkeProjectIdDropdown', () => {
it
(
'reflects new value when dropdown item is clicked'
,
done
=>
{
expect
(
vm
.
$el
.
querySelector
(
'input'
).
value
).
toBe
(
''
);
vm
.
$nextTick
(()
=>
{
vm
.
$nextTick
(()
=>
{
vm
.
$el
.
querySelector
(
'.dropdown-content button'
).
click
();
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'input'
).
value
).
toBe
(
selectedProjectMock
.
projectId
);
done
();
});
return
vm
.
$nextTick
().
then
(()
=>
{
vm
.
$el
.
querySelector
(
'.dropdown-content button'
).
click
();
return
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'input'
).
value
).
toBe
(
selectedProjectMock
.
projectId
);
done
();
});
});
});
...
...
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown_spec.js
View file @
af3dd043
...
...
@@ -66,10 +66,10 @@ describe('GkeZoneDropdown', () => {
expect
(
vm
.
$el
.
querySelector
(
'input'
).
value
).
toBe
(
''
);
vm
.
$store
.
commit
(
SET_ZONES
,
gapiZonesResponseMock
.
items
);
vm
.
$nextTick
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
vm
.
$el
.
querySelector
(
'.dropdown-content button'
).
click
();
vm
.
$nextTick
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'input'
).
value
).
toBe
(
selectedZoneMock
);
done
();
});
...
...
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