-
-
Notifications
You must be signed in to change notification settings - Fork 118
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 #850 from Ignitus/develop
Master > Develop
- Loading branch information
Showing
223 changed files
with
2,174 additions
and
764 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
553 changes: 553 additions & 0 deletions
553
src/ignitus-AboutPage/ignitus-CoreTeam/Components/__snapshots__/index.test.tsx.snap
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/ignitus-AboutPage/ignitus-CoreTeam/Components/index.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,34 @@ | ||
import React from 'react'; | ||
import { render, mount } from 'enzyme'; | ||
import { CoreTeam } from './index'; | ||
import { Data } from '../constants'; | ||
|
||
React.useLayoutEffect = React.useEffect; | ||
|
||
let wrapper; | ||
beforeEach(() => { | ||
wrapper = mount(<CoreTeam />); | ||
}); | ||
|
||
describe('<CoreTeam />', () => { | ||
it('should be rendered', () => { | ||
const tree = render(wrapper); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
|
||
it('should render correct title', () => { | ||
expect(wrapper.find('h2').text()).toBe(' Our Team '); | ||
}); | ||
|
||
it('should render correct core team data correctly', () => { | ||
expect(wrapper.find('TeamItem').length).toBe(Data.length); | ||
Data.forEach((val: any, index: number) => { | ||
expect( | ||
wrapper | ||
.find('TeamItem') | ||
.at(index) | ||
.props().item === val, | ||
); | ||
}); | ||
}); | ||
}); |
86 changes: 86 additions & 0 deletions
86
src/ignitus-AboutPage/ignitus-Team/Components/__snapshots__/index.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,86 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<Team /> should be rendered 1`] = ` | ||
<div | ||
class="css-1hs3667" | ||
> | ||
<div | ||
class="css-1uzyx05" | ||
> | ||
<div | ||
class="css-1hs3667" | ||
> | ||
<h2 | ||
class="css-lcriaz" | ||
> | ||
<svg | ||
aria-label="Plus Icon" | ||
class="css-1p4zvgu" | ||
role="img" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<title> | ||
Plus Icon | ||
</title> | ||
<path | ||
d="M0 0h24v24H0V0z" | ||
fill="none" | ||
/> | ||
<path | ||
d="M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z" | ||
/> | ||
</svg> | ||
1 Contributors | ||
</h2> | ||
<p | ||
class="css-gvbdwp" | ||
> | ||
This project was made possible by these contributors. 🎉 🎨 | ||
</p> | ||
</div> | ||
<div | ||
class="css-1guir8e" | ||
> | ||
<div | ||
class="css-16kcklx" | ||
> | ||
<a | ||
class="css-861jbu" | ||
href="https://github.com/octocat" | ||
rel="noopener noreferrer" | ||
target="_blank" | ||
> | ||
<img | ||
alt="avatar octocat" | ||
class="css-a07s8t" | ||
src="https://github.com/images/error/octocat_happy.gif" | ||
width="100%" | ||
/> | ||
</a> | ||
</div> | ||
<a | ||
class="css-jgl6n1" | ||
href="https://github.com/Ignitus/Ignitus-client/graphs/contributors" | ||
> | ||
View All | ||
<svg | ||
aria-hidden="true" | ||
aria-label="KeyBoardArrowDown" | ||
class="css-1p4zvgu" | ||
data-icon="KeyBoardArrowDown" | ||
viewBox="0 0 24 24" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<title> | ||
KeyBoardArrowDown | ||
</title> | ||
<path | ||
d="M8.12 9.29L12 13.17l3.88-3.88c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0L6.7 10.7c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z" | ||
/> | ||
</svg> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
65 changes: 65 additions & 0 deletions
65
src/ignitus-AboutPage/ignitus-Team/Components/index.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,65 @@ | ||
import React from 'react'; | ||
import { render, mount } from 'enzyme'; | ||
import { Team } from './index'; | ||
import { GitHubDataType } from '../types'; | ||
|
||
React.useLayoutEffect = React.useEffect; | ||
/*eslint-disable*/ | ||
const octocatGithubData: GitHubDataType = { | ||
login: 'octocat', | ||
id: 1, | ||
node_id: 'MDQ6VXNlcjE=', | ||
avatar_url: 'https://github.com/images/error/octocat_happy.gif', | ||
gravatar_id: '', | ||
url: 'https://api.github.com/users/octocat', | ||
html_url: 'https://github.com/octocat', | ||
followers_url: 'https://api.github.com/users/octocat/followers', | ||
following_url: 'https://api.github.com/users/octocat/following{/other_user}', | ||
gists_url: 'https://api.github.com/users/octocat/gists{/gist_id}', | ||
starred_url: 'https://api.github.com/users/octocat/starred{/owner}{/repo}', | ||
subscriptions_url: 'https://api.github.com/users/octocat/subscriptions', | ||
organizations_url: 'https://api.github.com/users/octocat/orgs', | ||
repos_url: 'https://api.github.com/users/octocat/repos', | ||
events_url: 'https://api.github.com/users/octocat/events{/privacy}', | ||
received_events_url: 'https://api.github.com/users/octocat/received_events', | ||
type: 'User', | ||
site_admin: false, | ||
contributions: 1000, | ||
user_id: 1234, | ||
}; | ||
/* eslint-enable */ | ||
|
||
let wrapper; | ||
const props: any = { | ||
getContributorsData() { | ||
return []; | ||
}, | ||
contributorsData: { | ||
presets: [octocatGithubData], | ||
isFetching: false, | ||
}, | ||
}; | ||
beforeEach(() => { | ||
wrapper = mount(<Team {...props} />); | ||
}); | ||
|
||
describe('<Team />', () => { | ||
it('should be rendered', () => { | ||
const tree = render(wrapper); | ||
expect(tree).toMatchSnapshot(); | ||
}); | ||
|
||
it('should render correct title', () => { | ||
expect(wrapper.find('h2').text()).toBe('Plus Icon1 Contributors'); | ||
}); | ||
|
||
it('shoud render contributors data correctly', () => { | ||
expect(wrapper.find('PureTeam').length).toBe(1); | ||
expect( | ||
wrapper | ||
.find('PureTeam') | ||
.at(0) | ||
.props('contributors') === octocatGithubData, | ||
); | ||
}); | ||
}); |
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
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
2 changes: 1 addition & 1 deletion
2
src/ignitus-Authentication/ignitus-CommonLoginInterface/Containers/professorLogin.ts
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
2 changes: 1 addition & 1 deletion
2
src/ignitus-Authentication/ignitus-CommonLoginInterface/Containers/studenLogin.ts
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
2 changes: 1 addition & 1 deletion
2
src/ignitus-Authentication/ignitus-CommonLoginInterface/index.ts
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
2 changes: 1 addition & 1 deletion
2
src/ignitus-Authentication/ignitus-CommonSignupInterface/Containers/professorSignup.ts
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
2 changes: 1 addition & 1 deletion
2
src/ignitus-Authentication/ignitus-CommonSignupInterface/Containers/studentSignup.ts
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
2 changes: 1 addition & 1 deletion
2
src/ignitus-Authentication/ignitus-CommonSignupInterface/index.ts
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
Oops, something went wrong.