Skip to content

Commit

Permalink
2329: fix test after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ThieryMichel committed Feb 3, 2025
1 parent 4b9e5aa commit 0341555
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
20 changes: 17 additions & 3 deletions cypress/e2e/phase_4/annotation.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,13 @@ describe('Annotation', () => {
'',
'n/a',
'',
'To Review',
'',
'',
'John Doe',
'This is a comment',
new Date().toLocaleDateString(),
new Date().toLocaleDateString(),
]);
});
});
Expand Down Expand Up @@ -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(),
]);
});
});
Expand Down Expand Up @@ -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:\//);
Expand Down Expand Up @@ -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();
Expand All @@ -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:\//);
Expand All @@ -242,6 +250,7 @@ describe('Annotation', () => {
'[bZE+]',
'',
'n/a',
'',
'Validated',
'Return applied',
'John Doe',
Expand All @@ -255,6 +264,7 @@ describe('Annotation', () => {
'[K8Lu]',
'',
'n/a',
'',
'To Review',
'',
'',
Expand Down Expand Up @@ -303,9 +313,13 @@ describe('Annotation', () => {
'',
'n/a',
'',
'To Review',
'',
'',
'John Doe',
'This is a comment',
new Date().toLocaleDateString(),
new Date().toLocaleDateString(),
]);
});
});
Expand Down
4 changes: 2 additions & 2 deletions src/common/validator/annotation.validator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('annotation.validator', () => {
};

const validatedAnnotation =
annotationSchema.parse(annotationPayload);
annotationCreationSchema.parse(annotationPayload);

expect(validatedAnnotation).toStrictEqual({
...annotationPayload,
Expand All @@ -118,7 +118,7 @@ describe('annotation.validator', () => {
};

const validatedAnnotation =
annotationSchema.parse(annotationPayload);
annotationCreationSchema.parse(annotationPayload);

expect(validatedAnnotation).toStrictEqual({
...annotationPayload,
Expand Down

0 comments on commit 0341555

Please sign in to comment.