forked from yTakkar/React-Instagram-Clone-2.0
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finished UI testing. 100% JSX converage
- Loading branch information
Showing
145 changed files
with
6,068 additions
and
356 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
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file not shown.
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,21 @@ | ||
import React from 'react' | ||
import MockDataElement from '../../utils/__test__/mock-dataElement' | ||
import { PureApp } from '../App' | ||
import { shallow } from 'enzyme' | ||
|
||
describe('App Component', () => { | ||
MockDataElement() | ||
|
||
// shallow snapshot | ||
it('should match snapshot', () => { | ||
const tree = shallow( | ||
<PureApp | ||
unreadNotifications={1} | ||
unreadMessages={0} | ||
dispatch={jest.fn()} | ||
/> | ||
) | ||
expect(tree).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,19 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`App Component should match snapshot 1`] = ` | ||
<BrowserRouter> | ||
<div | ||
className="app" | ||
> | ||
<Header /> | ||
<Connect(NotiSpeak) | ||
un={1} | ||
/> | ||
<SideBar | ||
uc={0} | ||
un={1} | ||
/> | ||
<AppRoutes /> | ||
</div> | ||
</BrowserRouter> | ||
`; |
8 changes: 4 additions & 4 deletions
8
src/components/explore/photos/__test__/explore-photos.test.js
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
119 changes: 119 additions & 0 deletions
119
src/components/group/__test__/__snapshots__/group-nav.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,119 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`GroupNav Component should match snapshot 1`] = ` | ||
<div | ||
className="pro_nav user_nav" | ||
> | ||
<ul> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11" | ||
onClick={[Function]} | ||
> | ||
Posts | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/members" | ||
onClick={[Function]} | ||
> | ||
Members | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/gallery" | ||
onClick={[Function]} | ||
> | ||
Gallery | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/about" | ||
onClick={[Function]} | ||
> | ||
About | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
`; | ||
|
||
exports[`GroupNav Component should match snapshot and show edit & add-member links also 1`] = ` | ||
<div | ||
className="pro_nav user_nav" | ||
> | ||
<ul> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11" | ||
onClick={[Function]} | ||
> | ||
Posts | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/members" | ||
onClick={[Function]} | ||
> | ||
Members | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/gallery" | ||
onClick={[Function]} | ||
> | ||
Gallery | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/edit" | ||
onClick={[Function]} | ||
> | ||
Edit | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/add-members" | ||
onClick={[Function]} | ||
> | ||
Add members | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
aria-current={false} | ||
className="inst_nav" | ||
href="/group/11/about" | ||
onClick={[Function]} | ||
> | ||
About | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
`; |
Oops, something went wrong.