From 98da85b2ee810612c215fe1b6d4d93d2f6076afd Mon Sep 17 00:00:00 2001 From: fsimonjetz Date: Fri, 27 Oct 2023 13:36:41 +0000 Subject: [PATCH] Remove deprecated tests --- .../ui/fragment/CuneiformFragment.test.tsx | 11 --------- src/fragmentarium/ui/info/Details.test.tsx | 24 ------------------- .../ui/info/ExternalResources.test.tsx | 17 ------------- 3 files changed, 52 deletions(-) diff --git a/src/fragmentarium/ui/fragment/CuneiformFragment.test.tsx b/src/fragmentarium/ui/fragment/CuneiformFragment.test.tsx index d42cb68b0..9be4a5931 100644 --- a/src/fragmentarium/ui/fragment/CuneiformFragment.test.tsx +++ b/src/fragmentarium/ui/fragment/CuneiformFragment.test.tsx @@ -146,17 +146,6 @@ it('Renders all folios', () => { } }) -it('Links museum record', () => { - expect( - screen.getByLabelText(`The British Museum object ${fragment.bmIdNumber}`) - ).toHaveAttribute( - 'href', - `https://www.britishmuseum.org/collection/object/${encodeURIComponent( - fragment.bmIdNumber - )}` - ) -}) - it('Updates view on Edition save', async () => { fragmentService.updateEdition.mockReturnValueOnce( Promise.resolve(updatedFragment) diff --git a/src/fragmentarium/ui/info/Details.test.tsx b/src/fragmentarium/ui/info/Details.test.tsx index 6656afdf3..8090786f4 100644 --- a/src/fragmentarium/ui/info/Details.test.tsx +++ b/src/fragmentarium/ui/info/Details.test.tsx @@ -138,26 +138,6 @@ describe('All details', () => { expect(screen.getByText(expectedMeasures)).toBeInTheDocument() }) - it('Renders editedInOraccProject', () => { - expect(screen.getByText(fragment.editedInOraccProject)).toBeInTheDocument() - }) - - it('Renders CDLI number', () => { - expect( - screen.getByText((_, node) => { - return node?.textContent === `CDLI: ${fragment.cdliNumber}` - }) - ).toBeInTheDocument() - }) - - it('Links CDLI number', () => - expect(screen.getByText(fragment.cdliNumber)).toHaveAttribute( - 'href', - `https://cdli.mpiwg-berlin.mpg.de/${encodeURIComponent( - fragment.cdliNumber - )}` - )) - it('Renders accession', () => { expect( screen.getByText(`Accession: ${fragment.accession}`) @@ -212,10 +192,6 @@ describe('Missing details', () => { ).toBeInTheDocument() }) - it('Renders dash for CDLI number', () => { - expect(screen.getByText('CDLI: -')).toBeInTheDocument() - }) - it('Renders dash for accession', () => { expect(screen.getByText('Accession: -')).toBeInTheDocument() }) diff --git a/src/fragmentarium/ui/info/ExternalResources.test.tsx b/src/fragmentarium/ui/info/ExternalResources.test.tsx index f5914c7a7..11b9d4e79 100644 --- a/src/fragmentarium/ui/info/ExternalResources.test.tsx +++ b/src/fragmentarium/ui/info/ExternalResources.test.tsx @@ -2,7 +2,6 @@ import React from 'react' import { render, screen } from '@testing-library/react' import ExternalResources from './ExternalResources' -import Museum from 'fragmentarium/domain/museum' import { externalNumbersFactory, fragmentFactory, @@ -34,19 +33,3 @@ it('Links to CDLI text', () => { `https://cdli.mpiwg-berlin.mpg.de/${encodeURIComponent(cdliNumber)}` ) }) - -it('Renders The British Museum logo', () => { - expect(screen.getByAltText('The British Museum')).toHaveAttribute( - 'src', - Museum.of('The British Museum').logo - ) -}) - -it('Links to The British Museum object', () => { - expect( - screen.getByLabelText(`The British Museum object ${bmIdNumber}`) - ).toHaveAttribute( - 'href', - Museum.of('The British Museum').createLinkFor(fragment).url - ) -})