From 8b2e57fb00d9cfbe99ae32643951fbb44ee12c25 Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Fri, 11 Sep 2020 14:35:35 +0100 Subject: [PATCH 01/14] Reformatted ViewGraphs --- ui/src/components/Errors/PageNotFound.tsx | 14 ------ ui/src/components/ViewGraph/ViewGraph.tsx | 54 +++++++++++------------ 2 files changed, 25 insertions(+), 43 deletions(-) delete mode 100644 ui/src/components/Errors/PageNotFound.tsx diff --git a/ui/src/components/Errors/PageNotFound.tsx b/ui/src/components/Errors/PageNotFound.tsx deleted file mode 100644 index 209b83e..0000000 --- a/ui/src/components/Errors/PageNotFound.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router-dom'; - -class PageNotFound extends React.Component{ - render(){ - return
-

- 404 Error : Page Not Found - Go to Home -

-
; - } -} -export default PageNotFound; \ No newline at end of file diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index 0761a09..670ee67 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -1,12 +1,9 @@ import React from 'react'; -import {makeStyles} from '@material-ui/core/styles'; -import { Grid, Box, Button, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, IconButton, Toolbar } from '@material-ui/core' +import { makeStyles } from '@material-ui/core/styles'; +import { Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, IconButton, Toolbar } from '@material-ui/core' import { Graph } from '../../domain/graph'; -import { DeleteGraphRepo } from '../../rest/repositories/delete-graph-repo'; import { GetAllGraphsRepo } from '../../rest/repositories/get-all-graphs-repo'; -import CreateIcon from '@material-ui/icons/Create'; import DeleteOutlineOutlinedIcon from '@material-ui/icons/DeleteOutlineOutlined'; -import PageNotFound from '../Errors/PageNotFound'; interface IState { graphs: Graph[], @@ -25,11 +22,11 @@ export default class ViewGraph extends React.Component<{}, IState> { public async componentDidMount() { try { this.setState({ graphs: await new GetAllGraphsRepo().getAll() }); - } catch (error) { + } catch (error) { console.log("Graph not found"); } } - + private classes: any = makeStyles({ root: { width: '100%', @@ -40,46 +37,45 @@ export default class ViewGraph extends React.Component<{}, IState> { }, }); - private getStripedStyle = (index:any) => { + private getStripedStyle = (index: any) => { return { background: index % 2 ? '#fafafa' : '#fafafa' }; } public render() { - + return ( -
- +
+ - + - + Graph Name Current State Delete - {this.state.graphs.map((graph: Graph, index) => ( - this.setState({selectedRow: graph.getId()})} style = {{ ...this.getStripedStyle(index)}}> - - {graph.getId()} - {graph.getStatus()} - - - - - - - ))} + {this.state.graphs.map((graph: Graph, index) => ( + this.setState({ selectedRow: graph.getId() })} style={{ ...this.getStripedStyle(index) }}> + + {graph.getId()} + {graph.getStatus()} + + + + + + + ))}
-
- - ); +
+ ); } } From 524240776a10fcfd54880cee5364a3726da94f1e Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Fri, 11 Sep 2020 15:13:02 +0100 Subject: [PATCH 02/14] View error message when viewgraphs req fails --- ui/package.json | 2 +- ui/src/components/ViewGraph/ViewGraph.tsx | 16 ++++++-- .../components/ViewGraph/ViewGraph.test.tsx | 38 +++++++++++++------ .../components/add-graph/AddGraph.test.tsx | 4 +- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/ui/package.json b/ui/package.json index a84e544..e485cd0 100644 --- a/ui/package.json +++ b/ui/package.json @@ -9,7 +9,7 @@ "server": "node server/middleware.js", "build": "react-scripts build", "test": "jest \"-- --coverage\"", - "testwatch": "jest --watchAll", + "watch": "jest --watchAll", "deploy": "aws s3 sync build/ s3://kai-ui", "eject": "react-scripts eject" }, diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index 670ee67..f3fda05 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -4,10 +4,12 @@ import { Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, import { Graph } from '../../domain/graph'; import { GetAllGraphsRepo } from '../../rest/repositories/get-all-graphs-repo'; import DeleteOutlineOutlinedIcon from '@material-ui/icons/DeleteOutlineOutlined'; +import { NotificationAlert, AlertType } from '../Errors/NotificationAlert'; interface IState { graphs: Graph[], selectedRow: any, + errorMessage: string, } export default class ViewGraph extends React.Component<{}, IState> { @@ -16,15 +18,18 @@ export default class ViewGraph extends React.Component<{}, IState> { this.state = { graphs: [], selectedRow: '', + errorMessage: '', } } public async componentDidMount() { + let graphs: Graph[] = []; try { - this.setState({ graphs: await new GetAllGraphsRepo().getAll() }); - } catch (error) { - console.log("Graph not found"); + graphs = await new GetAllGraphsRepo().getAll(); + } catch (e) { + this.setState({ errorMessage: `Failed to get all graphs: ${e.message}` }); } + this.setState({ graphs: graphs }) } private classes: any = makeStyles({ @@ -43,10 +48,13 @@ export default class ViewGraph extends React.Component<{}, IState> { public render() { + const { graphs, errorMessage } = this.state; + return (
+ @@ -58,7 +66,7 @@ export default class ViewGraph extends React.Component<{}, IState> { - {this.state.graphs.map((graph: Graph, index) => ( + {graphs.map((graph: Graph, index) => ( this.setState({ selectedRow: graph.getId() })} style={{ ...this.getStripedStyle(index) }}> diff --git a/ui/test/components/ViewGraph/ViewGraph.test.tsx b/ui/test/components/ViewGraph/ViewGraph.test.tsx index c7a46f1..420c3ad 100644 --- a/ui/test/components/ViewGraph/ViewGraph.test.tsx +++ b/ui/test/components/ViewGraph/ViewGraph.test.tsx @@ -1,18 +1,18 @@ -import {mount} from 'enzyme'; -import ExampleTable from '../../../src/components/ViewGraph/ViewGraph'; import React from 'react'; -import { render } from '@testing-library/react'; -import { createRenderer } from 'react-dom/test-utils'; +import { mount, ReactWrapper } from 'enzyme'; +import ViewGraph from '../../../src/components/ViewGraph/ViewGraph'; +import { GetAllGraphsRepo } from '../../../src/rest/repositories/get-all-graphs-repo'; +jest.mock('../../../src/rest/repositories/get-all-graphs-repo'); -describe('When ExampleTable mounts', () => { - const wrapper = mount(); +xdescribe('When ExampleTable mounts', () => { + const wrapper = mount(); const rows = wrapper.find('tbody').find('tr'); it('should display only 1 table element', () => { const table = wrapper.find('table'); expect(table).toHaveLength(1); }); - + it('should display only 3 columns in the table element', () => { const tableHead = wrapper.find('th'); expect(tableHead).toHaveLength(3); @@ -20,9 +20,9 @@ describe('When ExampleTable mounts', () => { it('should display Graph Id and Current State Columns', () => { const cols = [ - {name: 'Graph Name'}, - {name: 'Current State'}, - {name: 'Delete'} + { name: 'Graph Name' }, + { name: 'Current State' }, + { name: 'Delete' } ]; const tableHead = wrapper.find('th'); tableHead.forEach((th, idx) => { @@ -35,7 +35,7 @@ describe('When ExampleTable mounts', () => { expect(tableBody).toHaveLength(1); }); - it('should get all the graphs and display it in the table', () => { + it('should get all the graphs and display it in the table', () => { rows.forEach(() => { const cells = rows.find('td'); expect(cells.at(0).text()).toEqual("testId1"); @@ -53,3 +53,19 @@ describe('When ExampleTable mounts', () => { }); }); }); +describe('Get Graphs Request', () => { + it('should display Error Message in AlertNotification when GetGraphs request fails', () => { + GetAllGraphsRepo.mockImplementationOnce(() => { + return { + getAll: () => { throw new Error('404 Not Found'); }, + }; + }); + + const wrapper = mount(); + + expect(wrapper.find('#notification-alert').text()).toBe('Failed to get all graphs: 404 Not Found'); + }); + it('should not display Error AlertNotification when GetGraphs request successful', () => { + + }); +}); diff --git a/ui/test/components/add-graph/AddGraph.test.tsx b/ui/test/components/add-graph/AddGraph.test.tsx index 84282b9..64ba108 100644 --- a/ui/test/components/add-graph/AddGraph.test.tsx +++ b/ui/test/components/add-graph/AddGraph.test.tsx @@ -142,7 +142,7 @@ describe('On Submit Request', () => { await wrapper.update(); await wrapper.update(); - expect(wrapper.find('#notification-alert').text()).toBe('OK Graph was successfully added') + expect(wrapper.find('#notification-alert').text()).toBe('OK Graph was successfully added'); }); it('should display an error message with server error in the NotificationAlert when Request fails', async () => { CreateGraphRepo.mockImplementationOnce(() => { @@ -156,7 +156,7 @@ describe('On Submit Request', () => { clickSubmit(); - expect(wrapper.find('#notification-alert').text()).toBe('Failed to Add \'Break Server\' Graph: 500 Server Error') + expect(wrapper.find('#notification-alert').text()).toBe('Failed to Add \'Break Server\' Graph: 500 Server Error'); }); }); From 3941eb36a02d8f4f6d8aed6b95c54e12bd92fcaf Mon Sep 17 00:00:00 2001 From: jpelbertrios Date: Fri, 11 Sep 2020 17:10:29 +0100 Subject: [PATCH 03/14] 404 Error Message in ViewGraph --- ui/src/components/ViewGraph/ViewGraph.tsx | 2 +- .../components/ViewGraph/ViewGraph.test.tsx | 22 +++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index f3fda05..17c5177 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -54,7 +54,7 @@ export default class ViewGraph extends React.Component<{}, IState> {
- + {errorMessage && }
diff --git a/ui/test/components/ViewGraph/ViewGraph.test.tsx b/ui/test/components/ViewGraph/ViewGraph.test.tsx index 420c3ad..365d21d 100644 --- a/ui/test/components/ViewGraph/ViewGraph.test.tsx +++ b/ui/test/components/ViewGraph/ViewGraph.test.tsx @@ -2,9 +2,11 @@ import React from 'react'; import { mount, ReactWrapper } from 'enzyme'; import ViewGraph from '../../../src/components/ViewGraph/ViewGraph'; import { GetAllGraphsRepo } from '../../../src/rest/repositories/get-all-graphs-repo'; +import { resolve } from 'dns'; +import { Graph } from '../../../src/domain/graph'; jest.mock('../../../src/rest/repositories/get-all-graphs-repo'); -xdescribe('When ExampleTable mounts', () => { +describe('When ExampleTable mounts', () => { const wrapper = mount(); const rows = wrapper.find('tbody').find('tr'); @@ -65,7 +67,23 @@ describe('Get Graphs Request', () => { expect(wrapper.find('#notification-alert').text()).toBe('Failed to get all graphs: 404 Not Found'); }); - it('should not display Error AlertNotification when GetGraphs request successful', () => { + it('should not display Error AlertNotification when GetGraphs request successful', async () => { + + GetAllGraphsRepo.mockImplementationOnce(() => { + return { + getAll: () => { return new Promise ((resolve, reject) => { + resolve([new Graph('roadTraffic', 'DEPLOYED')]) + })}, + }; + }); + + const wrapper = mount(); + await wrapper.update() + const table = wrapper.find('table') + + expect(table).toHaveLength(1); + expect(table.text()).toBe('Graph NameCurrent StateDeleteroadTrafficDEPLOYED') + expect(wrapper.find('#notification-alert').length).toBe(0); }); }); From 0d519199be5f20d3b4fa90ec841ea5362888fe4e Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Mon, 14 Sep 2020 10:15:51 +0100 Subject: [PATCH 04/14] Renamed view graph headers --- ui/src/components/ViewGraph/ViewGraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index f3fda05..df71ac9 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -62,7 +62,7 @@ export default class ViewGraph extends React.Component<{}, IState> { Graph Name Current State - Delete + Actions From 4a54157744663a4db3298aaf55a3c7f514aea9a6 Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Mon, 14 Sep 2020 14:19:29 +0100 Subject: [PATCH 05/14] Handle empty graphs, ViewGraph test refactor --- ui/src/components/AddGraph/AddGraph.tsx | 3 +- ui/src/components/UserGuide/UserGuide.tsx | 117 ++++++++---------- ui/src/components/ViewGraph/ViewGraph.tsx | 81 ++++++------ .../components/ViewGraph/ViewGraph.test.tsx | 87 ++++++------- 4 files changed, 138 insertions(+), 150 deletions(-) diff --git a/ui/src/components/AddGraph/AddGraph.tsx b/ui/src/components/AddGraph/AddGraph.tsx index ee7e7c5..8304178 100644 --- a/ui/src/components/AddGraph/AddGraph.tsx +++ b/ui/src/components/AddGraph/AddGraph.tsx @@ -5,6 +5,7 @@ import { Notifications } from '../../domain/notifications'; import { CreateGraphRepo } from '../../rest/repositories/create-graph-repo'; import { Alert } from '@material-ui/lab'; import InsertDriveFileOutlinedIcon from '@material-ui/icons/InsertDriveFileOutlined'; +import AddCircleOutlineOutlinedIcon from '@material-ui/icons/AddCircleOutlineOutlined'; import { DropzoneArea } from 'material-ui-dropzone'; import ClearIcon from '@material-ui/icons/Clear'; import { TransitionProps } from '@material-ui/core/transitions'; @@ -213,7 +214,7 @@ export default class AddGraph extends React.Component<{}, IState> { color="primary" className={this.classes.submit} > - Add Graph + Add Graph diff --git a/ui/src/components/UserGuide/UserGuide.tsx b/ui/src/components/UserGuide/UserGuide.tsx index 8421716..775a70d 100644 --- a/ui/src/components/UserGuide/UserGuide.tsx +++ b/ui/src/components/UserGuide/UserGuide.tsx @@ -1,54 +1,11 @@ import React from 'react'; -import {Button, Card, CardActions, CardContent, Grid, makeStyles, Toolbar, Typography} from "@material-ui/core"; +import { Button, Card, CardActions, CardContent, Grid, makeStyles, Toolbar, Typography } from "@material-ui/core"; import ReactJson from "react-json-view"; +import GitHubIcon from '@material-ui/icons/GitHub'; - -interface IState { - schemaJson: {}, -} - -export default class UserGuide extends React.Component <{}, IState> { +export default class UserGuide extends React.Component<{}, {}> { constructor(props: object) { super(props); - this.state = { - schemaJson: { - "elements": { - "edges": { - "BasicEdge": { - "source": "vertex", - "destination": "vertex", - "directed": "true", - "properties": { - "count": "count" - } - } - } - }, - "types": { - "types": { - "vertex": { - "class": "java.lang.String" - }, - "count": { - "class": "java.lang.Integer", - "aggregateFunction": { - "class": "uk.gov.gchq.koryphe.impl.binaryoperator.Sum" - } - }, - "true": { - "description": "A simple boolean that must always be true.", - "class": "java.lang.Boolean", - "validateFunctions": [ - { - "class": "uk.gov.gchq.koryphe.impl.predicate.IsTrue" - } - ] - } - } - }} - } - - } private classes: any = makeStyles((theme) => ({ @@ -62,21 +19,57 @@ export default class UserGuide extends React.Component <{}, IState> { card: { maxWidth: 345, }, - })); + private getExampleSchema(): object { + return { + "elements": { + "edges": { + "BasicEdge": { + "source": "vertex", + "destination": "vertex", + "directed": "true", + "properties": { + "count": "count" + } + } + } + }, + "types": { + "types": { + "vertex": { + "class": "java.lang.String" + }, + "count": { + "class": "java.lang.Integer", + "aggregateFunction": { + "class": "uk.gov.gchq.koryphe.impl.binaryoperator.Sum" + } + }, + "true": { + "description": "A simple boolean that must always be true.", + "class": "java.lang.Boolean", + "validateFunctions": [ + { + "class": "uk.gov.gchq.koryphe.impl.predicate.IsTrue" + } + ] + } + } + } + } + } public render() { return (
- + - - + Add Graphs @@ -87,7 +80,6 @@ export default class UserGuide extends React.Component <{}, IState> { In the Schema textarea, type in a valid schema with elements and types. - You can import a schema by clicking the document icon. You can only import a single JSON file. You can remove your uploaded schema by clicking on the clear icon next to the name of your file in the selected files section. @@ -102,13 +94,18 @@ export default class UserGuide extends React.Component <{}, IState> { Note: Make sure your schema has elements and types and is surrounded by curly brackets({"{}"}). + + + View Graphs View your graphs in the View Graphs section. + + Schema @@ -118,20 +115,16 @@ export default class UserGuide extends React.Component <{}, IState> { Example Schema: - - + - - + + - - -
) } diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index eaa52be..8d1a24c 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -1,9 +1,10 @@ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; -import { Box, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, IconButton, Toolbar } from '@material-ui/core' +import { Button, Container, Grid, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tooltip, IconButton, Toolbar ,Zoom} from '@material-ui/core' import { Graph } from '../../domain/graph'; import { GetAllGraphsRepo } from '../../rest/repositories/get-all-graphs-repo'; import DeleteOutlineOutlinedIcon from '@material-ui/icons/DeleteOutlineOutlined'; +import RefreshOutlinedIcon from '@material-ui/icons/RefreshOutlined'; import { NotificationAlert, AlertType } from '../Errors/NotificationAlert'; interface IState { @@ -23,13 +24,12 @@ export default class ViewGraph extends React.Component<{}, IState> { } public async componentDidMount() { - let graphs: Graph[] = []; try { - graphs = await new GetAllGraphsRepo().getAll(); + const graphs: Graph[] = await new GetAllGraphsRepo().getAll(); + this.setState({ graphs }) } catch (e) { this.setState({ errorMessage: `Failed to get all graphs: ${e.message}` }); } - this.setState({ graphs: graphs }) } private classes: any = makeStyles({ @@ -42,10 +42,6 @@ export default class ViewGraph extends React.Component<{}, IState> { }, }); - private getStripedStyle = (index: any) => { - return { background: index % 2 ? '#fafafa' : '#fafafa' }; - } - public render() { const { graphs, errorMessage } = this.state; @@ -53,36 +49,49 @@ export default class ViewGraph extends React.Component<{}, IState> { return (
- - {errorMessage && } - -
+ + + {errorMessage && } + +
- - - Graph Name - Current State - Actions - - - - {graphs.map((graph: Graph, index) => ( - this.setState({ selectedRow: graph.getId() })} style={{ ...this.getStripedStyle(index) }}> - - {graph.getId()} - {graph.getStatus()} - - - - - + + + Graph Name + Current State + Actions - ))} - -
-
-
+ + + + {graphs.map((graph: Graph, index) => ( + + {graph.getId()} + {graph.getStatus()} + + + + + + + + + ))} + + {graphs.length === 0 && No Graphs. Add a graph or click Refresh if you have just deployed a Graph.} + + + + +
); } diff --git a/ui/test/components/ViewGraph/ViewGraph.test.tsx b/ui/test/components/ViewGraph/ViewGraph.test.tsx index 365d21d..c2ab48a 100644 --- a/ui/test/components/ViewGraph/ViewGraph.test.tsx +++ b/ui/test/components/ViewGraph/ViewGraph.test.tsx @@ -2,60 +2,45 @@ import React from 'react'; import { mount, ReactWrapper } from 'enzyme'; import ViewGraph from '../../../src/components/ViewGraph/ViewGraph'; import { GetAllGraphsRepo } from '../../../src/rest/repositories/get-all-graphs-repo'; -import { resolve } from 'dns'; import { Graph } from '../../../src/domain/graph'; jest.mock('../../../src/rest/repositories/get-all-graphs-repo'); describe('When ExampleTable mounts', () => { - const wrapper = mount(); - const rows = wrapper.find('tbody').find('tr'); + it('should display Table Headers and Graphs when GetGraphs successful', async () => { + GetAllGraphsRepo.mockImplementationOnce(() => { + return { + getAll: () => { + return new Promise((resolve, reject) => { + resolve([new Graph('testId1', 'deployed')]) + }) + }, + }; + }); - it('should display only 1 table element', () => { - const table = wrapper.find('table'); - expect(table).toHaveLength(1); - }); + const wrapper = mount(); + await wrapper.update(); + await wrapper.update(); - it('should display only 3 columns in the table element', () => { - const tableHead = wrapper.find('th'); - expect(tableHead).toHaveLength(3); + expect(wrapper.find('thead').text()).toBe('Graph NameCurrent StateActions'); + expect(wrapper.find('tbody').text()).toBe('testId1deployed'); + expect(wrapper.find('caption').length).toBe(0); }); - - it('should display Graph Id and Current State Columns', () => { - const cols = [ - { name: 'Graph Name' }, - { name: 'Current State' }, - { name: 'Delete' } - ]; - const tableHead = wrapper.find('th'); - tableHead.forEach((th, idx) => { - expect(th.text()).toEqual(cols[idx].name); + it('should display No Graphs caption when ', async () => { + GetAllGraphsRepo.mockImplementationOnce(() => { + return { + getAll: () => { + return new Promise((resolve, reject) => { + resolve([]) + }) + }, + }; }); - }); - it('should only have 1 table body', () => { - const tableBody = wrapper.find('tbody'); - expect(tableBody).toHaveLength(1); - }); + const wrapper = mount(); + await wrapper.update(); - it('should get all the graphs and display it in the table', () => { - rows.forEach(() => { - const cells = rows.find('td'); - expect(cells.at(0).text()).toEqual("testId1"); - expect(cells.at(1).text()).toEqual("deployed"); - expect(cells.at(2).text()).toEqual("Delete"); - }); + expect(wrapper.find('caption').text()).toBe('No Graphs. Add a graph or click Refresh if you have just deployed a Graph.'); }); - - it('should have Delete button in each row', () => { - rows.forEach(() => { - const cells = rows.find('td'); - expect(cells.at(0).find('svg')).toHaveLength(1); - expect(cells.at(1).find('svg')).toHaveLength(1); - expect(cells.at(2).find('svg')).toHaveLength(1); - }); - }); -}); -describe('Get Graphs Request', () => { it('should display Error Message in AlertNotification when GetGraphs request fails', () => { GetAllGraphsRepo.mockImplementationOnce(() => { return { @@ -68,22 +53,22 @@ describe('Get Graphs Request', () => { expect(wrapper.find('#notification-alert').text()).toBe('Failed to get all graphs: 404 Not Found'); }); it('should not display Error AlertNotification when GetGraphs request successful', async () => { - GetAllGraphsRepo.mockImplementationOnce(() => { return { - getAll: () => { return new Promise ((resolve, reject) => { - resolve([new Graph('roadTraffic', 'DEPLOYED')]) - })}, + getAll: () => { + return new Promise((resolve, reject) => { + resolve([new Graph('roadTraffic', 'DEPLOYED')]) + }) + }, }; }); - const wrapper = mount(); + const wrapper = mount(); await wrapper.update() + const table = wrapper.find('table') - expect(table).toHaveLength(1); - expect(table.text()).toBe('Graph NameCurrent StateDeleteroadTrafficDEPLOYED') + expect(table.find('tbody').text()).toBe('roadTrafficDEPLOYED') expect(wrapper.find('#notification-alert').length).toBe(0); - }); }); From d7a69bb236509b125ba59e677bc327479b4b8a7a Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Mon, 14 Sep 2020 14:32:31 +0100 Subject: [PATCH 06/14] Refresh table button --- ui/src/components/ViewGraph/ViewGraph.tsx | 7 ++- .../components/ViewGraph/ViewGraph.test.tsx | 63 ++++++++++--------- 2 files changed, 38 insertions(+), 32 deletions(-) diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index 8d1a24c..8bc1d91 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -24,6 +24,10 @@ export default class ViewGraph extends React.Component<{}, IState> { } public async componentDidMount() { + this.getGraphs(); + } + + private async getGraphs() { try { const graphs: Graph[] = await new GetAllGraphsRepo().getAll(); this.setState({ graphs }) @@ -82,7 +86,8 @@ export default class ViewGraph extends React.Component<{}, IState> { diff --git a/ui/src/components/Navigation/NavigationAppbar.tsx b/ui/src/components/Navigation/NavigationAppbar.tsx index 3c94009..84b7c74 100644 --- a/ui/src/components/Navigation/NavigationAppbar.tsx +++ b/ui/src/components/Navigation/NavigationAppbar.tsx @@ -92,7 +92,7 @@ const NavigationAppbar: React.FC = (props: any) => { switch(sidebarName) { case 'Add Graph': return (); - case 'View Graph': + case 'View Graphs': return (); case 'User Guide': return (); diff --git a/ui/src/components/Navigation/Routes.tsx b/ui/src/components/Navigation/Routes.tsx index 9e25fab..55629b0 100644 --- a/ui/src/components/Navigation/Routes.tsx +++ b/ui/src/components/Navigation/Routes.tsx @@ -2,8 +2,6 @@ import ViewGraph from "../ViewGraph/ViewGraph"; import AddGraph from "../AddGraph/AddGraph"; import UserGuide from "../UserGuide/UserGuide"; -import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline'; -import VisibilityIcon from '@material-ui/icons/Visibility'; const Routes = [ { @@ -13,7 +11,7 @@ const Routes = [ }, { path: '/ViewGraph', - sidebarName: 'View Graph', + sidebarName: 'View Graphs', component: ViewGraph }, { diff --git a/ui/src/components/UserGuide/UserGuide.tsx b/ui/src/components/UserGuide/UserGuide.tsx index 775a70d..2b631fd 100644 --- a/ui/src/components/UserGuide/UserGuide.tsx +++ b/ui/src/components/UserGuide/UserGuide.tsx @@ -119,9 +119,9 @@ export default class UserGuide extends React.Component<{}, {}> { - + diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index 8bc1d91..48a061b 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -1,6 +1,6 @@ import React from 'react'; import { makeStyles } from '@material-ui/core/styles'; -import { Button, Container, Grid, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tooltip, IconButton, Toolbar ,Zoom} from '@material-ui/core' +import { Button, Container, Grid, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Tooltip, IconButton, Toolbar, Zoom } from '@material-ui/core' import { Graph } from '../../domain/graph'; import { GetAllGraphsRepo } from '../../rest/repositories/get-all-graphs-repo'; import DeleteOutlineOutlinedIcon from '@material-ui/icons/DeleteOutlineOutlined'; @@ -85,16 +85,18 @@ export default class ViewGraph extends React.Component<{}, IState> { {graphs.length === 0 && No Graphs. Add a graph or click Refresh if you have just deployed a Graph.} - + diff --git a/ui/test/components/Navigation/NavigationAppbar.test.tsx b/ui/test/components/Navigation/NavigationAppbar.test.tsx index cf41e75..9126a23 100644 --- a/ui/test/components/Navigation/NavigationAppbar.test.tsx +++ b/ui/test/components/Navigation/NavigationAppbar.test.tsx @@ -28,7 +28,7 @@ describe('Navigation Appbar Component', () => { it('should display menu in Navbar', () => { const cols = [ { name: 'Add Graph' }, - { name: 'View Graph' }, + { name: 'View Graphs' }, { name: 'User Guide' } ]; const NavLi = wrapper.find('li').at(1); diff --git a/ui/test/components/add-graph/AddGraph.test.tsx b/ui/test/components/add-graph/AddGraph.test.tsx index 64ba108..8c9294c 100644 --- a/ui/test/components/add-graph/AddGraph.test.tsx +++ b/ui/test/components/add-graph/AddGraph.test.tsx @@ -3,6 +3,7 @@ import React from 'react'; import AddGraph from '../../../src/components/AddGraph/AddGraph'; import { DropzoneArea } from 'material-ui-dropzone'; import { CreateGraphRepo } from '../../../src/rest/repositories/create-graph-repo'; + jest.mock('../../../src/rest/repositories/create-graph-repo'); let wrapper: ReactWrapper; @@ -46,7 +47,7 @@ const exampleJSON = { }, }; -describe('When AddGraph mounts', () => { +describe('On Render', () => { it('should have a Graph Id text field', () => { const textfield = wrapper.find('input'); expect(textfield.at(0).props().name).toBe('graphName'); @@ -60,63 +61,32 @@ describe('When AddGraph mounts', () => { expect(fileButton).toHaveLength(1); }); it('should have a Submit button', () => { - const submitButton = wrapper.find('button').at(2).text(); + const submitButton = wrapper.find('button').at(3).text(); expect(submitButton).toBe('Add Graph'); }); }); -describe('Add graph button', () => { - it('should give an error when the graphName and schema field is empty', () => { - wrapper.find('button').at(2).simulate('click'); - - expect(wrapper.find('div.MuiAlert-message').text()).toBe('Error(s): Graph Name is empty, Schema is empty'); +describe('Add Graph Button', () => { + it('should be disabled when Graph Name and Schema fields are empty', () => { + expect(wrapper.find('button#add-new-graph-button').props().disabled).toBe(true); }); - it('should give an error when the graphName field is empty', () => { - wrapper.find('textarea').simulate('change', { - target: { value: JSON.stringify(exampleJSON) }, - }); - expect(wrapper.find('textarea').props().value).toBe(JSON.stringify(exampleJSON)); + it('should be disabled when Graph Name field is empty', () => { + inputSchema(exampleJSON); - wrapper.find('button').at(2).simulate('click'); + expect(wrapper.find('button#add-new-graph-button').props().disabled).toBe(true); + }); + it('should be disabled when the Schema field is empty', () => { + inputGraphName('G'); - expect(wrapper.find('div.MuiAlert-message').text()).toBe('Error(s): Graph Name is empty'); + expect(wrapper.find('button#add-new-graph-button').props().disabled).toBe(true); }); - it('should give an error when the schema field is empty', () => { - wrapper - .find('input') - .at(0) - .simulate('change', { - target: { value: 'testGraph' }, - }); - expect(wrapper.find('input').at(0).props().value).toBe('testGraph'); - - wrapper.find('button').at(2).simulate('click'); - - expect(wrapper.find('div.MuiAlert-message').text()).toBe('Error(s): Schema is empty'); + it('should be enabled when the Graph Name and Schema inputted', () => { + inputGraphName('My Graph'); + inputSchema(exampleJSON); + + expect(wrapper.find('button#add-new-graph-button').props().disabled).toBe(false); }); }); describe('Dropzone behaviour', () => { - it('should fire onChange handler', () => { - const handleDropzoneChange = jest.fn(); - const dzwrapper = mount( - - ); - // find the DropzoneArea node - const dropzoneAreaWrapper = dzwrapper.find(DropzoneArea); - // call its onChange prop - dropzoneAreaWrapper.prop('onChange')(); - // check handleDropzoneChange has been called - expect(handleDropzoneChange).toHaveBeenCalled(); - }); - it('should have an input that accepts files', () => { const dropZone = wrapper.find('input').at(1); expect(dropZone.props().type).toBe('file'); @@ -129,11 +99,7 @@ describe('Dropzone behaviour', () => { describe('On Submit Request', () => { it('should display success message in the NotificationAlert', async () => { - CreateGraphRepo.mockImplementationOnce(() => { - return { - create: () => {}, - }; - }); + mockAddGraphRepoWithFunction(() => { }); inputGraphName('OK Graph'); inputSchema(exampleJSON); @@ -145,11 +111,7 @@ describe('On Submit Request', () => { expect(wrapper.find('#notification-alert').text()).toBe('OK Graph was successfully added'); }); it('should display an error message with server error in the NotificationAlert when Request fails', async () => { - CreateGraphRepo.mockImplementationOnce(() => { - return { - create: () => { throw new Error('500 Server Error'); }, - }; - }); + mockAddGraphRepoWithFunction(() => { throw new Error('500 Server Error'); }); inputGraphName('Break Server'); inputSchema(exampleJSON); @@ -172,8 +134,17 @@ function inputSchema(schema: object): void { wrapper.find('textarea').simulate('change', { target: { value: JSON.stringify(schema) }, }); + expect(wrapper.find('textarea').props().value).toBe(JSON.stringify(schema)); } function clickSubmit(): void { - wrapper.find('button').at(2).simulate('click'); + wrapper.find('button#add-new-graph-button').simulate('click'); +} + +function mockAddGraphRepoWithFunction(f: () => void): void { + CreateGraphRepo.mockImplementationOnce(() => { + return { + create: f, + }; + }); } From 7b91724b2f20f1eb571befe6883c52b1efdd5a16 Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Mon, 14 Sep 2020 16:59:48 +0100 Subject: [PATCH 10/14] Refactored schema validation --- ui/src/components/AddGraph/AddGraph.tsx | 9 +++------ ui/test/components/add-graph/AddGraph.test.tsx | 11 +++++++++++ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/ui/src/components/AddGraph/AddGraph.tsx b/ui/src/components/AddGraph/AddGraph.tsx index a9993fd..d97eaa7 100644 --- a/ui/src/components/AddGraph/AddGraph.tsx +++ b/ui/src/components/AddGraph/AddGraph.tsx @@ -52,12 +52,9 @@ export default class AddGraph extends React.Component<{}, IState> { private async submitNewGraph() { const { graphName, schemaJson } = this.state.newGraph; - const errors: Notifications = new Notifications(); - const schema = new Schema(schemaJson); - const schemaErrors: Notifications = schema.validation(); - errors.concat(schemaErrors); - + + const errors: Notifications = schema.validation(); if (errors.isEmpty()) { try { await new CreateGraphRepo().create(graphName, [], schema); @@ -67,7 +64,7 @@ export default class AddGraph extends React.Component<{}, IState> { this.setState({ outcome: AlertType.FAILED, outcomeMessage: `Failed to Add '${graphName}' Graph: ${e.message}` }); } } else { - this.setState({ errors: errors }); + this.setState({ errors }); } } diff --git a/ui/test/components/add-graph/AddGraph.test.tsx b/ui/test/components/add-graph/AddGraph.test.tsx index 8c9294c..8803a49 100644 --- a/ui/test/components/add-graph/AddGraph.test.tsx +++ b/ui/test/components/add-graph/AddGraph.test.tsx @@ -96,7 +96,18 @@ describe('Dropzone behaviour', () => { expect(dropZone.props().accept).toBe('application/json'); }); }); +describe('Schema validation integration', () => { + it('should display validation errors as an Alert Notification', () => { + inputGraphName('OK Graph'); + inputSchema({ blah: 'blahhhhh' }); + + clickSubmit(); + const expectedMessage = 'Error(s): Elements is missing from schema, ' + + 'Types is missing from schema, [\"blah\"] are invalid schema root properties'; + expect(wrapper.find('div.MuiAlert-message').text()).toBe(expectedMessage); + }); +}) describe('On Submit Request', () => { it('should display success message in the NotificationAlert', async () => { mockAddGraphRepoWithFunction(() => { }); From 10554dbfe32998d2b075da8faa94a8adef1a3bab Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Tue, 15 Sep 2020 10:55:07 +0100 Subject: [PATCH 11/14] Formatting NavBar --- .../Navigation/NavigationAppbar.tsx | 87 ++++++++----------- 1 file changed, 37 insertions(+), 50 deletions(-) diff --git a/ui/src/components/Navigation/NavigationAppbar.tsx b/ui/src/components/Navigation/NavigationAppbar.tsx index 84b7c74..bbd5a75 100644 --- a/ui/src/components/Navigation/NavigationAppbar.tsx +++ b/ui/src/components/Navigation/NavigationAppbar.tsx @@ -1,9 +1,8 @@ -import React, { useState } from 'react'; +import React from 'react'; import { NavLink, withRouter } from 'react-router-dom'; import Routes from './Routes'; import { createStyles, makeStyles, Theme } from '@material-ui/core/styles'; -import { AppBar, Toolbar, Typography, MenuList, MenuItem, ListItemText,Drawer, Divider, ListItem, List, ListItemIcon, Avatar, ListItemAvatar} from '@material-ui/core'; -import { green } from '@material-ui/core/colors'; +import { AppBar, Toolbar, Typography, ListItemText, Drawer, Divider, ListItem, List, ListItemIcon, Avatar, ListItemAvatar } from '@material-ui/core'; import AddCircleOutlineIcon from '@material-ui/icons/AddCircleOutline'; import VisibilityIcon from '@material-ui/icons/Visibility'; import LocalLibraryIcon from '@material-ui/icons/LocalLibrary'; @@ -17,7 +16,7 @@ const useStyles = makeStyles((theme: Theme) => marginRight: theme.spacing(2), }, title: { - marginRight:20, + marginRight: 20, }, drawer: { width: 240, @@ -29,11 +28,11 @@ const useStyles = makeStyles((theme: Theme) => }, drawerPaper: { width: drawerWidth, - }, + }, drawerContainer: { - overflow: 'auto', + overflow: 'auto', }, - // necessary for content to be below app bar + // necessary for content to be below app bar toolbar: theme.mixins.toolbar, drawerHeader: { display: 'flex', @@ -56,8 +55,8 @@ const useStyles = makeStyles((theme: Theme) => boxShadow: "0px 0px 0px 0px", zIndex: theme.zIndex.drawer + 1, }, - listItem: { - color: '#696666' + listItem: { + color: '#696666' }, listItemText: { '& span, & svg': { @@ -68,38 +67,26 @@ const useStyles = makeStyles((theme: Theme) => ); const NavigationAppbar: React.FC = (props: any) => { - - const classes = useStyles(); - const [isOpen, setIsOpen] = useState(false); - const toggleDrawer = (open: boolean) => ( - event: React.KeyboardEvent | React.MouseEvent, - ) => { - if ( - event.type === 'keydown' && - ((event as React.KeyboardEvent).key === 'Tab' || - (event as React.KeyboardEvent).key === 'Shift') - ) { - return; - } - setIsOpen(open); - }; + const classes = useStyles(); const activeRoute = (routeName: any) => { return props.location.pathname === routeName ? true : false; } + const getSideNavIcon = (sidebarName: any) => { - switch(sidebarName) { - case 'Add Graph': - return (); - case 'View Graphs': - return (); - case 'User Guide': - return (); - default: - return null; + switch (sidebarName) { + case 'Add Graph': + return (); + case 'View Graphs': + return (); + case 'User Guide': + return (); + default: + return null; } - } + } + return (
@@ -107,49 +94,49 @@ const NavigationAppbar: React.FC = (props: any) => { Graph As Service - + - + - +
- + - - + + - + {Routes.map((prop, key) => { return ( + style={{ color: 'inherit', textDecoration: 'inherit' }} + key={key}> - - {getSideNavIcon(prop.sidebarName)} - - + + {getSideNavIcon(prop.sidebarName)} + + ); })} - +
- +
); }; From b3623d35c51babbab86ca51a6c20d94841cb73f1 Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Tue, 15 Sep 2020 13:49:17 +0100 Subject: [PATCH 12/14] Dropzone tests --- ui/package-lock.json | 883 ++++++++++++++---- ui/package.json | 14 +- ui/src/components/AddGraph/AddGraph.tsx | 6 +- .../components/add-graph/AddGraph.test.tsx | 27 +- 4 files changed, 759 insertions(+), 171 deletions(-) diff --git a/ui/package-lock.json b/ui/package-lock.json index abaa125..640ae8a 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -309,9 +309,9 @@ }, "dependencies": { "@babel/types": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", - "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", @@ -1019,9 +1019,9 @@ } }, "@babel/preset-env": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.11.0.tgz", - "integrity": "sha512-2u1/k7rG/gTh02dylX2kL3S0IJNF+J6bfDSp4DI2Ma8QN6Y9x9pmAax59fsCk6QUQG0yqH47yJWA+u1I1LccAg==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.11.5.tgz", + "integrity": "sha512-kXqmW1jVcnB2cdueV+fyBM8estd5mlNfaQi6lwLgRwCby4edpavgbFhiBNjmWA3JpB/yZGSISa7Srf+TwxDQoA==", "requires": { "@babel/compat-data": "^7.11.0", "@babel/helper-compilation-targets": "^7.10.4", @@ -1085,7 +1085,7 @@ "@babel/plugin-transform-unicode-escapes": "^7.10.4", "@babel/plugin-transform-unicode-regex": "^7.10.4", "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.11.0", + "@babel/types": "^7.11.5", "browserslist": "^4.12.0", "core-js-compat": "^3.6.2", "invariant": "^2.2.2", @@ -1123,9 +1123,9 @@ } }, "@babel/types": { - "version": "7.11.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.0.tgz", - "integrity": "sha512-O53yME4ZZI0jO1EVGtF1ePGl0LHirG4P1ibcD80XyzZcKhcMFeCXmh4Xb1ifGBIV233Qg12x4rBfQgA+tmOukA==", + "version": "7.11.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.11.5.tgz", + "integrity": "sha512-bvM7Qz6eKnJVFIn+1LPtjlBFPVN5jNDc1XmN15vWe7Q3DPBufWWsLiIvUu7xW87uTG6QoggpIDnUgLQvPheU+Q==", "requires": { "@babel/helper-validator-identifier": "^7.10.4", "lodash": "^4.17.19", @@ -1327,6 +1327,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz", "integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==", + "dev": true, "requires": { "@jest/console": "^24.7.1", "@jest/reporters": "^24.9.0", @@ -1361,12 +1362,14 @@ "ansi-escapes": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -1375,6 +1378,7 @@ "version": "5.2.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, "requires": { "ansi-regex": "^4.1.0" } @@ -1406,6 +1410,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", "integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", + "dev": true, "requires": { "@jest/environment": "^24.9.0", "@jest/test-result": "^24.9.0", @@ -1461,6 +1466,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", "integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", + "dev": true, "requires": { "@jest/test-result": "^24.9.0", "jest-haste-map": "^24.9.0", @@ -2029,9 +2035,9 @@ } }, "@types/enzyme": { - "version": "3.10.5", - "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.10.5.tgz", - "integrity": "sha512-R+phe509UuUYy9Tk0YlSbipRpfVtIzb/9BHn5pTEtjJTF5LXvUjrIQcZvNyANNEyFrd2YGs196PniNT1fgvOQA==", + "version": "3.10.6", + "resolved": "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.10.6.tgz", + "integrity": "sha512-Jxyn2U+UfhmrE7EaeZYfV1sPA5OEDuZmg9Lxj8TxOnfCn71flf0Cn1136LWdCVYj7yapLFmUWqKCcgplWNZCJg==", "dev": true, "requires": { "@types/cheerio": "*", @@ -2053,9 +2059,9 @@ "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==" }, "@types/express": { - "version": "4.17.7", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.7.tgz", - "integrity": "sha512-dCOT5lcmV/uC2J9k0rPafATeeyz+99xTt54ReX11/LObZgfzJqZNcW27zGhYyX+9iSEGXGt5qLPwRSvBZcLvtQ==", + "version": "4.17.8", + "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.8.tgz", + "integrity": "sha512-wLhcKh3PMlyA2cNAB9sjM1BntnhPMiM0JOBwPBqttjHev2428MLEB4AYVN+d8s2iyCVZac+o41Pflm/ZH5vLXQ==", "dev": true, "requires": { "@types/body-parser": "*", @@ -2065,9 +2071,9 @@ } }, "@types/express-serve-static-core": { - "version": "4.17.9", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.9.tgz", - "integrity": "sha512-DG0BYg6yO+ePW+XoDENYz8zhNGC3jDDEpComMYn7WJc4mY1Us8Rw9ax2YhJXxpyk2SF47PQAoQ0YyVT1a0bEkA==", + "version": "4.17.12", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.12.tgz", + "integrity": "sha512-EaEdY+Dty1jEU7U6J4CUWwxL+hyEGMkO5jan5gplfegUgCUsIUWqXxqw47uGjimeT4Qgkz/XUfwoau08+fgvKA==", "dev": true, "requires": { "@types/node": "*", @@ -2254,9 +2260,9 @@ "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==" }, "@types/node": { - "version": "12.12.54", - "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.54.tgz", - "integrity": "sha512-ge4xZ3vSBornVYlDnk7yZ0gK6ChHf/CHB7Gl1I0Jhah8DDnEQqBzgohYG4FX4p81TNirSETOiSyn+y1r9/IR6w==" + "version": "12.12.58", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.12.58.tgz", + "integrity": "sha512-Be46CNIHWAagEfINOjmriSxuv7IVcqbGe+sDSg2SYCEz/0CRBy7LRASGfRbD8KZkqoePU73Wsx3UvOSFcq/9hA==" }, "@types/parse-json": { "version": "4.0.0", @@ -2292,18 +2298,18 @@ "dev": true }, "@types/react": { - "version": "16.9.46", - "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.46.tgz", - "integrity": "sha512-dbHzO3aAq1lB3jRQuNpuZ/mnu+CdD3H0WVaaBQA8LTT3S33xhVBUj232T8M3tAhSWJs/D/UqORYUlJNl/8VQZg==", + "version": "16.9.49", + "resolved": "https://registry.npmjs.org/@types/react/-/react-16.9.49.tgz", + "integrity": "sha512-DtLFjSj0OYAdVLBbyjhuV9CdGVHCkHn2R+xr3XkBvK2rS1Y1tkc14XSGjYgm5Fjjr90AxH9tiSzc1pCFMGO06g==", "requires": { "@types/prop-types": "*", "csstype": "^3.0.2" }, "dependencies": { "csstype": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.2.tgz", - "integrity": "sha512-ofovWglpqoqbfLNOTBNZLSbMuGrblAf1efvvArGKOZMBrIoJeu5UsAipQolkijtyQx5MtAzT/J9IHj/CEY1mJw==" + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.0.3.tgz", + "integrity": "sha512-jPl+wbWPOWJ7SXsWyqGRk3lGecbar0Cb0OvZF/r/ZU011R4YqiRehgkQ9p4eQfo9DSDLqLL3wHwfxeJiuIsNag==" } } }, @@ -2721,6 +2727,11 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, + "abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==" + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -2735,6 +2746,30 @@ "negotiator": "0.6.2" } }, + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "dev": true + }, + "acorn-globals": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", + "dev": true, + "requires": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "dev": true + } + } + }, "acorn-jsx": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", @@ -5501,6 +5536,15 @@ "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==" }, + "cssstyle": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", + "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", + "dev": true, + "requires": { + "cssom": "0.3.x" + } + }, "csstype": { "version": "2.6.11", "resolved": "https://registry.npmjs.org/csstype/-/csstype-2.6.11.tgz", @@ -5795,7 +5839,8 @@ "detect-newline": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", - "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=" + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true }, "detect-node": { "version": "2.0.4", @@ -5966,9 +6011,9 @@ } }, "dompurify": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.12.tgz", - "integrity": "sha512-Fl8KseK1imyhErHypFPA8qpq9gPzlsJ/EukA6yk9o0gX23p1TzC+rh9LqNg1qvErRTc0UNMYlKxEGSfSh43NDg==", + "version": "2.0.15", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.0.15.tgz", + "integrity": "sha512-8AnYW8iXOC7xC7K3FBvQ7+GdmtOsgDGZC5dDXaewCC674qcId7G5mhz5VIEnVShJVjQdlcaPjxpaOzaV9JC3Tg==", "optional": true }, "domutils": { @@ -6171,9 +6216,9 @@ } }, "enzyme-adapter-react-16": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.3.tgz", - "integrity": "sha512-98rqNI4n9HZslWIPuuwy4hK1bxRuMy+XX0CU1dS8iUqcgisTxeBaap6oPp2r4MWC8OphCbbqAT8EU/xHz3zIaQ==", + "version": "1.15.4", + "resolved": "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.15.4.tgz", + "integrity": "sha512-wPzxs+JaGDK2TPYzl5a9YWGce6i2SQ3Cg51ScLeyj2WotUZ8Obcq1ke/U1Y2VGpYlb9rrX2yCjzSMgtKCeAt5w==", "dev": true, "requires": { "enzyme-adapter-utils": "^1.13.1", @@ -6966,6 +7011,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "dev": true, "requires": { "@jest/types": "^24.9.0", "ansi-styles": "^3.2.0", @@ -8955,6 +9001,7 @@ "version": "2.0.8", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, "requires": { "istanbul-lib-coverage": "^2.0.5", "make-dir": "^2.1.0", @@ -8965,6 +9012,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, "requires": { "pify": "^4.0.1", "semver": "^5.6.0" @@ -8973,17 +9021,20 @@ "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true }, "supports-color": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, "requires": { "has-flag": "^3.0.0" } @@ -8994,6 +9045,7 @@ "version": "3.0.6", "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, "requires": { "debug": "^4.1.1", "istanbul-lib-coverage": "^2.0.5", @@ -9006,6 +9058,7 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, "requires": { "ms": "^2.1.1" } @@ -9014,6 +9067,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, "requires": { "pify": "^4.0.1", "semver": "^5.6.0" @@ -9022,17 +9076,20 @@ "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true }, "pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true }, "rimraf": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "dev": true, "requires": { "glob": "^7.1.3" } @@ -9040,7 +9097,8 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true } } }, @@ -9048,6 +9106,7 @@ "version": "2.2.7", "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "dev": true, "requires": { "html-escaper": "^2.0.0" } @@ -9056,6 +9115,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", "integrity": "sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==", + "dev": true, "requires": { "import-local": "^2.0.0", "jest-cli": "^24.9.0" @@ -9065,6 +9125,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", "integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", + "dev": true, "requires": { "@jest/core": "^24.9.0", "@jest/test-result": "^24.9.0", @@ -9087,6 +9148,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", "integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", + "dev": true, "requires": { "@jest/types": "^24.9.0", "execa": "^1.0.0", @@ -9097,6 +9159,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", "integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", + "dev": true, "requires": { "@babel/core": "^7.1.0", "@jest/test-sequencer": "^24.9.0", @@ -9132,6 +9195,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", "integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", + "dev": true, "requires": { "detect-newline": "^2.1.0" } @@ -9140,6 +9204,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", "integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", + "dev": true, "requires": { "@jest/types": "^24.9.0", "chalk": "^2.0.1", @@ -9152,6 +9217,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", "integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", + "dev": true, "requires": { "@jest/environment": "^24.9.0", "@jest/fake-timers": "^24.9.0", @@ -9159,108 +9225,6 @@ "jest-mock": "^24.9.0", "jest-util": "^24.9.0", "jsdom": "^11.5.1" - }, - "dependencies": { - "abab": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz", - "integrity": "sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg==" - }, - "acorn": { - "version": "5.7.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", - "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" - }, - "acorn-globals": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", - "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", - "requires": { - "acorn": "^6.0.1", - "acorn-walk": "^6.0.1" - }, - "dependencies": { - "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" - } - } - }, - "cssstyle": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", - "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", - "requires": { - "cssom": "0.3.x" - } - }, - "jsdom": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", - "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", - "requires": { - "abab": "^2.0.0", - "acorn": "^5.5.3", - "acorn-globals": "^4.1.0", - "array-equal": "^1.0.0", - "cssom": ">= 0.3.2 < 0.4.0", - "cssstyle": "^1.0.0", - "data-urls": "^1.0.0", - "domexception": "^1.0.1", - "escodegen": "^1.9.1", - "html-encoding-sniffer": "^1.0.2", - "left-pad": "^1.3.0", - "nwsapi": "^2.0.7", - "parse5": "4.0.0", - "pn": "^1.1.0", - "request": "^2.87.0", - "request-promise-native": "^1.0.5", - "sax": "^1.2.4", - "symbol-tree": "^3.2.2", - "tough-cookie": "^2.3.4", - "w3c-hr-time": "^1.0.1", - "webidl-conversions": "^4.0.2", - "whatwg-encoding": "^1.0.3", - "whatwg-mimetype": "^2.1.0", - "whatwg-url": "^6.4.1", - "ws": "^5.2.0", - "xml-name-validator": "^3.0.0" - } - }, - "parse5": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", - "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" - }, - "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "requires": { - "punycode": "^2.1.0" - } - }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" - }, - "whatwg-url": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", - "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "xml-name-validator": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", - "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" - } } }, "jest-environment-jsdom-fourteen": { @@ -9383,6 +9347,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", "integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", + "dev": true, "requires": { "@jest/environment": "^24.9.0", "@jest/fake-timers": "^24.9.0", @@ -9431,6 +9396,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", "integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", + "dev": true, "requires": { "@babel/traverse": "^7.1.0", "@jest/environment": "^24.9.0", @@ -9454,6 +9420,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", "integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", + "dev": true, "requires": { "jest-get-type": "^24.9.0", "pretty-format": "^24.9.0" @@ -9519,6 +9486,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", "integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", + "dev": true, "requires": { "@jest/types": "^24.9.0", "jest-regex-util": "^24.3.0", @@ -9529,6 +9497,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", "integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", + "dev": true, "requires": { "@jest/console": "^24.7.1", "@jest/environment": "^24.9.0", @@ -9555,6 +9524,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", "integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", + "dev": true, "requires": { "@jest/console": "^24.7.1", "@jest/environment": "^24.9.0", @@ -9590,6 +9560,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", "integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", + "dev": true, "requires": { "@babel/types": "^7.0.0", "@jest/types": "^24.9.0", @@ -9610,6 +9581,7 @@ "version": "0.5.5", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, "requires": { "minimist": "^1.2.5" } @@ -9617,7 +9589,8 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -9659,6 +9632,7 @@ "version": "24.9.0", "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", "integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", + "dev": true, "requires": { "@jest/types": "^24.9.0", "camelcase": "^5.3.1", @@ -9776,6 +9750,40 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsdom": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "dev": true, + "requires": { + "abab": "^2.0.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.1", + "escodegen": "^1.9.1", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.4", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", + "xml-name-validator": "^3.0.0" + } + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -10415,9 +10423,9 @@ } }, "material-table": { - "version": "1.68.1", - "resolved": "https://registry.npmjs.org/material-table/-/material-table-1.68.1.tgz", - "integrity": "sha512-/pt5TcboQvefyu1KfJ0ALuPdCW4qluCpmeJ80zWNA24U0hfhiaVLxZ29uVXumZVJ6uK3AGwk7XbLZlSIyefUXw==", + "version": "1.69.0", + "resolved": "https://registry.npmjs.org/material-table/-/material-table-1.69.0.tgz", + "integrity": "sha512-Pkm/c5ldXwc+/d245dbRH0zSY+00pJ6aWaDD4rBvDBwVGzZfAa+0Ktan13kM+ZujtsAOcDJYFhNx91CMp8Z++Q==", "requires": { "@date-io/date-fns": "^1.1.0", "@material-ui/pickers": "^3.2.2", @@ -11283,6 +11291,7 @@ "version": "5.4.3", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", "integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", + "dev": true, "requires": { "growly": "^1.3.0", "is-wsl": "^1.1.0", @@ -11294,12 +11303,14 @@ "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, "requires": { "isexe": "^2.0.0" } @@ -11984,6 +11995,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "dev": true, "requires": { "p-reduce": "^1.0.0" } @@ -12152,6 +12164,12 @@ "json-parse-better-errors": "^1.0.1" } }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==", + "dev": true + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -14050,6 +14068,510 @@ "workbox-webpack-plugin": "4.3.1" }, "dependencies": { + "@jest/core": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-24.9.0.tgz", + "integrity": "sha512-Fogg3s4wlAr1VX7q+rhV9RVnUv5tD7VuWfYy1+whMiWUrvl7U3QJSJyWcDio9Lq2prqYsZaeTv2Rz24pWGkJ2A==", + "requires": { + "@jest/console": "^24.7.1", + "@jest/reporters": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "ansi-escapes": "^3.0.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "graceful-fs": "^4.1.15", + "jest-changed-files": "^24.9.0", + "jest-config": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-regex-util": "^24.3.0", + "jest-resolve": "^24.9.0", + "jest-resolve-dependencies": "^24.9.0", + "jest-runner": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", + "jest-watcher": "^24.9.0", + "micromatch": "^3.1.10", + "p-each-series": "^1.0.0", + "realpath-native": "^1.1.0", + "rimraf": "^2.5.4", + "slash": "^2.0.0", + "strip-ansi": "^5.0.0" + } + }, + "@jest/reporters": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-24.9.0.tgz", + "integrity": "sha512-mu4X0yjaHrffOsWmVLzitKmmmWSQ3GGuefgNscUSWNiUNcEOSEQk9k3pERKEQVBb0Cnn88+UESIsZEMH3o88Gw==", + "requires": { + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "glob": "^7.1.2", + "istanbul-lib-coverage": "^2.0.2", + "istanbul-lib-instrument": "^3.0.1", + "istanbul-lib-report": "^2.0.4", + "istanbul-lib-source-maps": "^3.0.1", + "istanbul-reports": "^2.2.6", + "jest-haste-map": "^24.9.0", + "jest-resolve": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-util": "^24.9.0", + "jest-worker": "^24.6.0", + "node-notifier": "^5.4.2", + "slash": "^2.0.0", + "source-map": "^0.6.0", + "string-length": "^2.0.0" + } + }, + "@jest/test-sequencer": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-24.9.0.tgz", + "integrity": "sha512-6qqsU4o0kW1dvA95qfNog8v8gkRN9ph6Lz7r96IvZpHdNipP2cBcb07J1Z45mz/VIS01OHJ3pY8T5fUY38tg4A==", + "requires": { + "@jest/test-result": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-runner": "^24.9.0", + "jest-runtime": "^24.9.0" + } + }, + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==" + }, + "acorn-globals": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.4.tgz", + "integrity": "sha512-clfQEh21R+D0leSbUdWf3OcfqyaCSAQ8Ryq00bofSekfr9W8u1jyYZo6ir0xu9Gtcf7BjcHJpnbZH7JOCpP60A==", + "requires": { + "acorn": "^6.0.1", + "acorn-walk": "^6.0.1" + }, + "dependencies": { + "acorn": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==" + } + } + }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==" + }, + "cssstyle": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.4.0.tgz", + "integrity": "sha512-GBrLZYZ4X4x6/QEoBnIrqb8B/f5l4+8me2dkom/j1Gtbxy0kBv6OGzKuAsGM75bkGwGAFkt56Iwg28S3XTZgSA==", + "requires": { + "cssom": "0.3.x" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=" + }, + "expect": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", + "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "requires": { + "@jest/types": "^24.9.0", + "ansi-styles": "^3.2.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-regex-util": "^24.9.0" + } + }, + "istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "requires": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + } + }, + "istanbul-reports": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.7.tgz", + "integrity": "sha512-uu1F/L1o5Y6LzPVSVZXNOoD/KXpJue9aeLRd0sM9uMXfZvzomB0WxVamWb5ue8kA2vVWEmW7EG+A5n3f1kqHKg==", + "requires": { + "html-escaper": "^2.0.0" + } + }, + "jest": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest/-/jest-24.9.0.tgz", + "integrity": "sha512-YvkBL1Zm7d2B1+h5fHEOdyjCG+sGMz4f8D86/0HiqJ6MB4MnDc8FgP5vdWsGnemOQro7lnYo8UakZ3+5A0jxGw==", + "requires": { + "import-local": "^2.0.0", + "jest-cli": "^24.9.0" + }, + "dependencies": { + "jest-cli": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-24.9.0.tgz", + "integrity": "sha512-+VLRKyitT3BWoMeSUIHRxV/2g8y9gw91Jh5z2UmXZzkZKpbC08CSehVxgHUwTpy+HwGcns/tqafQDJW7imYvGg==", + "requires": { + "@jest/core": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "import-local": "^2.0.0", + "is-ci": "^2.0.0", + "jest-config": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", + "prompts": "^2.0.1", + "realpath-native": "^1.1.0", + "yargs": "^13.3.0" + } + } + } + }, + "jest-changed-files": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-24.9.0.tgz", + "integrity": "sha512-6aTWpe2mHF0DhL28WjdkO8LyGjs3zItPET4bMSeXU6T3ub4FPMw+mcOcbdGXQOAfmLcxofD23/5Bl9Z4AkFwqg==", + "requires": { + "@jest/types": "^24.9.0", + "execa": "^1.0.0", + "throat": "^4.0.0" + } + }, + "jest-config": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-24.9.0.tgz", + "integrity": "sha512-RATtQJtVYQrp7fvWg6f5y3pEFj9I+H8sWw4aKxnDZ96mob5i5SD6ZEGWgMLXQ4LE8UurrjbdlLWdUeo+28QpfQ==", + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^24.9.0", + "@jest/types": "^24.9.0", + "babel-jest": "^24.9.0", + "chalk": "^2.0.1", + "glob": "^7.1.1", + "jest-environment-jsdom": "^24.9.0", + "jest-environment-node": "^24.9.0", + "jest-get-type": "^24.9.0", + "jest-jasmine2": "^24.9.0", + "jest-regex-util": "^24.3.0", + "jest-resolve": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", + "micromatch": "^3.1.10", + "pretty-format": "^24.9.0", + "realpath-native": "^1.1.0" + } + }, + "jest-docblock": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-24.9.0.tgz", + "integrity": "sha512-F1DjdpDMJMA1cN6He0FNYNZlo3yYmOtRUnktrT9Q37njYzC5WEaDdmbynIgy0L/IvXvvgsG8OsqhLPXTpfmZAA==", + "requires": { + "detect-newline": "^2.1.0" + } + }, + "jest-each": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-24.9.0.tgz", + "integrity": "sha512-ONi0R4BvW45cw8s2Lrx8YgbeXL1oCQ/wIDwmsM3CqM/nlblNCPmnC3IPQlMbRFZu3wKdQ2U8BqM6lh3LJ5Bsog==", + "requires": { + "@jest/types": "^24.9.0", + "chalk": "^2.0.1", + "jest-get-type": "^24.9.0", + "jest-util": "^24.9.0", + "pretty-format": "^24.9.0" + } + }, + "jest-environment-jsdom": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-24.9.0.tgz", + "integrity": "sha512-Zv9FV9NBRzLuALXjvRijO2351DRQeLYXtpD4xNvfoVFw21IOKNhZAEUKcbiEtjTkm2GsJ3boMVgkaR7rN8qetA==", + "requires": { + "@jest/environment": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-util": "^24.9.0", + "jsdom": "^11.5.1" + } + }, + "jest-environment-node": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-24.9.0.tgz", + "integrity": "sha512-6d4V2f4nxzIzwendo27Tr0aFm+IXWa0XEUnaH6nU0FMaozxovt+sfRvh4J47wL1OvF83I3SSTu0XK+i4Bqe7uA==", + "requires": { + "@jest/environment": "^24.9.0", + "@jest/fake-timers": "^24.9.0", + "@jest/types": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-util": "^24.9.0" + } + }, + "jest-jasmine2": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-24.9.0.tgz", + "integrity": "sha512-Cq7vkAgaYKp+PsX+2/JbTarrk0DmNhsEtqBXNwUHkdlbrTBLtMJINADf2mf5FkowNsq8evbPc07/qFO0AdKTzw==", + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "chalk": "^2.0.1", + "co": "^4.6.0", + "expect": "^24.9.0", + "is-generator-fn": "^2.0.0", + "jest-each": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "pretty-format": "^24.9.0", + "throat": "^4.0.0" + } + }, + "jest-leak-detector": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-24.9.0.tgz", + "integrity": "sha512-tYkFIDsiKTGwb2FG1w8hX9V0aUb2ot8zY/2nFg087dUageonw1zrLMP4W6zsRO59dPkTSKie+D4rhMuP9nRmrA==", + "requires": { + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + } + }, + "jest-resolve-dependencies": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-24.9.0.tgz", + "integrity": "sha512-Fm7b6AlWnYhT0BXy4hXpactHIqER7erNgIsIozDXWl5dVm+k8XdGVe1oTg1JyaFnOxarMEbax3wyRJqGP2Pq+g==", + "requires": { + "@jest/types": "^24.9.0", + "jest-regex-util": "^24.3.0", + "jest-snapshot": "^24.9.0" + } + }, + "jest-runner": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-24.9.0.tgz", + "integrity": "sha512-KksJQyI3/0mhcfspnxxEOBueGrd5E4vV7ADQLT9ESaCzz02WnbdbKWIf5Mkaucoaj7obQckYPVX6JJhgUcoWWg==", + "requires": { + "@jest/console": "^24.7.1", + "@jest/environment": "^24.9.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "chalk": "^2.4.2", + "exit": "^0.1.2", + "graceful-fs": "^4.1.15", + "jest-config": "^24.9.0", + "jest-docblock": "^24.3.0", + "jest-haste-map": "^24.9.0", + "jest-jasmine2": "^24.9.0", + "jest-leak-detector": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-resolve": "^24.9.0", + "jest-runtime": "^24.9.0", + "jest-util": "^24.9.0", + "jest-worker": "^24.6.0", + "source-map-support": "^0.5.6", + "throat": "^4.0.0" + } + }, + "jest-runtime": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-24.9.0.tgz", + "integrity": "sha512-8oNqgnmF3v2J6PVRM2Jfuj8oX3syKmaynlDMMKQ4iyzbQzIG6th5ub/lM2bCMTmoTKM3ykcUYI2Pw9xwNtjMnw==", + "requires": { + "@jest/console": "^24.7.1", + "@jest/environment": "^24.9.0", + "@jest/source-map": "^24.3.0", + "@jest/transform": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/yargs": "^13.0.0", + "chalk": "^2.0.1", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "jest-config": "^24.9.0", + "jest-haste-map": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-mock": "^24.9.0", + "jest-regex-util": "^24.3.0", + "jest-resolve": "^24.9.0", + "jest-snapshot": "^24.9.0", + "jest-util": "^24.9.0", + "jest-validate": "^24.9.0", + "realpath-native": "^1.1.0", + "slash": "^2.0.0", + "strip-bom": "^3.0.0", + "yargs": "^13.3.0" + } + }, + "jest-snapshot": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-24.9.0.tgz", + "integrity": "sha512-uI/rszGSs73xCM0l+up7O7a40o90cnrk429LOiK3aeTvfC0HHmldbd81/B7Ix81KSFe1lwkbl7GnBGG4UfuDew==", + "requires": { + "@babel/types": "^7.0.0", + "@jest/types": "^24.9.0", + "chalk": "^2.0.1", + "expect": "^24.9.0", + "jest-diff": "^24.9.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-resolve": "^24.9.0", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "pretty-format": "^24.9.0", + "semver": "^6.2.0" + } + }, + "jest-validate": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-24.9.0.tgz", + "integrity": "sha512-HPIt6C5ACwiqSiwi+OfSSHbK8sG7akG8eATl+IPKaeIjtPOeBUd/g3J7DghugzxrGjI93qS/+RPKe1H6PqvhRQ==", + "requires": { + "@jest/types": "^24.9.0", + "camelcase": "^5.3.1", + "chalk": "^2.0.1", + "jest-get-type": "^24.9.0", + "leven": "^3.1.0", + "pretty-format": "^24.9.0" + } + }, + "jsdom": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz", + "integrity": "sha512-y8Px43oyiBM13Zc1z780FrfNLJCXTL40EWlty/LXUtcjykRBNgLlCjWXpfSPBl2iv+N7koQN+dvqszHZgT/Fjw==", + "requires": { + "abab": "^2.0.0", + "acorn": "^5.5.3", + "acorn-globals": "^4.1.0", + "array-equal": "^1.0.0", + "cssom": ">= 0.3.2 < 0.4.0", + "cssstyle": "^1.0.0", + "data-urls": "^1.0.0", + "domexception": "^1.0.1", + "escodegen": "^1.9.1", + "html-encoding-sniffer": "^1.0.2", + "left-pad": "^1.3.0", + "nwsapi": "^2.0.7", + "parse5": "4.0.0", + "pn": "^1.1.0", + "request": "^2.87.0", + "request-promise-native": "^1.0.5", + "sax": "^1.2.4", + "symbol-tree": "^3.2.2", + "tough-cookie": "^2.3.4", + "w3c-hr-time": "^1.0.1", + "webidl-conversions": "^4.0.2", + "whatwg-encoding": "^1.0.3", + "whatwg-mimetype": "^2.1.0", + "whatwg-url": "^6.4.1", + "ws": "^5.2.0", + "xml-name-validator": "^3.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node-notifier": { + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-5.4.3.tgz", + "integrity": "sha512-M4UBGcs4jeOK9CjTsYwkvH6/MzuUmGCyTW+kCY7uO+1ZVr0+FHGdPdIf5CCLqAaxnRrWidyoQlNkMIIVwbKB8Q==", + "requires": { + "growly": "^1.3.0", + "is-wsl": "^1.1.0", + "semver": "^5.5.0", + "shellwords": "^0.1.1", + "which": "^1.3.0" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, + "p-each-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "requires": { + "p-reduce": "^1.0.0" + } + }, + "parse5": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz", + "integrity": "sha512-VrZ7eOd3T1Fk4XWNXMgiGBK/z0MG48BWG2uQNU4I72fkQuKUTZpl+u9k+CxEG0twMVzSmXEEz12z5Fnw1jIQFA==" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, "resolve": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.0.tgz", @@ -14058,10 +14580,55 @@ "path-parse": "^1.0.6" } }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "requires": { + "ansi-regex": "^4.1.0" + } + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "requires": { + "has-flag": "^3.0.0" + } + }, + "throat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=" + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "ws": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "requires": { + "async-limiter": "~1.0.0" + } } } }, @@ -15484,9 +16051,9 @@ "integrity": "sha512-MTX+MeG5U994cazkjd/9KNAapsHnibjMLnfXodlkXw76JEea0UiNzrqidzo1emMwk7w5Qhc9jd4Bn9TBb1MFwA==" }, "stackblur-canvas": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.3.0.tgz", - "integrity": "sha512-3ZHJv+43D8YttgumssIxkfs3hBXW7XaMS5Ux65fOBhKDYMjbG5hF8Ey8a90RiiJ58aQnAhWbGilPzZ9rkIlWgQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.4.0.tgz", + "integrity": "sha512-Z+HixfgYV0ss3C342DxPwc+UvN1SYWqoz7Wsi3xEDWEnaBkSCL3Ey21gF4io+WlLm8/RIrSnCrDBIEcH4O+q5Q==", "optional": true }, "static-extend": { @@ -16051,7 +16618,8 @@ "throat": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/throat/-/throat-4.1.0.tgz", - "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=" + "integrity": "sha1-iQN8vJLFarGJJua6TLsgDhVnKmo=", + "dev": true }, "through": { "version": "2.3.8", @@ -16169,7 +16737,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, "requires": { "punycode": "^2.1.0" } @@ -17027,8 +17594,7 @@ "webidl-conversions": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true + "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" }, "webpack": { "version": "4.42.0", @@ -17592,7 +18158,6 @@ "version": "6.5.0", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz", "integrity": "sha512-rhRZRqx/TLJQWUpQ6bmrt2UV4f0HCQ463yQuONJqC6fO2VoEb1pTYddbe59SkYq87aoM5A3bdhMZiUiVws+fzQ==", - "dev": true, "requires": { "lodash.sortby": "^4.7.0", "tr46": "^1.0.1", @@ -17918,6 +18483,7 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", + "dev": true, "requires": { "async-limiter": "~1.0.0" } @@ -17927,6 +18493,11 @@ "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz", "integrity": "sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q==" }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==" + }, "xmlchars": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", diff --git a/ui/package.json b/ui/package.json index e485cd0..702009f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -19,14 +19,14 @@ "@material-ui/lab": "^4.0.0-alpha.56", "@testing-library/jest-dom": "^4.2.4", "@testing-library/user-event": "^7.2.1", - "@types/node": "^12.12.54", - "@types/react": "^16.9.46", + "@types/node": "^12.12.58", + "@types/react": "^16.9.49", "@types/react-dom": "^16.9.8", "axios": "^0.19.2", "body-parser": "^1.19.0", "express": "^4.17.1", "json": "^9.0.6", - "material-table": "^1.68.1", + "material-table": "^1.69.0", "material-ui-dropzone": "^3.4.0", "npm-check-updates": "^7.1.1", "react": "^16.13.1", @@ -38,20 +38,20 @@ "react-testing-library": "latest" }, "devDependencies": { - "@babel/preset-env": "^7.11.0", + "@babel/preset-env": "^7.11.5", "@babel/preset-react": "^7.10.4", "@testing-library/react": "^9.5.0", "@types/body-parser": "^1.19.0", - "@types/enzyme": "^3.10.5", + "@types/enzyme": "^3.10.6", "@types/enzyme-adapter-react-16": "^1.0.6", - "@types/express": "^4.17.7", + "@types/express": "^4.17.8", "@types/jest": "26.0.5", "@types/react-router-dom": "^5.1.5", "axios-mock-adapter": "^1.18.2", "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", "concurrently": "^5.3.0", "enzyme": "^3.11.0", - "enzyme-adapter-react-16": "^1.15.3", + "enzyme-adapter-react-16": "^1.15.4", "enzyme-to-json": "^3.5.0", "fetch-mock": "^9.10.7", "jest": "^24.9.0", diff --git a/ui/src/components/AddGraph/AddGraph.tsx b/ui/src/components/AddGraph/AddGraph.tsx index d97eaa7..27c3c7a 100644 --- a/ui/src/components/AddGraph/AddGraph.tsx +++ b/ui/src/components/AddGraph/AddGraph.tsx @@ -146,7 +146,7 @@ export default class AddGraph extends React.Component<{}, IState> { - + @@ -160,7 +160,7 @@ export default class AddGraph extends React.Component<{}, IState> { - { aria-describedby="alert-dialog-slide-description" > - + diff --git a/ui/test/components/add-graph/AddGraph.test.tsx b/ui/test/components/add-graph/AddGraph.test.tsx index 8803a49..655db82 100644 --- a/ui/test/components/add-graph/AddGraph.test.tsx +++ b/ui/test/components/add-graph/AddGraph.test.tsx @@ -1,7 +1,6 @@ import { mount, ReactWrapper } from 'enzyme'; import React from 'react'; import AddGraph from '../../../src/components/AddGraph/AddGraph'; -import { DropzoneArea } from 'material-ui-dropzone'; import { CreateGraphRepo } from '../../../src/rest/repositories/create-graph-repo'; jest.mock('../../../src/rest/repositories/create-graph-repo'); @@ -87,14 +86,24 @@ describe('Add Graph Button', () => { }); }); describe('Dropzone behaviour', () => { - it('should have an input that accepts files', () => { + it('should have an input that accepts JSON files', () => { const dropZone = wrapper.find('input').at(1); expect(dropZone.props().type).toBe('file'); - }); - it('should only accept json files', () => { - const dropZone = wrapper.find('input').at(1); expect(dropZone.props().accept).toBe('application/json'); }); + it('should show and hide when AttachFile icon is clicked', () => { + const component = mount() + expect(component.find('div#dropzone').props().style?.visibility).toBe('hidden'); + + clickAttachFile(component); + + expect(component.find('div#dropzone').props().style?.visibility).toBe(undefined); + + clickCloseDropzone(component); + + // TODO: Fix the expection, dropzone should hide + // expect(component.find('div#dropzone').props()).toBe({}); + }); }); describe('Schema validation integration', () => { it('should display validation errors as an Alert Notification', () => { @@ -148,6 +157,14 @@ function inputSchema(schema: object): void { expect(wrapper.find('textarea').props().value).toBe(JSON.stringify(schema)); } +function clickAttachFile(wrapper: ReactWrapper): void { + wrapper.find('button#attach-file-button').simulate('click'); +} + +function clickCloseDropzone(wrapper: ReactWrapper): void { + wrapper.find('button#close-dropzone-button').simulate('click'); +} + function clickSubmit(): void { wrapper.find('button#add-new-graph-button').simulate('click'); } From 30bc56219cea4a18448358f5e65aa5edb62d5756 Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Tue, 15 Sep 2020 14:59:25 +0100 Subject: [PATCH 13/14] ViewGraphs caption change --- ui/src/components/ViewGraph/ViewGraph.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/components/ViewGraph/ViewGraph.tsx b/ui/src/components/ViewGraph/ViewGraph.tsx index 48a061b..e30b1d5 100644 --- a/ui/src/components/ViewGraph/ViewGraph.tsx +++ b/ui/src/components/ViewGraph/ViewGraph.tsx @@ -82,7 +82,7 @@ export default class ViewGraph extends React.Component<{}, IState> { ))} - {graphs.length === 0 && No Graphs. Add a graph or click Refresh if you have just deployed a Graph.} + {graphs.length === 0 && No Graphs.} From 6c91f2d2fd4ef0c06642e2f5b268ed0a89924c4f Mon Sep 17 00:00:00 2001 From: macenturalxl1 Date: Tue, 15 Sep 2020 15:03:25 +0100 Subject: [PATCH 14/14] Made errormessage alerts consistent --- ui/src/components/AddGraph/AddGraph.tsx | 2 +- ui/test/components/add-graph/AddGraph.test.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/src/components/AddGraph/AddGraph.tsx b/ui/src/components/AddGraph/AddGraph.tsx index 27c3c7a..3802fc4 100644 --- a/ui/src/components/AddGraph/AddGraph.tsx +++ b/ui/src/components/AddGraph/AddGraph.tsx @@ -122,7 +122,7 @@ export default class AddGraph extends React.Component<{}, IState> { {this.state.outcome && } {!this.state.errors.isEmpty() && ( - Error(s): {this.state.errors.errorMessage()} + )} { const expectedMessage = 'Error(s): Elements is missing from schema, ' + 'Types is missing from schema, [\"blah\"] are invalid schema root properties'; - expect(wrapper.find('div.MuiAlert-message').text()).toBe(expectedMessage); + expect(wrapper.find('#notification-alert').text()).toBe(expectedMessage); }); }) describe('On Submit Request', () => {