From a3fb0aa94717aafae897ac293488c43a099c0b2b Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 3 Oct 2023 18:52:57 +0200
Subject: refactor(components): rewrite SharingLink component

* replace default label with label prop
* simplify CSS rules
---
 src/components/organisms/widgets/sharing.test.tsx | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

(limited to 'src/components/organisms/widgets/sharing.test.tsx')

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();
   });
 });
-- 
cgit v1.2.3

