Merge branch 'master' into add-github-streak-stats
Checks were failing in the previously merged master branch
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,69 +1,578 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`DisplaySocial Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplaySocial Preview renders correctly 1`] = `
|
||||
<a
|
||||
className="no-underline text-blue-700 m-2"
|
||||
href="https://codepen.io/dummy"
|
||||
target="blank"
|
||||
>
|
||||
<img
|
||||
alt="props.username"
|
||||
className="w-6 h-6"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
|
||||
/>
|
||||
</a>
|
||||
`;
|
||||
|
||||
exports[`DisplaySocial Preview renders correctly with no username 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplaySocial Preview renders correctly with no username 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="my-2"
|
||||
>
|
||||
[object Object]
|
||||
<a
|
||||
className="no-underline text-blue-700"
|
||||
href="https://dummy.com"
|
||||
target="blank"
|
||||
>
|
||||
readme-generator
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no link 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly with no link 1`] = `
|
||||
<div
|
||||
className="my-2"
|
||||
>
|
||||
[object Object]
|
||||
<b>
|
||||
readme-generator
|
||||
</b>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no prefix 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly with no prefix 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no prefix and link 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly with no prefix and link 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no prefix, link and project 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly with no prefix, link and project 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no project 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly with no project 1`] = `
|
||||
<div
|
||||
className="my-2"
|
||||
>
|
||||
[object Object]
|
||||
<a
|
||||
className="no-underline text-blue-700"
|
||||
href="https://dummy.com"
|
||||
target="blank"
|
||||
>
|
||||
https://dummy.com
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no project and link 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly with no project and link 1`] = `""`;
|
||||
|
||||
exports[`DisplayWork Preview renders correctly with no project and prefix 1`] = `ShallowWrapper {}`;
|
||||
exports[`DisplayWork Preview renders correctly with no project and prefix 1`] = `""`;
|
||||
|
||||
exports[`GitHubStats Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`GitHubStats Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`GitHubStats Preview renders correctly 2`] = `ShallowWrapper {}`;
|
||||
exports[`GitHubStats Preview renders correctly 2`] = `
|
||||
<div
|
||||
className="text-center mx-4 mb-4"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
src="https://github-readme-stats.vercel.app/api?username=&show_icons=true&locale=en"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`GithubProfileTrophy Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`GithubProfileTrophy Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`GithubProfileTrophy Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
|
||||
exports[`GithubProfileTrophy Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-left my-2"
|
||||
>
|
||||
|
||||
<a
|
||||
href="https://github.com/ryo-ma/github-profile-trophy"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
src="https://github-profile-trophy.vercel.app/?username="
|
||||
/>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Markdown Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`Markdown Preview renders correctly 1`] = `
|
||||
<div
|
||||
id="markdown-preview"
|
||||
>
|
||||
<TitlePreview
|
||||
prefix="Hi 👋, I'm"
|
||||
title="dummy"
|
||||
/>
|
||||
<SubTitlePreview
|
||||
subtitle="A passionate frontend developer from India"
|
||||
/>
|
||||
<VisitorsBadgePreview
|
||||
badgeOptions={
|
||||
Object {
|
||||
"badgeColor": "0e75b6",
|
||||
"badgeLabel": "Profile%20views",
|
||||
"badgeStyle": "flat",
|
||||
}
|
||||
}
|
||||
github=""
|
||||
show={false}
|
||||
/>
|
||||
<GithubProfileTrophyPreview
|
||||
github=""
|
||||
show={false}
|
||||
/>
|
||||
<TwitterBadgePreview
|
||||
show={false}
|
||||
twitter=""
|
||||
/>
|
||||
<WorkPreview
|
||||
work={
|
||||
Object {
|
||||
"data": Object {
|
||||
"ama": "",
|
||||
"badgeColor": "0e75b6",
|
||||
"badgeLabel": "Profile views",
|
||||
"badgeStyle": "flat",
|
||||
"collaborateOn": "",
|
||||
"contact": "",
|
||||
"currentLearn": "",
|
||||
"currentWork": "readme-generator",
|
||||
"devDynamicBlogs": false,
|
||||
"funFact": "",
|
||||
"githubProfileTrophy": false,
|
||||
"githubStats": false,
|
||||
"githubStatsOptions": Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
},
|
||||
"helpWith": "",
|
||||
"mediumDynamicBlogs": false,
|
||||
"rssDynamicBlogs": false,
|
||||
"subtitle": "A passionate frontend developer from India",
|
||||
"title": "dummy",
|
||||
"topLanguages": false,
|
||||
"topLanguagesOptions": Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
},
|
||||
"twitterBadge": false,
|
||||
"visitorsBadge": false,
|
||||
},
|
||||
"link": Object {
|
||||
"blog": "",
|
||||
"collaborateOn": "",
|
||||
"currentWork": "https://dummy.com",
|
||||
"helpWith": "",
|
||||
"portfolio": "",
|
||||
"resume": "",
|
||||
},
|
||||
"prefix": Object {
|
||||
"ama": "💬 Ask me about",
|
||||
"blog": "📝 I regulary write articles on",
|
||||
"collaborateOn": "👯 I’m looking to collaborate on",
|
||||
"contact": "📫 How to reach me",
|
||||
"currentLearn": "🌱 I’m currently learning",
|
||||
"currentWork": "🔭 I’m currently working on",
|
||||
"funFact": "⚡ Fun fact",
|
||||
"helpWith": "🤝 I’m looking for help with",
|
||||
"portfolio": "👨💻 All of my projects are available at",
|
||||
"resume": "📄 Know about my experiences",
|
||||
"title": "Hi 👋, I'm",
|
||||
},
|
||||
"skills": Object {},
|
||||
"social": Object {
|
||||
"behance": "",
|
||||
"codechef": "",
|
||||
"codeforces": "",
|
||||
"codepen": "dummy",
|
||||
"codesandbox": "",
|
||||
"dev": "",
|
||||
"discord": "",
|
||||
"dribbble": "",
|
||||
"fb": "",
|
||||
"geeks_for_geeks": "",
|
||||
"github": "",
|
||||
"hackerearth": "",
|
||||
"hackerrank": "",
|
||||
"instagram": "",
|
||||
"kaggle": "",
|
||||
"leetcode": "",
|
||||
"linkedin": "",
|
||||
"medium": "",
|
||||
"rssurl": "",
|
||||
"stackoverflow": "",
|
||||
"topcoder": "",
|
||||
"twitter": "",
|
||||
"youtube": "",
|
||||
},
|
||||
}
|
||||
}
|
||||
/>
|
||||
<SocialPreview
|
||||
social={
|
||||
Object {
|
||||
"behance": "",
|
||||
"codechef": "",
|
||||
"codeforces": "",
|
||||
"codepen": "dummy",
|
||||
"codesandbox": "",
|
||||
"dev": "",
|
||||
"discord": "",
|
||||
"dribbble": "",
|
||||
"fb": "",
|
||||
"geeks_for_geeks": "",
|
||||
"github": "",
|
||||
"hackerearth": "",
|
||||
"hackerrank": "",
|
||||
"instagram": "",
|
||||
"kaggle": "",
|
||||
"leetcode": "",
|
||||
"linkedin": "",
|
||||
"medium": "",
|
||||
"rssurl": "",
|
||||
"stackoverflow": "",
|
||||
"topcoder": "",
|
||||
"twitter": "",
|
||||
"youtube": "",
|
||||
}
|
||||
}
|
||||
/>
|
||||
<SkillsPreview
|
||||
skills={Object {}}
|
||||
/>
|
||||
<div
|
||||
className="block sm:flex sm:justify-center sm:items-start"
|
||||
>
|
||||
<TopLanguagesPreview
|
||||
github=""
|
||||
options={
|
||||
Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
}
|
||||
}
|
||||
show={false}
|
||||
/>
|
||||
<GitHubStatsPreview
|
||||
github=""
|
||||
options={
|
||||
Object {
|
||||
"bgColor": "",
|
||||
"cacheSeconds": null,
|
||||
"hideBorder": false,
|
||||
"locale": "en",
|
||||
"textColor": "",
|
||||
"theme": "",
|
||||
"titleColor": "",
|
||||
}
|
||||
}
|
||||
show={false}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`SectionTitle Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`SectionTitle Preview renders correctly 1`] = `
|
||||
<h3
|
||||
className="w-full text-lg sm:text-xl"
|
||||
>
|
||||
dummy
|
||||
</h3>
|
||||
`;
|
||||
|
||||
exports[`SectionTitle Preview renders correctly with no label 1`] = `ShallowWrapper {}`;
|
||||
exports[`SectionTitle Preview renders correctly with no label 1`] = `""`;
|
||||
|
||||
exports[`SectionTitle Preview renders correctly with visible false 1`] = `ShallowWrapper {}`;
|
||||
exports[`SectionTitle Preview renders correctly with visible false 1`] = `""`;
|
||||
|
||||
exports[`Skills Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`Skills Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="flex flex-wrap justify-start items-center"
|
||||
>
|
||||
<SectionTitle
|
||||
label="Languages and Tools:"
|
||||
visible={true}
|
||||
/>
|
||||
<a
|
||||
href="https://unity.com/"
|
||||
rel="noreferrer"
|
||||
target="_blank"
|
||||
>
|
||||
<img
|
||||
alt="unity"
|
||||
className="mb-4 mr-4 h-6 w-6 sm:h-10 sm:w-10"
|
||||
key="unity"
|
||||
src="https://www.vectorlogo.zone/logos/unity3d/unity3d-icon.svg"
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Skills Preview renders correctly with no skills 1`] = `ShallowWrapper {}`;
|
||||
exports[`Skills Preview renders correctly with no skills 1`] = `""`;
|
||||
|
||||
exports[`Social Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`Social Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="flex justify-start items-end flex-wrap"
|
||||
>
|
||||
<SectionTitle
|
||||
label="Connect with me:"
|
||||
visible={true}
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://codepen.io"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
|
||||
username="dummy"
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://dev.to"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://twitter.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/twitter.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://linkedin.com/in"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/linkedin.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://stackoverflow.com/users"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/stackoverflow.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://codesandbox.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codesandbox.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://kaggle.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/kaggle.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://fb.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/facebook.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://instagram.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/instagram.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://dribbble.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dribbble.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.behance.net"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/behance.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://medium.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/medium.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.youtube.com/c"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/youtube.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.codechef.com/users"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codechef.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://codeforces.com/profile"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codeforces.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.hackerrank.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerrank.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://auth.geeksforgeeks.org/user"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/geeksforgeeks.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.hackerearth.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/hackerearth.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.topcoder.com/members"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/topcoder.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://www.leetcode.com"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/leetcode.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base="https://discord.gg"
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/discord.svg"
|
||||
username=""
|
||||
/>
|
||||
<DisplaySocial
|
||||
base=""
|
||||
icon="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/rss.svg"
|
||||
username=""
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`SubTitle Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`SubTitle Preview renders correctly 1`] = `
|
||||
<h3
|
||||
className="text-center font-medium"
|
||||
>
|
||||
A passionate frontend developer from India
|
||||
</h3>
|
||||
`;
|
||||
|
||||
exports[`SubTitle Preview renders correctly with no subtitle 1`] = `ShallowWrapper {}`;
|
||||
exports[`SubTitle Preview renders correctly with no subtitle 1`] = `""`;
|
||||
|
||||
exports[`Title Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`Title Preview renders correctly 1`] = `
|
||||
<h1
|
||||
className="text-center text-xl font-bold"
|
||||
>
|
||||
Hi 👋, I'm dummy
|
||||
</h1>
|
||||
`;
|
||||
|
||||
exports[`Title Preview renders correctly with no prefix 1`] = `ShallowWrapper {}`;
|
||||
exports[`Title Preview renders correctly with no prefix 1`] = `""`;
|
||||
|
||||
exports[`Title Preview renders correctly with no title 1`] = `ShallowWrapper {}`;
|
||||
exports[`Title Preview renders correctly with no title 1`] = `""`;
|
||||
|
||||
exports[`Title Preview renders correctly with no title and prefix 1`] = `ShallowWrapper {}`;
|
||||
exports[`Title Preview renders correctly with no title and prefix 1`] = `""`;
|
||||
|
||||
exports[`TopLanguages Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`TopLanguages Preview renders correctly 1`] = `
|
||||
<div
|
||||
className="text-center mx-4 mb-4"
|
||||
>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`TopLanguages Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
|
||||
exports[`TopLanguages Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-center mx-4 mb-4"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
src="https://github-readme-stats.vercel.app/api/top-langs?username=&show_icons=true&locale=en&layout=compact"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`TwitterBadgePreview Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`TwitterBadgePreview Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`TwitterBadgePreview Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
|
||||
exports[`TwitterBadgePreview Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-left my-2"
|
||||
>
|
||||
|
||||
<a
|
||||
href="https://twitter.com/\${props.twitter}"
|
||||
target="blank"
|
||||
>
|
||||
<img
|
||||
alt=""
|
||||
className="h-4 sm:h-6"
|
||||
src="https://img.shields.io/twitter/follow/?logo=twitter&style=for-the-badge"
|
||||
/>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`VisitorsBadge Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`VisitorsBadge Preview renders correctly 1`] = `""`;
|
||||
|
||||
exports[`VisitorsBadge Preview renders correctly with show true 1`] = `ShallowWrapper {}`;
|
||||
exports[`VisitorsBadge Preview renders correctly with show true 1`] = `
|
||||
<div
|
||||
className="text-left my-2"
|
||||
>
|
||||
|
||||
<img
|
||||
alt=""
|
||||
className="h-4 sm:h-6"
|
||||
src="https://komarev.com/ghpvc/?username=&label=Profile%20views&color=0e75b6&style=flat"
|
||||
/>
|
||||
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`Work Preview renders correctly 1`] = `ShallowWrapper {}`;
|
||||
exports[`Work Preview renders correctly 1`] = `
|
||||
<Fragment>
|
||||
<DisplayWork
|
||||
link="https://dummy.com"
|
||||
prefix="🔭 I’m currently working on"
|
||||
project="readme-generator"
|
||||
/>
|
||||
<DisplayWork
|
||||
prefix="🌱 I’m currently learning"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="🤝 I’m looking for help with"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="👯 I’m looking to collaborate on"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
prefix="💬 Ask me about"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="👨💻 All of my projects are available at"
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="📝 I regulary write articles on"
|
||||
/>
|
||||
<DisplayWork
|
||||
link=""
|
||||
prefix="📄 Know about my experiences"
|
||||
/>
|
||||
<DisplayWork
|
||||
prefix="📫 How to reach me"
|
||||
project=""
|
||||
/>
|
||||
<DisplayWork
|
||||
prefix="⚡ Fun fact"
|
||||
project=""
|
||||
/>
|
||||
</Fragment>
|
||||
`;
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Skills renders correctly 1`] = `
|
||||
<div
|
||||
className="px-2 sm:px-6 mb-10 "
|
||||
>
|
||||
<div
|
||||
className="text-xl sm:text-2xl font-bold font-title mt-2 mb-4 flex justify-between"
|
||||
>
|
||||
Skills
|
||||
<div
|
||||
className="relative flex"
|
||||
>
|
||||
<input
|
||||
className="leading:none text-xs my-0 py-1 px-2 pr-8 sm:text-xl border-2 border-gray-900 focus:border-blue-700 placeholder-gray-700"
|
||||
onChange={[Function]}
|
||||
placeholder="Search Skills"
|
||||
type="text"
|
||||
/>
|
||||
<span
|
||||
className="absolute"
|
||||
style={
|
||||
Object {
|
||||
"right": "10px",
|
||||
}
|
||||
}
|
||||
>
|
||||
<SearchIcon
|
||||
className="mb-1 transform scale-100 md:scale-125"
|
||||
size={16}
|
||||
verticalAlign="text-bottom"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="divide-y divide-gray-500"
|
||||
key="language"
|
||||
>
|
||||
<div
|
||||
className="text-sm sm:text-xl text-gray-900 text-left py-1"
|
||||
>
|
||||
Programming Languages
|
||||
</div>
|
||||
<div
|
||||
className="flex justify-start items-center flex-wrap w-full mb-6 pl-4 sm:pl-10"
|
||||
>
|
||||
<div
|
||||
className="w-1/3 sm:w-1/4 my-6"
|
||||
key="javascript"
|
||||
>
|
||||
<label
|
||||
className="skillCheckboxLabel cursor-pointer flex items-center justify-start"
|
||||
htmlFor="javascript"
|
||||
>
|
||||
<input
|
||||
checked={true}
|
||||
id="javascript"
|
||||
onChange={[Function]}
|
||||
type="checkbox"
|
||||
/>
|
||||
<img
|
||||
alt="javascript"
|
||||
className="ml-4 w-8 h-8 sm:w-10 sm:h-10"
|
||||
src="javascript.svg"
|
||||
/>
|
||||
<span
|
||||
className="tooltiptext"
|
||||
>
|
||||
javascript
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className="divide-y divide-gray-500"
|
||||
key="frontend_dev"
|
||||
>
|
||||
<div
|
||||
className="text-sm sm:text-xl text-gray-900 text-left py-1"
|
||||
>
|
||||
Frontend Development
|
||||
</div>
|
||||
<div
|
||||
className="flex justify-start items-center flex-wrap w-full mb-6 pl-4 sm:pl-10"
|
||||
>
|
||||
<div
|
||||
className="w-1/3 sm:w-1/4 my-6"
|
||||
key="react"
|
||||
>
|
||||
<label
|
||||
className="skillCheckboxLabel cursor-pointer flex items-center justify-start"
|
||||
htmlFor="react"
|
||||
>
|
||||
<input
|
||||
id="react"
|
||||
onChange={[Function]}
|
||||
type="checkbox"
|
||||
/>
|
||||
<img
|
||||
alt="react"
|
||||
className="ml-4 w-8 h-8 sm:w-10 sm:h-10"
|
||||
src="react.svg"
|
||||
/>
|
||||
<span
|
||||
className="tooltiptext"
|
||||
>
|
||||
react
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/3 sm:w-1/4 my-6"
|
||||
key="svelte"
|
||||
>
|
||||
<label
|
||||
className="skillCheckboxLabel cursor-pointer flex items-center justify-start"
|
||||
htmlFor="svelte"
|
||||
>
|
||||
<input
|
||||
id="svelte"
|
||||
onChange={[Function]}
|
||||
type="checkbox"
|
||||
/>
|
||||
<img
|
||||
alt="svelte"
|
||||
className="ml-4 w-8 h-8 sm:w-10 sm:h-10"
|
||||
src="svelte.svg"
|
||||
/>
|
||||
<span
|
||||
className="tooltiptext"
|
||||
>
|
||||
svelte
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<span
|
||||
className="flex justify-center text-gray-900"
|
||||
/>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,383 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`Social renders correctly 1`] = `
|
||||
<div
|
||||
className="px-2 sm:px-6 mb-4"
|
||||
>
|
||||
<div
|
||||
className="text-xl sm:text-2xl font-bold font-title mt-2 mb-2"
|
||||
>
|
||||
Social
|
||||
</div>
|
||||
<div
|
||||
className="flex flex-wrap justify-center items-center"
|
||||
>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="github"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/github.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-1 sm:px-2 focus:border-blue-700"
|
||||
id="github"
|
||||
onChange={[Function]}
|
||||
placeholder="github username"
|
||||
value="github "
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="twitter"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@v3/icons/twitter.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="twitter"
|
||||
onChange={[Function]}
|
||||
placeholder="twitter username"
|
||||
value="twitter"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="dev.to"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/dev-dot-to.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="dev"
|
||||
onChange={[Function]}
|
||||
placeholder="dev.to username"
|
||||
value="dev"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codepen"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codepen.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="codepen"
|
||||
onChange={[Function]}
|
||||
placeholder="codepen username"
|
||||
value="codepen"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codesandbox"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/codesandbox.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="codesandbox"
|
||||
onChange={[Function]}
|
||||
placeholder="codesandbox username"
|
||||
value="codesandbodx"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="stackoverflow"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/stackoverflow.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="stackoverflow"
|
||||
onChange={[Function]}
|
||||
placeholder="stackoverflow user ID"
|
||||
value="stackoverflow"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="linkedin"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/linkedin.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="linkedin"
|
||||
onChange={[Function]}
|
||||
placeholder="linkedin username"
|
||||
value="linkedin"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="kaggle"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/kaggle.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="kaggle"
|
||||
onChange={[Function]}
|
||||
placeholder="kaggle username"
|
||||
value="kaggle"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="facebook"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/facebook.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="fb"
|
||||
onChange={[Function]}
|
||||
placeholder="facebook username"
|
||||
value="fb"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="instagram"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.0.1/icons/instagram.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="instagram"
|
||||
onChange={[Function]}
|
||||
placeholder="instagram username"
|
||||
value="instagram"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="dribbble"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/dribbble.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="dribbble"
|
||||
onChange={[Function]}
|
||||
placeholder="dribbble username"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="behance"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/behance.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="behance"
|
||||
onChange={[Function]}
|
||||
placeholder="behance username"
|
||||
value="behance"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="medium"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/medium.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="medium"
|
||||
onChange={[Function]}
|
||||
placeholder="medium username (with @)"
|
||||
value="medium"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="youtube"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/youtube.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="youtube"
|
||||
onChange={[Function]}
|
||||
placeholder="youtube channel name"
|
||||
value="youtube"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codechef"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codechef.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="codechef"
|
||||
onChange={[Function]}
|
||||
placeholder="codechef username"
|
||||
value="codechef"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="hackerrank"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/hackerrank.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="hackerrank"
|
||||
onChange={[Function]}
|
||||
placeholder="hackerrank username"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="codeforces"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/codeforces.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="codeforces"
|
||||
onChange={[Function]}
|
||||
placeholder="codeforces username"
|
||||
value="codeforces"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="leetcode"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/leetcode.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="leetcode"
|
||||
onChange={[Function]}
|
||||
placeholder="leetcode username"
|
||||
value="leetcode"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="topcoder"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/topcoder.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="topcoder"
|
||||
onChange={[Function]}
|
||||
placeholder="topcoder username"
|
||||
value="topcoder"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="hackerearth"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/hackerearth.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="hackerearth"
|
||||
onChange={[Function]}
|
||||
placeholder="hackerearth user (with @)"
|
||||
value="@hackerearth"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="geeksforgeeks"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/geeksforgeeks.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="geeksforgeeks"
|
||||
onChange={[Function]}
|
||||
placeholder="GFG (<username>/profile)"
|
||||
value="geeks_for_geeks"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="discord"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/discord.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="discord"
|
||||
onChange={[Function]}
|
||||
placeholder="discord invite (only code)"
|
||||
value="discord"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
className="w-1/2 flex justify-center items-center text-xxs sm:text-lg py-4 pr-2 sm:pr-0"
|
||||
>
|
||||
<img
|
||||
alt="rssfeed"
|
||||
className="w-6 h-6 sm:w-8 sm:h-8 mr-1 sm:mr-4"
|
||||
src="https://cdn.jsdelivr.net/npm/simple-icons@3.1.0/icons/rss.svg"
|
||||
/>
|
||||
<input
|
||||
className="outline-none placeholder-gray-700 w-32 sm:w-1/2 border-t-0 border-l-0 border-r-0 border solid border-gray-900 py-1 px-2 focus:border-blue-700"
|
||||
id="rssurl"
|
||||
onChange={[Function]}
|
||||
placeholder="RSS feed URL"
|
||||
value="rssurl"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
@@ -0,0 +1,766 @@
|
||||
import React from "react"
|
||||
import toJson from "enzyme-to-json"
|
||||
import { shallow, mount } from "enzyme"
|
||||
|
||||
import Addons from "../addons"
|
||||
|
||||
jest.useFakeTimers();
|
||||
|
||||
describe("Addons", () => {
|
||||
const dataInput = {
|
||||
title: "",
|
||||
subtitle: "A passionate frontend developer from India",
|
||||
currentWork: "",
|
||||
currentLearn: "",
|
||||
collaborateOn: "",
|
||||
helpWith: "",
|
||||
ama: "",
|
||||
contact: "",
|
||||
funFact: "",
|
||||
twitterBadge: false,
|
||||
visitorsBadge: false,
|
||||
badgeStyle: "flat",
|
||||
badgeColor: "0e75b6",
|
||||
badgeLabel: "Profile views",
|
||||
githubProfileTrophy: false,
|
||||
githubStats: false,
|
||||
githubStatsOptions: {
|
||||
theme: "",
|
||||
titleColor: "",
|
||||
textColor: "",
|
||||
bgColor: "",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
locale: "en",
|
||||
},
|
||||
topLanguages: false,
|
||||
topLanguagesOptions: {
|
||||
theme: "",
|
||||
titleColor: "",
|
||||
textColor: "",
|
||||
bgColor: "",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
locale: "en",
|
||||
},
|
||||
devDynamicBlogs: false,
|
||||
mediumDynamicBlogs: false,
|
||||
rssDynamicBlogs: false,
|
||||
};
|
||||
const socialInput = {
|
||||
github: "",
|
||||
dev: "",
|
||||
linkedin: "",
|
||||
codepen: "",
|
||||
stackoverflow: "",
|
||||
kaggle: "",
|
||||
codesandbox: "",
|
||||
fb: "",
|
||||
instagram: "",
|
||||
twitter: "",
|
||||
dribbble: "",
|
||||
behance: "",
|
||||
medium: "",
|
||||
youtube: "",
|
||||
codechef: "",
|
||||
hackerrank: "",
|
||||
codeforces: "",
|
||||
leetcode: "",
|
||||
topcoder: "",
|
||||
hackerearth: "",
|
||||
geeks_for_geeks: "",
|
||||
discord: "",
|
||||
rssurl: "",
|
||||
};
|
||||
|
||||
let mockHandleCheckChange;
|
||||
let mockHandleDataChange;
|
||||
beforeEach(() => {
|
||||
mockHandleCheckChange = jest.fn();
|
||||
mockHandleDataChange = jest.fn();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
jest.clearAllMocks();
|
||||
});
|
||||
|
||||
it("renders correctly", () => {
|
||||
const addOnComponent = shallow(<Addons
|
||||
data={dataInput}
|
||||
social={socialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
expect(toJson(addOnComponent)).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should render Customize Badges", () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#visitors-count-open-btn").simulate("click",{});
|
||||
|
||||
expect(addOnComponent).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should handle data change when badge style is changed", () => {
|
||||
const mockEvent = { target: { value: "style-new" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
theme: "theme-1",
|
||||
titleColor: "title-abcd",
|
||||
textColor: "some-color",
|
||||
bgColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
locale: "en",
|
||||
},
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#visitors-count-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#badge-style").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('badgeStyle',{target: {value: "style-new" }});
|
||||
});
|
||||
|
||||
it("should handle data change when badge color is changed", () => {
|
||||
const mockEvent = { target: { value: "new-color-abcd" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#visitors-count-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#badge-color").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('badgeColor',{target: {value: "new-color-abcd" }});
|
||||
});
|
||||
|
||||
it("should handle data change when badge-label-text is changed", () => {
|
||||
const mockEvent = { target: { value: "label-abcd-random" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#visitors-count-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#badge-label-text").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('badgeLabel',{target: {value: "label-abcd-random" }});
|
||||
});
|
||||
|
||||
it("should render Customize Github stats card", () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click",{});
|
||||
|
||||
expect(addOnComponent).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should handle data change when stats theme is changed", () => {
|
||||
const mockEvent = { target: { value: "new-theme-for-stats" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
titleColor: "title-abcd",
|
||||
textColor: "some-color",
|
||||
bgColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#stats-theme").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-1",
|
||||
titleColor: "title-abcd",
|
||||
textColor: "some-color",
|
||||
bgColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle data change when stats title color is changed", () => {
|
||||
const mockEvent = { target: { value: "red-color" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
theme: "theme-1",
|
||||
textColor: "some-color",
|
||||
bgColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#stats-title-color").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-1",
|
||||
titleColor: "red-color",
|
||||
textColor: "some-color",
|
||||
bgColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle data change when stats bg color is changed", () => {
|
||||
const mockEvent = { target: { value: "random-color" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#stats-bg-color").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
bgColor: "random-color",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle data change when stats cache seconds is changed", () => {
|
||||
const mockEvent = { target: { value: 1900 } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
bgColor: "random-color",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#stats-cache-seconds").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
bgColor: "random-color",
|
||||
hideBorder: false,
|
||||
cacheSeconds: 1900,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle data change when stats text color is changed", () => {
|
||||
const mockEvent = { target: { value: "black-color" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
bgColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#stats-text-color").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "black-color",
|
||||
bgColor: "abcd",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle data change when stats local is changed", () => {
|
||||
const mockEvent = { target: { value: 'uk' } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
bgColor: "random-color",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click", {});
|
||||
addOnComponent.find("#stats-locale").simulate("change", mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
bgColor: "random-color",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "uk",
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle data change when stats local is changed", () => {
|
||||
const mockEvent = { target: { checked: true } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
githubStatsOptions: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
bgColor: "random-color",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#github-stats-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#stats-hide-border").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('githubStatsOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-1",
|
||||
titleColor: "some-color",
|
||||
textColor: "abcd",
|
||||
bgColor: "random-color",
|
||||
hideBorder: true,
|
||||
cacheSeconds: null,
|
||||
theme: "new-theme-for-stats",
|
||||
locale: "en",
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
it("should render Customize Top Skills Card", () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#top-languages-open-btn").simulate("click",{});
|
||||
|
||||
expect(addOnComponent).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should handle data change when top skills theme is changed", () => {
|
||||
const mockEvent = { target: { value: "theme-xyz" } }
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value",
|
||||
topLanguagesOptions : {
|
||||
theme: "theme-2",
|
||||
titleColor: "title-abcd-new",
|
||||
textColor: "random-some-color",
|
||||
bgColor: "1234",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "theme-xyz",
|
||||
locale: "us",
|
||||
}
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#top-languages-open-btn").simulate("click",{});
|
||||
addOnComponent.find("#top-lang-theme").simulate("change",mockEvent);
|
||||
|
||||
jest.runAllTimers();
|
||||
|
||||
expect(mockHandleDataChange).toHaveBeenCalledTimes(1);
|
||||
expect(mockHandleDataChange).toHaveBeenCalledWith('topLanguagesOptions', {
|
||||
target: {
|
||||
value: {
|
||||
theme: "theme-2",
|
||||
titleColor: "title-abcd-new",
|
||||
textColor: "random-some-color",
|
||||
bgColor: "1234",
|
||||
hideBorder: false,
|
||||
cacheSeconds: null,
|
||||
theme: "theme-xyz",
|
||||
locale: "us",
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("should handle check change when add on item inputs are changed", () => {
|
||||
const mockEvent = { target: { value: "This is a mock event" } }
|
||||
|
||||
const addOnComponent = mount(<Addons
|
||||
data={dataInput}
|
||||
social={socialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#visitors-count").simulate("change", mockEvent);
|
||||
addOnComponent.find("#github-profile-trophy").simulate("change", mockEvent);
|
||||
addOnComponent.find("#github-stats").simulate("change", mockEvent);
|
||||
addOnComponent.find("#top-languages").simulate("change", mockEvent);
|
||||
addOnComponent.find("#twitter-badge").simulate("change", mockEvent);
|
||||
addOnComponent.find("#dev-dynamic-blogs").simulate("change", mockEvent);
|
||||
addOnComponent.find("#rss-dynamic-blogs").simulate("change", mockEvent);
|
||||
addOnComponent.find("#medium-dynamic-blogs").simulate("change", mockEvent);
|
||||
|
||||
expect(mockHandleCheckChange).toHaveBeenCalledTimes(8);
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(1,"visitorsBadge");
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(2,"githubProfileTrophy");
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(3,"githubStats");
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(4,"topLanguages");
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(5,"twitterBadge");
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(6,"devDynamicBlogs");
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(7,"rssDynamicBlogs");
|
||||
expect(mockHandleCheckChange).toHaveBeenNthCalledWith(8,"mediumDynamicBlogs");
|
||||
});
|
||||
|
||||
it("should display workflow details if devDynamicBlogs and dev social data are available", () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
devDynamicBlogs: "some-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
dev: "some-value-123",
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
const workflowElement = addOnComponent.find(".workflow");
|
||||
expect(workflowElement).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should display workflow details if rssDynamicBlogs and rss url data are available", () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
rssDynamicBlogs: "some-rss-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
rssurl: "url-random",
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
const workflowElement = addOnComponent.find(".workflow");
|
||||
expect(workflowElement).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should display workflow details if mediumDynamicBlogs, medium social data are available", () => {
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
const workflowElement = addOnComponent.find(".workflow");
|
||||
expect(workflowElement).toMatchSnapshot();
|
||||
});
|
||||
|
||||
it("should call document create element when blog post workflow is clicked", () => {
|
||||
let someElement = document.createElement("abcd");
|
||||
document.createElement = jest.fn().mockReturnValueOnce(someElement);
|
||||
|
||||
const newDataInput = {
|
||||
...dataInput,
|
||||
mediumDynamicBlogs: "some-medium-blogs-value"
|
||||
};
|
||||
|
||||
const newSocialInput = {
|
||||
medium: "@abcd",
|
||||
};
|
||||
|
||||
const addOnComponent = shallow(<Addons
|
||||
data={newDataInput}
|
||||
social={newSocialInput}
|
||||
handleCheckChange={mockHandleCheckChange}
|
||||
handleDataChange={mockHandleDataChange}
|
||||
/>);
|
||||
|
||||
addOnComponent.find("#blog-post-worklow-span").simulate("click", {});
|
||||
expect(document.createElement).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,42 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import toJson from "enzyme-to-json"
|
||||
|
||||
import Skills from "../skills"
|
||||
|
||||
jest.mock("../../constants/skills", () => ({
|
||||
__esModule: true,
|
||||
categorizedSkills: {
|
||||
language: {
|
||||
title: "Programming Languages",
|
||||
skills: ["javascript"],
|
||||
},
|
||||
frontend_dev: {
|
||||
title: "Frontend Development",
|
||||
skills: ["react", "svelte"],
|
||||
},
|
||||
},
|
||||
icons: {
|
||||
javascript: "javascript.svg",
|
||||
react: "react.svg",
|
||||
svelte: "svelte.svg",
|
||||
},
|
||||
}))
|
||||
|
||||
describe("Skills", () => {
|
||||
it("renders correctly", () => {
|
||||
const component = shallow(<Skills skills={{ javascript: true }} />)
|
||||
expect(toJson(component)).toMatchSnapshot()
|
||||
})
|
||||
|
||||
it("calls handleSkillsChange prop when a skill is clicked", () => {
|
||||
const mockFn = jest.fn()
|
||||
const component = shallow(
|
||||
<Skills skills={{ javascript: true }} handleSkillsChange={mockFn} />
|
||||
)
|
||||
|
||||
component.find("#javascript").simulate("change")
|
||||
|
||||
expect(mockFn).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,44 @@
|
||||
import React from "react"
|
||||
import { shallow } from "enzyme"
|
||||
import toJson from "enzyme-to-json"
|
||||
|
||||
import Social from "../social"
|
||||
|
||||
describe("Social", () => {
|
||||
const mockEvent = { target: { value: "This is a mock event" } }
|
||||
const props = {
|
||||
social: {
|
||||
github: "github ",
|
||||
twitter: "twitter",
|
||||
dev: "dev",
|
||||
codepen: "codepen",
|
||||
codesandbox: "codesandbodx",
|
||||
stackoverflow: "stackoverflow",
|
||||
linkedin: "linkedin",
|
||||
kaggle: "kaggle",
|
||||
fb: "fb",
|
||||
instagram: "instagram",
|
||||
dribble: "dribble",
|
||||
behance: "behance",
|
||||
medium: "medium",
|
||||
youtube: "youtube",
|
||||
codechef: "codechef",
|
||||
hackerrack: "hackerranck",
|
||||
codeforces: "codeforces",
|
||||
leetcode: "leetcode",
|
||||
topcoder: "topcoder",
|
||||
hackerearth: "@hackerearth",
|
||||
geeks_for_geeks: "geeks_for_geeks",
|
||||
discord: "discord",
|
||||
rssurl: "rssurl",
|
||||
},
|
||||
handleSocialChange: jest.fn().mockReturnValue({}),
|
||||
}
|
||||
it("renders correctly", () => {
|
||||
const component = shallow(<Social {...props} />)
|
||||
for (let i = 0; i < component.find("input").length; i++) {
|
||||
component.find("input").at(i).simulate("change", mockEvent)
|
||||
}
|
||||
expect(toJson(component)).toMatchSnapshot()
|
||||
})
|
||||
})
|
||||
@@ -23,6 +23,7 @@ const AddonsItem = ({ inputId, inputChecked, onInputChange, Options, onIconClick
|
||||
</label>
|
||||
{Options && (
|
||||
<button
|
||||
id={`${inputId}-open-btn`}
|
||||
onClick={() => setOpen(!open)}
|
||||
className="flex ml-3 focus:bg-gray-400"
|
||||
style={{ outline: "none" }}
|
||||
@@ -417,6 +418,7 @@ const Addons = props => {
|
||||
<div>
|
||||
download
|
||||
<span
|
||||
id="blog-post-worklow-span"
|
||||
onClick={blogPostPorkflow}
|
||||
onKeyDown={(e) => e.keyCode === 13 && blogPostPorkflow()}
|
||||
role="button"
|
||||
|
||||
Reference in New Issue
Block a user