-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from nasa/issue_16
Issue 16
- Loading branch information
Showing
115 changed files
with
6,660 additions
and
9,167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import React from "react" | ||
import { render } from "@bach/test-utils"; | ||
import { Router } from 'react-router-dom' | ||
import {createMemoryHistory} from 'history' | ||
import { getUrlParams, pushUrlParams } from "@bach/api/DataUtils" | ||
|
||
describe("DataUtils test", () => { | ||
it("should parse query params", () => { | ||
// ARRANGE | ||
const history = createMemoryHistory() | ||
render(<Router history={history}><></></Router>) | ||
history.push("/dummyPath?param1¶m2=value2") | ||
|
||
// ACT | ||
const params = getUrlParams(history); | ||
|
||
// ASSERT | ||
expect(params).toEqual({ | ||
"param1": undefined, | ||
"param2": "value2" | ||
}); | ||
}); | ||
|
||
it("should push query params", () => { | ||
// ARRANGE | ||
const history = createMemoryHistory() | ||
render(<Router history={history}><></></Router>) | ||
|
||
// ACT | ||
const params = pushUrlParams( | ||
{ | ||
"param1": undefined, | ||
"param2": "value2", | ||
"startDate": true // needs to be truthy | ||
}, | ||
history | ||
); | ||
|
||
// ASSERT | ||
expect(history.location.search).toEqual("?start_date=true"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,15 @@ | ||
import { makeStyles } from "@material-ui/core/styles"; | ||
|
||
export default makeStyles(() => ({ | ||
export default makeStyles((theme) => ({ | ||
filterControlPaper: { | ||
backgroundColor: "inherit", | ||
display: "flex", | ||
flexDirection: "row", | ||
alignItems: "center", | ||
padding: "17px", | ||
}, | ||
visibilityBtn: { | ||
flex: "none", | ||
order: 0, | ||
flexGrow: 0, | ||
margin: "0px 0px", | ||
height: "32px", | ||
left: 0, | ||
top: 0, | ||
borderRadius: 4, | ||
color: "#007DFF", | ||
borderColor: "#007DFF", | ||
fontFamily: "Roboto", | ||
fontStyle: "normal", | ||
fontWeight: 500, | ||
fontSize: 14, | ||
lineHeight: 24, | ||
color: theme.palette.primary.main, | ||
borderColor: theme.palette.primary.main, | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.