diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-03 18:52:57 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:14:41 +0100 |
| commit | a3fb0aa94717aafae897ac293488c43a099c0b2b (patch) | |
| tree | bb5c9fcb093779061cd11e08d94f30bbb3a9b854 /src/components/organisms/widgets/sharing.test.tsx | |
| parent | f914ff8376dd91c4f6f8ca149e1cb6becb622d88 (diff) | |
refactor(components): rewrite SharingLink component
* replace default label with label prop
* simplify CSS rules
Diffstat (limited to 'src/components/organisms/widgets/sharing.test.tsx')
| -rw-r--r-- | src/components/organisms/widgets/sharing.test.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/organisms/widgets/sharing.test.tsx b/src/components/organisms/widgets/sharing.test.tsx index 40d2a2c..c7211f0 100644 --- a/src/components/organisms/widgets/sharing.test.tsx +++ b/src/components/organisms/widgets/sharing.test.tsx @@ -1,5 +1,5 @@ import { describe, expect, it } from '@jest/globals'; -import { render, screen } from '../../../../tests/utils'; +import { render, screen as rtlScreen } from '../../../../tests/utils'; import { Sharing, type SharingData } from './sharing'; const postData: SharingData = { @@ -12,13 +12,13 @@ describe('Sharing', () => { it('renders a sharing widget', () => { render(<Sharing data={postData} media={['facebook', 'twitter']} />); expect( - screen.getByRole('link', { name: 'Share on facebook' }) + rtlScreen.getByRole('link', { name: 'Share on Facebook' }) ).toBeInTheDocument(); expect( - screen.getByRole('link', { name: 'Share on twitter' }) + rtlScreen.getByRole('link', { name: 'Share on Twitter' }) ).toBeInTheDocument(); expect( - screen.queryByRole('link', { name: 'Share on linkedin' }) + rtlScreen.queryByRole('link', { name: 'Share on LinkedIn' }) ).not.toBeInTheDocument(); }); }); |
