-
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.
Feat: Hover styles for anchors & unit tests (#18)
* add todos * style: Add group hover styles to cards with anchors * chore: Remove unused import * test: Increase coverage for GithubCard * test: Update coverage for twitter card * test: Increase coverage for linkedin card * test: Increase coverage for contact card * test: Mock audio api * chore: Add todo * test: Add test for music player
- Loading branch information
1 parent
5b78acc
commit 807316a
Showing
13 changed files
with
59 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# TODO | ||
|
||
- Root loading.tsx with a <Skeleton> component. | ||
- https://delba.dev/blog/animated-loading-skeletons-with-tailwind | ||
- Dependabot | ||
- Observation Observer, animations | ||
- Scrollbar color pseudo | ||
- Unit test Audio component | ||
- RepoCard styling | ||
- Validator functions with ZOD | ||
- Hover animations on all links | ||
- <MusicPlayer> should reset when song ends |
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ const props = { | |
href: 'mailto:[email protected]', | ||
label: 'label', | ||
subLabel: 'subLabel', | ||
icon: <div></div>, | ||
icon: <svg data-testid="icon" />, | ||
}; | ||
|
||
describe('<ContactCard />', () => { | ||
|
@@ -14,8 +14,10 @@ describe('<ContactCard />', () => { | |
const anchor = screen.getByRole('link'); | ||
const heading2 = screen.getByRole('heading', { level: 2 }); | ||
const heading3 = screen.getByRole('heading', { level: 3 }); | ||
const icon = screen.getByTestId('icon'); | ||
expect(anchor).toHaveAttribute('href', props.href); | ||
expect(heading2).toHaveTextContent(props.label); | ||
expect(heading3).toHaveTextContent(props.subLabel); | ||
expect(icon).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
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
17 changes: 17 additions & 0 deletions
17
app/_components/cards/music-card/music-player/music-player.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,17 @@ | ||
import { render, screen } from '@testing-library/react'; | ||
import { MusicPlayer } from './music-player'; | ||
|
||
const props = { | ||
songPath: '/not-real.mp3', | ||
}; | ||
|
||
describe('<MusicPlayer />', () => { | ||
it('Should expected elements', () => { | ||
window.HTMLMediaElement.prototype.pause = jest.fn().mockImplementation(() => {}); // Mock pause fn | ||
render(<MusicPlayer {...props} />); | ||
const button = screen.getByRole('button'); | ||
const slider = screen.getByRole('slider'); | ||
expect(button).toBeInTheDocument(); | ||
expect(slider).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
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