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
05dc1407
Commit
05dc1407
authored
Apr 21, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated specs
parent
b55ab7ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
deployments_spec.js
spec/javascripts/monitoring/deployments_spec.js
+8
-7
No files found.
spec/javascripts/monitoring/deployments_spec.js
View file @
05dc1407
...
...
@@ -51,9 +51,10 @@ describe('Metrics deployments', () => {
return
d
.
promise
();
});
prometheusGraph
.
configureGraph
();
prometheusGraph
.
transformData
(
prometheusMockData
.
metrics
);
deployment
.
init
(
prometheusGraph
.
data
.
memory_values
);
deployment
.
init
(
prometheusGraph
.
graphSpecificProperties
.
memory_values
.
data
);
});
it
(
'creates line on graph for deploment'
,
()
=>
{
...
...
@@ -76,37 +77,37 @@ describe('Metrics deployments', () => {
it
(
'shows sha short code when tag is false'
,
()
=>
{
expect
(
graphElement
().
querySelector
(
'.deploy-info-1 .js-deploy-info-box'
).
textContent
.
trim
(),
graphElement
().
querySelector
(
'.deploy-info-1
-cpu_values
.js-deploy-info-box'
).
textContent
.
trim
(),
).
toContain
(
'testin'
);
});
it
(
'shows ref name when tag is true'
,
()
=>
{
expect
(
graphElement
().
querySelector
(
'.deploy-info-2 .js-deploy-info-box'
).
textContent
.
trim
(),
graphElement
().
querySelector
(
'.deploy-info-2
-cpu_values
.js-deploy-info-box'
).
textContent
.
trim
(),
).
toContain
(
'tag'
);
});
it
(
'shows info box when moving mouse over line'
,
()
=>
{
deployment
.
mouseOverDeployInfo
(
deployment
.
data
[
0
].
xPos
);
deployment
.
mouseOverDeployInfo
(
deployment
.
data
[
0
].
xPos
,
'cpu_values'
);
expect
(
graphElement
().
querySelectorAll
(
'.prometheus-graph .js-deploy-info-box.hidden'
).
length
,
).
toBe
(
1
);
expect
(
graphElement
().
querySelector
(
'.deploy-info-1 .js-deploy-info-box.hidden'
),
graphElement
().
querySelector
(
'.deploy-info-1
-cpu_values
.js-deploy-info-box.hidden'
),
).
toBeNull
();
});
it
(
'hides previously visible info box when moving mouse away'
,
()
=>
{
deployment
.
mouseOverDeployInfo
(
500
);
deployment
.
mouseOverDeployInfo
(
500
,
'cpu_values'
);
expect
(
graphElement
().
querySelectorAll
(
'.prometheus-graph .js-deploy-info-box.hidden'
).
length
,
).
toBe
(
2
);
expect
(
graphElement
().
querySelector
(
'.deploy-info-1 .js-deploy-info-box.hidden'
),
graphElement
().
querySelector
(
'.deploy-info-1
-cpu_values
.js-deploy-info-box.hidden'
),
).
not
.
toBeNull
();
});
});
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