diff --git a/tests/component/sections/file/file-metadata/FileMetadata.spec.tsx b/tests/component/sections/file/file-metadata/FileMetadata.spec.tsx index e6b32ed57..23b4dbe9a 100644 --- a/tests/component/sections/file/file-metadata/FileMetadata.spec.tsx +++ b/tests/component/sections/file/file-metadata/FileMetadata.spec.tsx @@ -214,9 +214,8 @@ describe('FileMetadata', () => { datasetPublishingStatus={file.datasetVersion.publishingStatus} /> ) - cy.findByText('Deposit Date').should('exist') - cy.findByText(DateHelper.toISO8601Format(file.metadata.depositDate)).should('exist') + cy.get('time').contains(DateHelper.toISO8601Format(file.metadata.depositDate)).should('exist') }) it('renders the file Metadata Release Date', () => {