From f3f5f583ae1968e963d4911b0b3a6d7b2e7b37af Mon Sep 17 00:00:00 2001 From: rmanaem Date: Wed, 25 Oct 2023 15:39:13 -0400 Subject: [PATCH] Expanded `download-pagetests` to check for `identifies` property and its value under the `participant_id` key --- cypress/e2e/page/download-pagetests.cy.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cypress/e2e/page/download-pagetests.cy.js b/cypress/e2e/page/download-pagetests.cy.js index f0382abc..040eebe9 100644 --- a/cypress/e2e/page/download-pagetests.cy.js +++ b/cypress/e2e/page/download-pagetests.cy.js @@ -78,6 +78,11 @@ describe("tests on download page ui via programmatic state loading and store int expect(folderStateAfter[folderStateAfter.length - 1]).to.contain(dataDictionaryFilenameNoExt); }); + // C. Check if the last file retrieved contains the Identifies property and its value under the participant_id key + cy.readFile('cypress/downloads/' + folderStateAfter[folderStateAfter.length - 1]).then((fileContent) => { + expect(fileContent.participant_id.Annotations).to.have.property("Identifies"); + expect(fileContent.participant_id.Annotations.Identifies).to.eq("participant"); + }); }); }); });