aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/layout/copyright.test.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-20 17:01:37 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commit9492414d4ae94045eff4e06f636529bc0e71cb06 (patch)
tree7f268e6b62ee89128abd0581301265dc64f147d5 /src/components/atoms/layout/copyright.test.tsx
parentc6f6f8f895e68f2d85ca681997ef613d982bac14 (diff)
refactor(components): rewrite Copyright component
* remove `icon` prop (it is confusing because a copyright should have the copyright symbol, the license is not part of the copyright) * reorganize copyright informations I also updated the CC BY SA icon because the elements was in the wrong order.
Diffstat (limited to 'src/components/atoms/layout/copyright.test.tsx')
-rw-r--r--src/components/atoms/layout/copyright.test.tsx34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/components/atoms/layout/copyright.test.tsx b/src/components/atoms/layout/copyright.test.tsx
deleted file mode 100644
index cdff292..0000000
--- a/src/components/atoms/layout/copyright.test.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { describe, expect, it } from '@jest/globals';
-import { render, screen as rtlScreen } from '../../../../tests/utils';
-import { Icon } from '../images/icons';
-import { Copyright } from './copyright';
-
-const dates = {
- start: '2012',
- end: '2022',
-};
-const iconHeading = 'CC BY SA';
-const icon = <Icon heading={iconHeading} shape="cc-by-sa" />;
-const owner = 'Your name';
-
-describe('Copyright', () => {
- it('renders the copyright owner', () => {
- render(<Copyright dates={dates} icon={icon} owner={owner} />);
- expect(rtlScreen.getByText(owner)).toBeInTheDocument();
- });
-
- it('renders the copyright start date', () => {
- render(<Copyright dates={dates} icon={icon} owner={owner} />);
- expect(rtlScreen.getByText(dates.start)).toBeInTheDocument();
- });
-
- it('renders the copyright end date', () => {
- render(<Copyright dates={dates} icon={icon} owner={owner} />);
- expect(rtlScreen.getByText(dates.end)).toBeInTheDocument();
- });
-
- it('renders the copyright icon', () => {
- render(<Copyright dates={dates} icon={icon} owner={owner} />);
- expect(rtlScreen.getByTitle('CC BY SA')).toBeInTheDocument();
- });
-});