From f11a906420975e833f278a08470d8f9783c76f73 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 9 Oct 2023 14:33:29 +0200 Subject: refactor(components): extract FlippingLogo from Branding component --- .../images/flipping-logo/flipping-logo.test.tsx | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 src/components/molecules/images/flipping-logo/flipping-logo.test.tsx (limited to 'src/components/molecules/images/flipping-logo/flipping-logo.test.tsx') diff --git a/src/components/molecules/images/flipping-logo/flipping-logo.test.tsx b/src/components/molecules/images/flipping-logo/flipping-logo.test.tsx new file mode 100644 index 0000000..5409262 --- /dev/null +++ b/src/components/molecules/images/flipping-logo/flipping-logo.test.tsx @@ -0,0 +1,39 @@ +import { describe, expect, it } from '@jest/globals'; +import { render, screen as rtlScreen } from '@testing-library/react'; +import NextImage from 'next/image'; +import { FlippingLogo } from './flipping-logo'; + +describe('FlippingLogo', () => { + it('renders both sides of the logo', () => { + const frontAltTxt = 'aliquam officia et'; + const backAltTxt = 'voluptas nesciunt itaque'; + + render( + + } + front={ + + } + /> + ); + + expect( + rtlScreen.getByRole('img', { name: frontAltTxt }) + ).toBeInTheDocument(); + expect( + rtlScreen.getByRole('img', { name: backAltTxt }) + ).toBeInTheDocument(); + }); +}); -- cgit v1.2.3