generated from ReCoded-Org/capstone-react-redux-template
-
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.
* Jobs Showcase * Updated Snapshots Co-authored-by: allan <[email protected]>
- Loading branch information
1 parent
4c05d4a
commit d99880a
Showing
10 changed files
with
216 additions
and
43 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 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,18 @@ | ||
import Showcase from './Showcase'; | ||
|
||
const JobsShowcase = ({ showcaseArray }) => { | ||
return ( | ||
<div className="my-20 flex justify-center gap-x-20 flex-wrap w-screen "> | ||
{showcaseArray.map((data) => { | ||
return ( | ||
<Showcase | ||
header={data.header} | ||
body={data.body} | ||
button={data.button} | ||
/> | ||
); | ||
})} | ||
</div> | ||
); | ||
}; | ||
export default JobsShowcase; |
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,10 @@ | ||
import renderer from 'react-test-renderer'; | ||
import { showcaseData } from '../../data'; | ||
import JobsShowcase from './JobsShowcase'; | ||
|
||
it('renders correctly when the component matches the snapshot', () => { | ||
const tree = renderer | ||
.create(<JobsShowcase showcaseArray={showcaseData} />) | ||
.toJSON(); | ||
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,23 @@ | ||
import React from 'react'; | ||
|
||
function Showcase(props) { | ||
const { header, body, button } = props; | ||
return ( | ||
<div className="w-96 small:w-80 px-11 py-9 mb-20 flex flex-col justify-between content-start shadow-[2px_7px_7px_5px_rgba(83,83,83,0.3)] rounded-lg bg-light-gray text-gray-800 text-left leading-8 "> | ||
<div> | ||
<h1 className="mb-5 font-semibold text-3xl small:text-lg medium:text-2xl large:text-3xl "> | ||
{header} | ||
</h1> | ||
<p className="small:text-sm">{body}</p> | ||
<button | ||
className="mt-5 font-semibold text-lg small:text-base" | ||
type="button" | ||
> | ||
{button} | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default Showcase; |
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,8 @@ | ||
import renderer from 'react-test-renderer'; | ||
|
||
import Showcase from './Showcase'; | ||
|
||
it('renders correctly when the component matches the snapshot', () => { | ||
const tree = renderer.create(<Showcase />).toJSON(); | ||
expect(tree).toMatchSnapshot(); | ||
}); |
74 changes: 74 additions & 0 deletions
74
src/components/JobsShowcase/__snapshots__/JobsShowcase.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,74 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders correctly when the component matches the snapshot 1`] = ` | ||
<div | ||
className="my-20 flex justify-center gap-x-20 flex-wrap w-screen " | ||
> | ||
<div | ||
className="w-96 small:w-80 px-11 py-9 mb-20 flex flex-col justify-between content-start shadow-[2px_7px_7px_5px_rgba(83,83,83,0.3)] rounded-lg bg-light-gray text-gray-800 text-left leading-8 " | ||
> | ||
<div> | ||
<h1 | ||
className="mb-5 font-semibold text-3xl small:text-lg medium:text-2xl large:text-3xl " | ||
> | ||
Full Time Jobs | ||
</h1> | ||
<p | ||
className="small:text-sm" | ||
> | ||
if you are set on your career and want to work full time, then a full time job is just the one for you, clicking here will show you all the current full time jobs in our platform | ||
</p> | ||
<button | ||
className="mt-5 font-semibold text-lg small:text-base" | ||
type="button" | ||
> | ||
Full time jobs > | ||
</button> | ||
</div> | ||
</div> | ||
<div | ||
className="w-96 small:w-80 px-11 py-9 mb-20 flex flex-col justify-between content-start shadow-[2px_7px_7px_5px_rgba(83,83,83,0.3)] rounded-lg bg-light-gray text-gray-800 text-left leading-8 " | ||
> | ||
<div> | ||
<h1 | ||
className="mb-5 font-semibold text-3xl small:text-lg medium:text-2xl large:text-3xl " | ||
> | ||
Part Time Jobs | ||
</h1> | ||
<p | ||
className="small:text-sm" | ||
> | ||
if you are set on your career and want to work full time, then a full time job is just the one for you, clicking here will show you all the current full time jobs in our platform | ||
</p> | ||
<button | ||
className="mt-5 font-semibold text-lg small:text-base" | ||
type="button" | ||
> | ||
Part Time jobs > | ||
</button> | ||
</div> | ||
</div> | ||
<div | ||
className="w-96 small:w-80 px-11 py-9 mb-20 flex flex-col justify-between content-start shadow-[2px_7px_7px_5px_rgba(83,83,83,0.3)] rounded-lg bg-light-gray text-gray-800 text-left leading-8 " | ||
> | ||
<div> | ||
<h1 | ||
className="mb-5 font-semibold text-3xl small:text-lg medium:text-2xl large:text-3xl " | ||
> | ||
Remote Jobs | ||
</h1> | ||
<p | ||
className="small:text-sm" | ||
> | ||
you are set on your career and want to work remotes, then a remotes job is just the one for you, clicking here will show you all the current remotes jobs in our platform | ||
</p> | ||
<button | ||
className="mt-5 font-semibold text-lg small:text-base" | ||
type="button" | ||
> | ||
Remote jobs > | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
20 changes: 20 additions & 0 deletions
20
src/components/JobsShowcase/__snapshots__/Showcase.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,20 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`renders correctly when the component matches the snapshot 1`] = ` | ||
<div | ||
className="w-96 small:w-80 px-11 py-9 mb-20 flex flex-col justify-between content-start shadow-[2px_7px_7px_5px_rgba(83,83,83,0.3)] rounded-lg bg-light-gray text-gray-800 text-left leading-8 " | ||
> | ||
<div> | ||
<h1 | ||
className="mb-5 font-semibold text-3xl small:text-lg medium:text-2xl large:text-3xl " | ||
/> | ||
<p | ||
className="small:text-sm" | ||
/> | ||
<button | ||
className="mt-5 font-semibold text-lg small:text-base" | ||
type="button" | ||
/> | ||
</div> | ||
</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,17 @@ | ||
export const showcaseData = [ | ||
{ | ||
header: 'Full Time Jobs', | ||
body: 'if you are set on your career and want to work full time, then a full time job is just the one for you, clicking here will show you all the current full time jobs in our platform', | ||
button: 'Full time jobs >', | ||
}, | ||
{ | ||
header: 'Part Time Jobs', | ||
body: 'if you are set on your career and want to work full time, then a full time job is just the one for you, clicking here will show you all the current full time jobs in our platform', | ||
button: 'Part Time jobs >', | ||
}, | ||
{ | ||
header: 'Remote Jobs', | ||
body: ' you are set on your career and want to work remotes, then a remotes job is just the one for you, clicking here will show you all the current remotes jobs in our platform', | ||
button: 'Remote jobs >', | ||
}, | ||
]; |
Oops, something went wrong.