generated from gabrielduete/frontend-template-nextjs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from gabrielduete/test/resolve-todo-tests
- Loading branch information
Showing
20 changed files
with
166 additions
and
73 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
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 Commons from '.' | ||
|
||
import { itemsCommons } from '../../Footer.data' | ||
|
||
import { render, screen } from '@testing-library/react' | ||
|
||
describe('<Commons />', () => { | ||
beforeEach(() => { | ||
render( | ||
<Commons title={itemsCommons[0].title} items={itemsCommons[0].texts} /> | ||
) | ||
}) | ||
|
||
const texts = itemsCommons[0].texts | ||
|
||
it('should render title correctly', () => { | ||
screen.getByText(itemsCommons[0].title) | ||
}) | ||
|
||
it.each(texts)('shold render %s texts correctly', text => { | ||
expect(screen.getByText(text)).toBeInTheDocument() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Links from '.' | ||
|
||
import { render, screen } from '@testing-library/react' | ||
|
||
import { itemsLinks } from '../../Footer.data' | ||
|
||
describe('<Links />', () => { | ||
beforeEach(() => { | ||
render(<Links title={itemsLinks[0].title} items={itemsLinks[0].texts} />) | ||
}) | ||
|
||
const texts = itemsLinks[0].texts.map(item => item.text) | ||
|
||
it('should render title correctly', () => { | ||
screen.getByText(itemsLinks[0].title) | ||
}) | ||
|
||
it.each(texts)('shold render %s texts correctly', text => { | ||
expect(screen.getByText(text)).toBeInTheDocument() | ||
}) | ||
}) |
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,30 @@ | ||
import Title from '../../../Title' | ||
|
||
type LinksProps = { | ||
title: string | ||
items: Array<{ text: string; id: string }> | ||
} | ||
|
||
const Links = ({ title, items }: LinksProps) => { | ||
return ( | ||
<div> | ||
<Title color='white'>{title}</Title> | ||
<div className='mt-6'> | ||
{items.map(({ text, id }) => { | ||
return ( | ||
<p className='mt-2' key={id}> | ||
<a | ||
href={`#${id}`} | ||
className='hover:text-black delay-50 duration-500' | ||
> | ||
{text} | ||
</a> | ||
</p> | ||
) | ||
})} | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default Links |
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
export const TEXTS_SIDEBAR = [ | ||
{ | ||
name: 'Home', | ||
id: 'introduction', | ||
id: 'home', | ||
}, | ||
{ | ||
name: 'Find a doctor', | ||
id: 'findADoctor', | ||
id: 'find-doctor', | ||
}, | ||
{ | ||
name: 'Apps', | ||
id: 'apps', | ||
}, | ||
{ | ||
name: 'Testimonials', | ||
id: 'depoiments', | ||
id: 'testimonials', | ||
}, | ||
{ | ||
name: 'About us', | ||
id: 'aboutUs', | ||
id: 'about', | ||
}, | ||
] |
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
Oops, something went wrong.
b43db56
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
virtual-healthcare-y15r – ./
virtual-healthcare-y15r.vercel.app
virtual-healthcare-y15r-git-main-gabrielduete.vercel.app
virtual-healthcare-y15r-gabrielduete.vercel.app