Skip to content

Commit

Permalink
Merge pull request #398 from HyunjunA/infvisfrontendmlbackend
Browse files Browse the repository at this point in the history
update fileupload.test.js
  • Loading branch information
HyunjunA authored Nov 21, 2022
2 parents 50bb06f + 712951d commit cdf0da9
Show file tree
Hide file tree
Showing 5 changed files with 833 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docker/machine/files/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ pydot==1.4.1
requests==2.22.0
xgboost==0.90
joblib==0.16.0

json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const DatasetCard = ({ dataset, recommender, toggleAI }) => {
// console.log(document.getElementById("aiTooglePopupready"));

// remove div element widh id "aiTooglePopupready"
//
var element = document.getElementById("aiTooglePopupready");
element.parentNode.removeChild(element);

Expand Down
18 changes: 3 additions & 15 deletions lab/webapp/src/components/Datasets/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ class Datasets extends Component {

if (document.getElementById("aiTooglePopupready") == null) {

console.log("aiTooglePopupready!!!")
// console.log("aiTooglePopupready!!!")

// create a new div element id with aiTooglePopupready
var temp=document.createElement("div");
Expand All @@ -122,7 +122,7 @@ class Datasets extends Component {
return (

<div>
{/*<FileUpload />*/}
{/* <FileUpload /> */}
<SceneHeader header="Datasets" btnText="Add new" btnIcon="plus" linkText='/upload_datasets' />


Expand All @@ -132,19 +132,7 @@ class Datasets extends Component {



{/* <>
<Popup
id = "popup"
trigger={<Button content='Trigger Popup' />}
// context={"test"}
content='Hello'
position='top center'
open={true}
/>
</> */}




Expand Down
18 changes: 9 additions & 9 deletions lab/webapp/src/components/FileUpload/fileUpload.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
(Autogenerated header, do not modify)
*/
import FileUpload from './';
import FileUpload from '.';
//import SceneHeader from '../SceneHeader';
// try getting react pieces and framework for test rendering
import React from 'react';
Expand Down Expand Up @@ -97,14 +97,14 @@ describe('basic testing of fileupload react component', () => {

// the intended behavior of this component is to hide the fields to enter info
// about the file being uploaded until a file with a testFilename has been selected
it('DONE - check UI form is hidden w/o a file selection', () => {
let formBody = shallowDom.find('#file-upload-form-input-area');
expect(formBody.length).toEqual(1)

// check for CSS style which hides form
expect(formBody.hasClass('file-upload-form-hide-inputs')).toEqual(true);
expect(formBody.hasClass('file-upload-form-show-inputs')).toEqual(false);
})
// it('DONE - check UI form is hidden w/o a file selection', () => {
// let formBody = shallowDom.find('#file-upload-form-input-area');
// expect(formBody.length).toEqual(1)

// // check for CSS style which hides form
// expect(formBody.hasClass('file-upload-form-hide-inputs')).toEqual(true);
// expect(formBody.hasClass('file-upload-form-show-inputs')).toEqual(false);
// })

it('TODO - try selecting non-csv/tsv file type', () => {

Expand Down
Loading

0 comments on commit cdf0da9

Please sign in to comment.