-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes warning in Hub UI tests by removing deprecated
useobserver
This patch also refactors the App component by creatintg HomePage and ResourceDetailsPage component to fix the react router dom path warnings Signed-off-by: Puneet Punamiya ppunamiy@redhat.com
- Loading branch information
1 parent
6b6e60a
commit 346046a
Showing
24 changed files
with
621 additions
and
578 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
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,8 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import HomePage from '.'; | ||
|
||
it('should render the home page component', () => { | ||
const component = shallow(<HomePage />); | ||
expect(component.debug()).toMatchSnapshot(); | ||
}); |
17 changes: 17 additions & 0 deletions
17
ui/src/components/HomePage/__snapshots__/HomePage.test.tsx.snap
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,17 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`should render the home page component 1`] = ` | ||
"<Fragment> | ||
<Background /> | ||
<PageSection> | ||
<Grid hasGutter={true}> | ||
<GridItem span={2}> | ||
<Memo(observerComponent) /> | ||
</GridItem> | ||
<GridItem span={10} rowSpan={1}> | ||
<Memo(observerComponent) /> | ||
</GridItem> | ||
</Grid> | ||
</PageSection> | ||
</Fragment>" | ||
`; |
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,25 @@ | ||
import React from 'react'; | ||
import { Grid, GridItem, PageSection } from '@patternfly/react-core'; | ||
import LeftPane from '../LeftPane'; | ||
import Background from '../Background'; | ||
import Resources from '../../containers/Resources'; | ||
|
||
const HomePage = () => { | ||
return ( | ||
<> | ||
<Background /> | ||
<PageSection> | ||
<Grid hasGutter> | ||
<GridItem span={2}> | ||
<LeftPane /> | ||
</GridItem> | ||
<GridItem span={10} rowSpan={1}> | ||
<Resources /> | ||
</GridItem> | ||
</Grid> | ||
</PageSection> | ||
</> | ||
); | ||
}; | ||
|
||
export default HomePage; |
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
8 changes: 8 additions & 0 deletions
8
ui/src/components/ResourceDetailsPage/ResourceDetailsPage.test.tsx
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,8 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import ResourceDetailsPage from '.'; | ||
|
||
it('should render the resource details page component', () => { | ||
const component = shallow(<ResourceDetailsPage />); | ||
expect(component.debug()).toMatchSnapshot(); | ||
}); |
Oops, something went wrong.