From 03415558eceb4a13048eed818379f5a0bdc394c6 Mon Sep 17 00:00:00 2001 From: ThieryMichel Date: Mon, 3 Feb 2025 10:57:28 +0100 Subject: [PATCH] 2329: fix test after rebase --- cypress/e2e/phase_4/annotation.cy.js | 20 ++++++++++++++++--- .../validator/annotation.validator.spec.js | 4 ++-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/cypress/e2e/phase_4/annotation.cy.js b/cypress/e2e/phase_4/annotation.cy.js index 1ab2ff467..27033b61d 100644 --- a/cypress/e2e/phase_4/annotation.cy.js +++ b/cypress/e2e/phase_4/annotation.cy.js @@ -58,9 +58,13 @@ describe('Annotation', () => { '', 'n/a', '', + 'To Review', + '', + '', 'John Doe', 'This is a comment', new Date().toLocaleDateString(), + new Date().toLocaleDateString(), ]); }); }); @@ -88,9 +92,13 @@ describe('Annotation', () => { '', 'n/a', "Cette collection n'a pas d'autre but que de présenter un manière d’utiliser l'application Lodex pour mettre en ligne des données.", + 'To Review', + '', + '', 'John Doe', 'This is a comment', new Date().toLocaleDateString(), + new Date().toLocaleDateString(), ]); }); }); @@ -147,7 +155,7 @@ describe('Annotation', () => { cy.findAllByRole('cell').then((cells) => { const firstUri = cells[0].textContent; - const secondUri = cells[13].textContent; + const secondUri = cells[14].textContent; expect(firstUri).to.match(/uid:\//); expect(secondUri).to.match(/uid:\//); @@ -216,7 +224,7 @@ describe('Annotation', () => { cy.findByLabelText('Status').should('have.text', 'To Review​'); cy.findByLabelText('Status').click(); - cy.findByLabelText('Validated​').click(); + cy.findByText('Validated').click(); cy.findByLabelText('Internal Comment *').type('Return applied'); cy.findByLabelText('Administrator').type('John Doe'); cy.findByText('Save').click(); @@ -228,7 +236,7 @@ describe('Annotation', () => { cy.findAllByRole('cell').then((cells) => { const firstUri = cells[0].textContent; - const secondUri = cells[13].textContent; + const secondUri = cells[14].textContent; expect(firstUri).to.match(/uid:\//); expect(secondUri).to.match(/uid:\//); @@ -242,6 +250,7 @@ describe('Annotation', () => { '[bZE+]', '', 'n/a', + '', 'Validated', 'Return applied', 'John Doe', @@ -255,6 +264,7 @@ describe('Annotation', () => { '[K8Lu]', '', 'n/a', + '', 'To Review', '', '', @@ -303,9 +313,13 @@ describe('Annotation', () => { '', 'n/a', '', + 'To Review', + '', + '', 'John Doe', 'This is a comment', new Date().toLocaleDateString(), + new Date().toLocaleDateString(), ]); }); }); diff --git a/src/common/validator/annotation.validator.spec.js b/src/common/validator/annotation.validator.spec.js index 4feb0c5ba..a5b4b8d38 100644 --- a/src/common/validator/annotation.validator.spec.js +++ b/src/common/validator/annotation.validator.spec.js @@ -98,7 +98,7 @@ describe('annotation.validator', () => { }; const validatedAnnotation = - annotationSchema.parse(annotationPayload); + annotationCreationSchema.parse(annotationPayload); expect(validatedAnnotation).toStrictEqual({ ...annotationPayload, @@ -118,7 +118,7 @@ describe('annotation.validator', () => { }; const validatedAnnotation = - annotationSchema.parse(annotationPayload); + annotationCreationSchema.parse(annotationPayload); expect(validatedAnnotation).toStrictEqual({ ...annotationPayload,