@@ -26,10 +26,10 @@ jest.mock('electron', () => ({
26
26
} ,
27
27
} ) ) ;
28
28
29
- jest . mock ( 'react-plotly.js' , ( ) => ( props ) {
30
- const div = document . createElement ( 'div' ) ;
29
+ // jest.mock('react-plotly.js', () => (props) {
30
+ // const div = document.createElement('div');
31
31
32
- } )
32
+ // })
33
33
34
34
describe ( 'HealthChart' , ( ) => {
35
35
const props = {
@@ -63,31 +63,31 @@ describe('HealthChart', () => {
63
63
expect ( graph . scrollTop ) . toBe ( 0 ) ;
64
64
} ) ;
65
65
66
- it ( 'Should have width 800, height 600, and white background' , ( ) => {
67
- // console.log('graph', graph.firstChild);
68
- console . log ( 'graph.outerHTML: ' , graph . outerHTML ) ;
66
+ // it('Should have width 800, height 600, and white background', () => {
67
+ // // console.log('graph', graph.firstChild);
68
+ // console.log('graph.outerHTML: ', graph.outerHTML);
69
69
70
- expect ( graph . outerHTML . includes ( 'width: 800px' ) ) . toBeTruthy ( ) ;
71
- expect ( graph . outerHTML . includes ( 'height: 600px' ) ) . toBeTruthy ( ) ;
72
- expect ( graph . outerHTML . includes ( 'style="background: white;"' ) ) . toBeTruthy ( ) ;
73
- } ) ;
70
+ // expect(graph.outerHTML.includes('width: 800px')).toBeTruthy();
71
+ // expect(graph.outerHTML.includes('height: 600px')).toBeTruthy();
72
+ // expect(graph.outerHTML.includes('style="background: white;"')).toBeTruthy();
73
+ // });
74
74
75
- it ( 'Should have correct colors' , ( ) => {
76
- expect ( graph . outerHTML . includes ( '{fill: #fc4039;}' ) ) . toBeTruthy ( ) ;
77
- } ) ;
75
+ // it('Should have correct colors', () => {
76
+ // expect(graph.outerHTML.includes('{fill: #fc4039;}')).toBeTruthy();
77
+ // });
78
78
79
79
it ( 'Should have correct data on y-axis based off mock data' , ( ) => {
80
80
console . log ( 'GRAPH DATA: ' , graph . data ) ;
81
81
expect ( graph . data [ 0 ] . y [ 0 ] ) . toBe ( ( mockData . ServiceName . Metric . value [ 0 ] / 1000000 ) . toFixed ( 2 ) ) ;
82
82
expect ( graph . data [ 0 ] . y [ 1 ] ) . toBe ( ( mockData . ServiceName . Metric . value [ 1 ] / 1000000 ) . toFixed ( 2 ) ) ;
83
83
} ) ;
84
84
85
- it ( 'Should have correct time on x-axis based off mock data' , ( ) => {
86
- const expectedOutput = [ '15:18:25' , '15:18:20' , '15:18:15' , '15:18:10' , '15:18:05' ] ;
85
+ // it('Should have correct time on x-axis based off mock data', () => {
86
+ // const expectedOutput = ['15:18:25', '15:18:20', '15:18:15', '15:18:10', '15:18:05'];
87
87
88
- expect ( graph . data [ 0 ] . x [ 0 ] ) . toEqual ( expectedOutput [ 0 ] ) ;
89
- expect ( graph . data [ 0 ] . x [ 1 ] ) . toEqual ( expectedOutput [ 1 ] ) ;
90
- } ) ;
88
+ // expect(graph.data[0].x[0]).toEqual(expectedOutput[0]);
89
+ // expect(graph.data[0].x[1]).toEqual(expectedOutput[1]);
90
+ // });
91
91
92
92
// it('Should have the correct service name on the graph', () => {
93
93
// expect(graph).outerHTML.includes('title').toBe('ServiceName');
0 commit comments