diff --git a/lab/webapp/package-lock.json b/lab/webapp/package-lock.json index 3ca5d0863..b6e5e8c45 100644 --- a/lab/webapp/package-lock.json +++ b/lab/webapp/package-lock.json @@ -4281,6 +4281,15 @@ "@babel/types": "^7.3.0" } }, + "@types/cheerio": { + "version": "0.22.24", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.24.tgz", + "integrity": "sha512-iKXt/cwltGvN06Dd6zwQG1U35edPwId9lmcSeYfcxSNvvNg4vysnFB+iBQNjj06tSVV7MBj0GWMQ7dwb4Z+p8Q==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, "@types/color-name": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", @@ -7644,6 +7653,25 @@ "object-is": "^1.0.2" } }, + "enzyme-to-json": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/enzyme-to-json/-/enzyme-to-json-3.6.1.tgz", + "integrity": "sha512-15tXuONeq5ORoZjV/bUo2gbtZrN2IH+Z6DvL35QmZyKHgbY1ahn6wcnLd9Xv9OjiwbAXiiP8MRZwbZrCv1wYNg==", + "dev": true, + "requires": { + "@types/cheerio": "^0.22.22", + "lodash": "^4.17.15", + "react-is": "^16.12.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + } + } + }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", diff --git a/lab/webapp/package.json b/lab/webapp/package.json index 944d228f4..801e009ea 100644 --- a/lab/webapp/package.json +++ b/lab/webapp/package.json @@ -53,6 +53,7 @@ "clean-webpack-plugin": "^3.0.0", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.2", + "enzyme-to-json": "^3.6.1", "fetch-mock": "^7.7.3", "html-webpack-plugin": "^3.2.0", "html-webpack-template": "^6.2.0", @@ -71,6 +72,7 @@ "webpack-merge": "^4.2.2" }, "jest": { + "snapshotSerializers": ["enzyme-to-json/serializer"], "transform": { "^.+\\.jsx?$": "babel-jest", "^.+\\.js?$": "babel-jest", diff --git a/lab/webapp/src/components/FileUpload/__snapshots__/fileUpload.test.js.snap b/lab/webapp/src/components/FileUpload/__snapshots__/fileUpload.test.js.snap new file mode 100644 index 000000000..8d6d9d378 --- /dev/null +++ b/lab/webapp/src/components/FileUpload/__snapshots__/fileUpload.test.js.snap @@ -0,0 +1,415 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic testing of fileupload react component DONE - full component snapshot 1`] = ` +
+ +
+ + + + +
+
+ +
+ Specification +
+
+ + + + + + + +

+ + The column that describes the label or output for each row. + For example, if analyzing a dataset of patients with different types of diabetes, + this column may have the values "type1", "type2", or "none". + +

+
+ } + disabled={false} + eventsEnabled={true} + header="Target Column Help" + offset={0} + on="click" + pinned={false} + position="right center" + trigger={ + + } + /> + + + + + + +

+ + Classification + + algorithms are used to model discrete categorical outputs. Examples include modeling the color car someone might buy ("red", "green", "blue"...) or a disease state ("type1Diabetes", "type2Diabetes", "none"...) +
+
+ + Regression + + algorithms are used to model a continuous valued output. Examples include modeling the amount of money a house is predicted to sell for. +

+
+ } + disabled={false} + eventsEnabled={true} + header="Prediction Type Help" + offset={0} + on="click" + pinned={false} + position="left center" + trigger={ + + } + /> + + + + +
+ + + + +
+ } + disabled={false} + eventsEnabled={true} + header="Ordinal Features Help" + offset={0} + on="click" + pinned={false} + position="right center" + trigger={ + + } + /> + + + + +