Commit 8efd2301 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed prometheus_graph_spec.js and scss-linters

parent 5b0890ed
...@@ -159,19 +159,21 @@ ...@@ -159,19 +159,21 @@
text { text {
fill: $stat-graph-axis-fill; fill: $stat-graph-axis-fill;
} }
.label-axis-text, .label-axis-text,
.text-metric-usage { .text-metric-usage {
fill: $black; fill: $black;
font-weight: 500; font-weight: 500;
} }
.legend-axis-text{
.legend-axis-text {
fill: $black; fill: $black;
} }
} }
.x-axis path, .x-axis path,
.y-axis path, .y-axis path,
.x-axis-line, .label-x-axis-line,
.label-y-axis-line { .label-y-axis-line {
fill: none; fill: none;
stroke-width: 1; stroke-width: 1;
......
...@@ -37,9 +37,11 @@ describe('PrometheusGraph', () => { ...@@ -37,9 +37,11 @@ describe('PrometheusGraph', () => {
it('transforms the data', () => { it('transforms the data', () => {
this.prometheusGraph.init(prometheusMockData.metrics); this.prometheusGraph.init(prometheusMockData.metrics);
expect(this.prometheusGraph.data).toBeDefined(); Object.keys(this.prometheusGraph.graphSpecificProperties, (key) => {
expect(this.prometheusGraph.data.cpu_values.length).toBe(121); const graphProps = this.prometheusGraph.graphSpecificProperties[key];
expect(this.prometheusGraph.data.memory_values.length).toBe(121); expect(graphProps.data).toBeDefined();
expect(graphProps.data.length).toBe(121);
});
}); });
it('creates two graphs', () => { it('creates two graphs', () => {
...@@ -68,7 +70,7 @@ describe('PrometheusGraph', () => { ...@@ -68,7 +70,7 @@ describe('PrometheusGraph', () => {
expect($prometheusGraphContents.find('.label-y-axis-line')).toBeDefined(); expect($prometheusGraphContents.find('.label-y-axis-line')).toBeDefined();
expect($prometheusGraphContents.find('.label-axis-text')).toBeDefined(); expect($prometheusGraphContents.find('.label-axis-text')).toBeDefined();
expect($prometheusGraphContents.find('.rect-axis-text')).toBeDefined(); expect($prometheusGraphContents.find('.rect-axis-text')).toBeDefined();
expect($axisLabelContainer.find('rect').length).toBe(2); expect($axisLabelContainer.find('rect').length).toBe(3);
expect($axisLabelContainer.find('text').length).toBe(4); expect($axisLabelContainer.find('text').length).toBe(4);
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment