This repository has been archived by the owner on Nov 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
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 #12 from dcmpa/dev
Merge Tests Update PR Template
- Loading branch information
Showing
13 changed files
with
1,609 additions
and
32 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
|
||
jest.mock('../components/About'); | ||
jest.mock('../components/Archive'); | ||
jest.mock('../components/Home'); | ||
jest.mock('../components/Login'); | ||
jest.mock('../components/Signup'); | ||
jest.mock('../components/ResetPassword'); | ||
jest.mock('../components/FourOhFour'); | ||
|
||
import App from '../AppRouter'; | ||
import About from '../components/About'; | ||
About.mockReturnValue(() => <div />); | ||
import Archive from '../components/Archive'; | ||
Archive.mockReturnValue(() => <div />); | ||
import Home from '../components/Home'; | ||
Home.mockReturnValue(() => <div />); | ||
import Login from '../components/Login'; | ||
Login.mockReturnValue(() => <div />); | ||
import Signup from '../components/Signup'; | ||
Signup.mockReturnValue(() => <div />); | ||
import ResetPassword from '../components/ResetPassword'; | ||
ResetPassword.mockReturnValue(() => <div />); | ||
import FourOhFour from '../components/FourOhFour'; | ||
FourOhFour.mockReturnValue(() => <div />); | ||
|
||
describe('Test AppRouter.js', () => { | ||
it('Component Rendered', () => { | ||
const wrapper = shallow(<App />); | ||
expect(wrapper).toBeTruthy(); | ||
expect(toJson(wrapper)).toMatchSnapshot(); | ||
}); | ||
}); |
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,38 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Test AppRouter.js Component Rendered 1`] = ` | ||
<BrowserRouter> | ||
<section> | ||
<Switch> | ||
<Route | ||
component={[Function]} | ||
exact={true} | ||
path="/" | ||
/> | ||
<Route | ||
component={[Function]} | ||
path="/about" | ||
/> | ||
<Route | ||
component={[Function]} | ||
path="/archive" | ||
/> | ||
<Route | ||
component={[Function]} | ||
path="/login" | ||
/> | ||
<Route | ||
component={[Function]} | ||
path="/signup" | ||
/> | ||
<Route | ||
component={[Function]} | ||
path="/resetpass" | ||
/> | ||
<Route | ||
component={[Function]} | ||
/> | ||
</Switch> | ||
</section> | ||
</BrowserRouter> | ||
`; |
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,3 @@ | ||
import React from 'react'; | ||
|
||
export default () => <div />; |
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,3 @@ | ||
import React from 'react'; | ||
|
||
export default () => <div />; |
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,12 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import About from '../About'; | ||
|
||
describe('Test About.js', () => { | ||
it('Component Rendered', () => { | ||
const wrapper = shallow(<About />); | ||
expect(wrapper).toBeTruthy(); | ||
expect(toJson(wrapper)).toMatchSnapshot(); | ||
}); | ||
}); |
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,12 @@ | ||
import React from 'react'; | ||
import { shallow } from 'enzyme'; | ||
import toJson from 'enzyme-to-json'; | ||
import Archive from '../Archive'; | ||
|
||
describe('Test Archive.js', () => { | ||
it('Component Rendered', () => { | ||
const wrapper = shallow(<Archive />); | ||
expect(wrapper).toBeTruthy(); | ||
expect(toJson(wrapper)).toMatchSnapshot(); | ||
}); | ||
}); |
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,49 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Test About.js Component Rendered 1`] = ` | ||
<section> | ||
<HeaderLite /> | ||
<div | ||
className="App" | ||
> | ||
<header | ||
className="App-header pt-2 p-5" | ||
> | ||
<h1 | ||
className="App-title text-white pt-5" | ||
> | ||
About the Missing Person's Project | ||
</h1> | ||
<p | ||
className="pl-md-5 pr-md-5" | ||
> | ||
This platform will maintain an archive of all information which is published within its domain, users can query the database to search for current cases, un-resolved and resolved cases, and see if there is a law enforcement handler on any of the cases. | ||
</p> | ||
</header> | ||
</div> | ||
<Container | ||
tag="div" | ||
> | ||
<div | ||
className="mt-5 mb-4 d-flex flex-wrap flex-row offset-md-1 text-center" | ||
> | ||
<PreFooter | ||
alt="learn how we work" | ||
heading="Who we Are" | ||
image="document.svg" | ||
/> | ||
<PreFooter | ||
alt="report a case" | ||
heading="Report a Sighting" | ||
image="report.svg" | ||
/> | ||
<PreFooter | ||
alt="donate and contribute" | ||
heading="Support Us" | ||
image="hands.svg" | ||
/> | ||
</div> | ||
</Container> | ||
<Footer /> | ||
</section> | ||
`; |
17 changes: 17 additions & 0 deletions
17
src/components/__tests__/__snapshots__/Archive.test.js.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[`Test Archive.js Component Rendered 1`] = ` | ||
<div | ||
className="App" | ||
> | ||
<header | ||
className="App-header" | ||
> | ||
<h1 | ||
className="App-title" | ||
> | ||
Welcome to Archive Page | ||
</h1> | ||
</header> | ||
</div> | ||
`; |
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,4 @@ | ||
import { configure } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
|
||
configure({ adapter: new Adapter() }); |
Oops, something went wrong.