Skip to content

Commit a2e19c9

Browse files
authored
Merge pull request #20 from oslabs-beta/dev
Merging dev to master
2 parents 0a0e30a + 0c9f0cf commit a2e19c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+9930
-10678
lines changed

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"transform": {
66
"^.+\\.(js|ts|tsx)$": "ts-jest"
77
},
8+
"transformIgnorePatterns": ["/node_modules/(?!d3|d3-array|internmap|delaunator|robust-predicates)"],
89
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
910
"moduleFileExtensions": [
1011
"ts",
@@ -93,6 +94,7 @@
9394
"@testing-library/jest-dom": "^4.2.4",
9495
"@types/chai": "^4.2.14",
9596
"@types/chrome": "^0.0.119",
97+
"@types/d3": "^7.4.0",
9698
"@types/d3-scale-chromatic": "^2.0.0",
9799
"@types/jest": "^26.0.4",
98100
"@types/lodash.isequal": "^4.5.5",
@@ -166,10 +168,10 @@
166168
"acorn-jsx": "^5.2.0",
167169
"apexcharts": "^3.23.1",
168170
"chai": "^4.2.0",
169-
"d3": "^5.16.0",
170-
"d3-scale-chromatic": "^2.0.0",
171+
"d3": "^7.6.1",
172+
"d3-scale-chromatic": "^3.0.0",
171173
"d3-shape": "^2.0.0",
172-
"d3-zoom": "^1.8.3",
174+
"d3-zoom": "^3.0.0",
173175
"immer": "^9.0.12",
174176
"intro.js": "^5.0.0",
175177
"intro.js-react": "^0.6.0",

src/app/__tests__/History.test.tsx

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,19 @@
11
/* eslint:disable */
22

3-
import * as d3 from 'd3'
3+
import * as d3 from 'd3';
44

5-
describe('D3 Canvas Testing', ()=> {
6-
const getCanvas = () => {
7-
return d3.select('#canvas')
8-
}
5+
describe('D3 Canvas Testing', () => {
6+
const getCanvas = () => d3.select('#canvas');
97

10-
it ('should render', ()=>{
8+
it('should render', () => {
119
expect(getCanvas()).not.toBeNull();
12-
})
10+
});
11+
});
1312

14-
})
13+
describe('D3 Node Testing', () => {
14+
const getNodes = () => d3.select('g');
1515

16-
describe('D3 Node Testing', ()=> {
17-
const getNodes = () => {
18-
return d3.select('g')
19-
}
20-
21-
it ('should render', () => {
16+
it('should render', () => {
2217
expect(getNodes()).not.toBeNull();
23-
})
24-
25-
26-
})
18+
});
19+
});

src/app/__tests__/RouteDescription.test.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
/* eslint-disable @typescript-eslint/no-explicit-any */
32
/* eslint-disable react/jsx-filename-extension */
43

@@ -11,7 +10,7 @@ import RouteDescription from '../components/RouteDescription';
1110
configure({ adapter: new (Adapter as any)() });
1211

1312
describe('Unit testing RouteDescription', () => {
14-
const actionsArr = [];
13+
const actionsArr: JSX.Element[] = [];
1514

1615
actionsArr.push(
1716
<Action

src/app/components/Action.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ interface ActionProps {
2020
displayName: string;
2121
componentName: string;
2222
componentData: { actualDuration: number } | undefined;
23+
routePath: any;
2324
state?: Record<string, unknown>;
24-
viewIndex: number;
25+
viewIndex: number | undefined;
2526
isCurrIndex: boolean;
2627
handleOnkeyDown: (e: any, i: number) => any;
2728
}
@@ -58,33 +59,33 @@ const Action = (props: ActionProps): JSX.Element => {
5859

5960
/**
6061
* @function cleanTime: Displays render times for state changes
61-
* @returns render display time in seconds in miliseconds
62+
* @returns render display time in seconds in milliseconds
6263
*/
6364
const cleanTime = () => {
6465
if (!componentData || !componentData.actualDuration) {
6566
return 'NO TIME';
6667
}
6768
let seconds: number | string;
68-
let miliseconds: any = componentData.actualDuration;
69+
let milliseconds: any = componentData.actualDuration;
6970
if (Math.floor(componentData.actualDuration) > 60) {
7071
seconds = Math.floor(componentData.actualDuration / 60);
7172
seconds = JSON.stringify(seconds);
7273
if (seconds.length < 2) {
7374
seconds = '0'.concat(seconds);
7475
}
75-
miliseconds = Math.floor(componentData.actualDuration % 60);
76+
milliseconds = Math.floor(componentData.actualDuration % 60);
7677
} else {
7778
seconds = '00';
7879
}
79-
miliseconds = Number.parseFloat(miliseconds).toFixed(2);
80-
const arrayMiliseconds = miliseconds.split('.');
81-
if (arrayMiliseconds[0].length < 2) {
82-
arrayMiliseconds[0] = '0'.concat(arrayMiliseconds[0]);
80+
milliseconds = Number.parseFloat(milliseconds).toFixed(2);
81+
const arrayMilliseconds = milliseconds.split('.');
82+
if (arrayMilliseconds[0].length < 2) {
83+
arrayMilliseconds[0] = '0'.concat(arrayMilliseconds[0]);
8384
}
8485
if (index === 0) {
85-
return `${seconds}:${arrayMiliseconds[0]}.${arrayMiliseconds[1]}`;
86+
return `${seconds}:${arrayMilliseconds[0]}.${arrayMilliseconds[1]}`;
8687
}
87-
return `+${seconds}:${arrayMiliseconds[0]}.${arrayMiliseconds[1]}`;
88+
return `+${seconds}:${arrayMilliseconds[0]}.${arrayMilliseconds[1]}`;
8889
};
8990
const displayTime = cleanTime();
9091

src/app/components/App.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,10 @@ import React, { useReducer } from 'react';
22
import {
33
MemoryRouter as Router,
44
} from 'react-router-dom';
5-
// import { Steps, Hints } from 'intro.js-react';
65
import MainContainer from '../containers/MainContainer';
76
import { StoreContext } from '../store';
87
import mainReducer from '../reducers/mainReducer.js';
98

10-
// import 'intro.js/introjs.css';
11-
129
// currentTab is the current active tab within Google Chrome.
1310
// This is used to decide what tab Reactime should be monitoring. This can be "locked"
1411
// currentTabInApp is the current active tab within Reactime (Map, Performance, History, etc).

0 commit comments

Comments
 (0)