Skip to content

Commit

Permalink
Merge pull request #76 from topcoder-platform/develop
Browse files Browse the repository at this point in the history
Stats integration
  • Loading branch information
ajefts authored Jun 14, 2017
2 parents 5ba77dc + 83b6610 commit 9085d44
Show file tree
Hide file tree
Showing 32 changed files with 1,435 additions and 167 deletions.
13 changes: 3 additions & 10 deletions __tests__/shared/components/tc-communities/IconStat.jsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
import React from 'react';
import Rnd from 'react-test-renderer/shallow';
import Render from 'react-test-renderer';
import IconStat from 'components/tc-communities/IconStat';

const rnd = new Rnd();

function Icon() {
return <div />;
}

test('Snapshot match', () => {
rnd.render((
<IconStat icon={Icon} number="5" label="Projects" />
));
expect(rnd.getRenderOutput()).toMatchSnapshot();

rnd.render((
const render = Render.create((
<IconStat
icon={Icon}
number="5"
Expand All @@ -27,5 +20,5 @@ test('Snapshot match', () => {
}}
/>
));
expect(rnd.getRenderOutput()).toMatchSnapshot();
expect(render.toJSON()).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,18 @@ exports[`Snapshot match 1`] = `
<div
className="src-shared-components-tc-communities-Header-___style__authorize___3ARhM"
>
<a
<button
className="src-shared-components-tc-communities-Header-___style__btnRegister___2mlu6"
href="/some/register/url"
onClick={[Function]}
>
Register
</a>
<a
</button>
<button
className="src-shared-components-tc-communities-Header-___style__btnLogin___37sgV"
href="/some/login/url"
onClick={[Function]}
>
Login
</a>
</button>
</div>
<div
className="src-shared-components-tc-communities-Header-___style__search___3BJGl"
Expand Down Expand Up @@ -211,18 +211,18 @@ exports[`Snapshot match 2`] = `
<div
className="src-shared-components-tc-communities-Header-___style__authorize___3ARhM"
>
<a
<button
className="src-shared-components-tc-communities-Header-___style__btnRegister___2mlu6"
href="/some/register/url"
onClick={[Function]}
>
Register
</a>
<a
</button>
<button
className="src-shared-components-tc-communities-Header-___style__btnLogin___37sgV"
href="/some/login/url"
onClick={[Function]}
>
Login
</a>
</button>
</div>
<div
className="src-shared-components-tc-communities-Header-___style__search___3BJGl"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,19 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Snapshot match 1`] = `
<IconStat
icon={[Function]}
label="Projects"
number="5"
theme={
Object {
"container": "src-shared-components-tc-communities-IconStat-___style__container___145TJ",
"icon": "src-shared-components-tc-communities-IconStat-___style__icon___2PSr9",
"label": "src-shared-components-tc-communities-IconStat-___style__label___3v7Pl",
"number": "src-shared-components-tc-communities-IconStat-___style__number___3GKcu",
}
}
/>
`;

exports[`Snapshot match 2`] = `
<IconStat
icon={[Function]}
label="Projects"
number="5"
theme={
Object {
"container": "src-shared-components-tc-communities-IconStat-___style__container___145TJ container",
"icon": "src-shared-components-tc-communities-IconStat-___style__icon___2PSr9 icon",
"label": "src-shared-components-tc-communities-IconStat-___style__label___3v7Pl label",
"number": "src-shared-components-tc-communities-IconStat-___style__number___3GKcu number",
}
}
/>
<div
className="src-shared-components-tc-communities-IconStat-___style__container___145TJ container"
>
<div />
<p
className="src-shared-components-tc-communities-IconStat-___style__number___3GKcu number"
>
5
</p>
<p
className="src-shared-components-tc-communities-IconStat-___style__label___3v7Pl label"
>
Projects
</p>
</div>
`;
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import Rnd from 'react-test-renderer/shallow';
import Home from 'components/tc-communities/communities/demo-expert/Home';

const rnd = new Rnd();

test('Snapshot match', () => {
rnd.render((
<Home />
));
expect(rnd.getRenderOutput()).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import React from 'react';
import Rnd from 'react-test-renderer/shallow';
import Learn from 'components/tc-communities/communities/demo-expert/Learn';

const rnd = new Rnd();

test('Snapshot match', () => {
rnd.render((
<Learn />
));
expect(rnd.getRenderOutput()).toMatchSnapshot();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Snapshot match 1`] = `
<main>
<ThemedBanner
composeTheme="deeply"
imageSrc="/themes/wipro/home/banner.jpg"
link={
Object {
"title": "Compete Now",
"url": "challenges",
}
}
mapThemrProps={[Function]}
text="Wipro's Hybrid Crowd gives our vast ecosystem of customers and partners options to access new range of skills that provide new value services and efficiency options all over the world."
theme={Object {}}
title="Wipro Crowd"
/>
<Connect(GroupStatsContainer) />
<ThemedSection
composeTheme="deeply"
link={null}
mapThemrProps={[Function]}
theme={
Object {
"container": "src-shared-components-tc-communities-communities-demo-expert-Home-___style__linksContainer___15dON",
}
}
title={null}
>
<div>
<ThemedImageText
composeTheme="deeply"
imageSrc="/themes/wipro/home/image-text-learn.jpg"
link={
Object {
"title": "Start Learning",
"url": "learn",
}
}
mapThemrProps={[Function]}
text="Our continuously evolving structured learning paths, constantly abreast of the latest, tailored for employees to deepen your knowledge, infuses important software capabilities that are industry specific and help you get the skills you need to succeed."
theme={Object {}}
title="Improve Your Skills"
/>
<ThemedImageText
composeTheme="deeply"
imageSrc="/themes/wipro/home/image-text-do.jpg"
link={
Object {
"title": "Start Earning",
"url": "challenges",
}
}
mapThemrProps={[Function]}
text="Rewards program is intended to celebrate and recognize your contribution. Rewards for project contributions are given using ‘Reward Points’. Points earned translate into badges. Quarterly rewards are given away to the toppers of all categories."
theme={Object {}}
title="Get Involved"
/>
</div>
</ThemedSection>
<ThemedSection
composeTheme="deeply"
link={null}
mapThemrProps={[Function]}
theme={
Object {
"container": "src-shared-components-tc-communities-communities-demo-expert-Home-___style__resourcesContainer___3u3oE",
}
}
title={null}
>
<ThemedResourceCard
composeTheme="deeply"
icon={[Function]}
link={
Object {
"title": "Browse resources",
"url": "learn",
}
}
mapThemrProps={[Function]}
text="Pellentesque non dignissim neque. Nunc vel rhoncus nibh, ut tincidunt turpis. Integer ac enim pellentesque, adipiscing metus id, pharetra odio."
theme={Object {}}
title="Up Your iOS and Swift Development Skills"
/>
<ThemedResourceCard
composeTheme="deeply"
icon={[Function]}
link={
Object {
"title": "Learn about badges",
"url": "leaderboard",
}
}
mapThemrProps={[Function]}
text="Donec bibendum nunc sit amet tortor scelerisque luctus et sit amet mauris. Suspendisse felis sem, condimentum ullamcorper est sit amet, molestie"
theme={Object {}}
title="Take the First Steps to Stand Out in the Community"
/>
<ThemedResourceCard
composeTheme="deeply"
icon={[Function]}
link={
Object {
"title": "Browse challenges",
"url": "challenges",
}
}
mapThemrProps={[Function]}
text="Suspendisse felis sem, condimentum ullamcorper est sit amet, molestie mollis nulla. Etiam lorem orci, consequat ac magna quis, facilisis"
theme={Object {}}
title="Compete in Challenges and Win Cash"
/>
</ThemedSection>
<NewsSection
news={Array []}
/>
<ThemedNewsletterSignup
buttonText="Sign Up"
composeTheme="deeply"
emailPlaceholder="Email address"
imageSrc="/themes/wipro/subscribe-bg.jpg"
mapThemrProps={[Function]}
text="Don’t miss out on the latest Topcoder IOS challenges and information!"
theme={Object {}}
title="Sign up for our newsletter"
/>
</main>
`;
Loading

0 comments on commit 9085d44

Please sign in to comment.