summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-04-21 10:27:03 +0100
committerPhil Hughes <me@iamphill.com>2017-04-21 10:27:08 +0100
commit05dc14074b78822ff460f703eab0a2082d2adf46 (patch)
treefaabba6f4b536ac8edca8f5e238364da5a14527c
parentb55ab7abc6c01f462071dffcbfab692b4f07f453 (diff)
downloadgitlab-ce-05dc14074b78822ff460f703eab0a2082d2adf46.tar.gz
Updated specs
-rw-r--r--spec/javascripts/monitoring/deployments_spec.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/javascripts/monitoring/deployments_spec.js b/spec/javascripts/monitoring/deployments_spec.js
index b091b0550aa..2bcec8dcc2b 100644
--- a/spec/javascripts/monitoring/deployments_spec.js
+++ b/spec/javascripts/monitoring/deployments_spec.js
@@ -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();
});
});