-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: CQDG-865 Add Clinical Data Cypress tests
- Loading branch information
Karine St-Onge
committed
Sep 12, 2024
1 parent
8f60b1d
commit 4691f17
Showing
10 changed files
with
23,084 additions
and
72 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
cypress/e2e/Telechargement/ClinicalDataPageParticipant.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/// <reference types="cypress"/> | ||
import '../../support/commands'; | ||
import { getDateTime, oneMinute } from '../../support/utils'; | ||
|
||
const { strDate } = getDateTime(); | ||
|
||
beforeEach(() => { | ||
cy.removeFilesFromFolder(Cypress.config('downloadsFolder')); | ||
|
||
cy.login(); | ||
cy.visitParticipantEntity('PT0000010'); | ||
cy.get('[class*="EntityTitle"] button[class*="ant-dropdown-trigger"]').click({force: true}); | ||
}); | ||
|
||
describe('Page d\'un participant - Télécharger le clinical data', () => { | ||
beforeEach(() => { | ||
cy.clickAndIntercept('[data-menu-id*="-clinicalData"]', 'POST', '**/file-manifest', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier [CQDG-861]', () => { | ||
cy.validateFileName(`cqdg_clinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [CQDG-861]', () => { | ||
cy.validateXlsxFileContent('DownloadClinicalData.json'); | ||
}); | ||
}); | ||
|
||
describe('Page d\'un participant - Télécharger le clinical data (family)', () => { | ||
beforeEach(() => { | ||
cy.clickAndIntercept('[data-menu-id*="-familyClinicalData"]', 'POST', '**/file-manifest', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier [CQDG-861]', () => { | ||
cy.validateFileName(`cqdg_familyClinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [CQDG-861]', () => { | ||
cy.validateXlsxFileContent('DownloadClinicalDataFamily.json'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/// <reference types="cypress"/> | ||
import '../../support/commands'; | ||
import { getDateTime, oneMinute } from '../../support/utils'; | ||
|
||
const { strDate } = getDateTime(); | ||
|
||
beforeEach(() => { | ||
cy.removeFilesFromFolder(Cypress.config('downloadsFolder')); | ||
|
||
cy.login(); | ||
cy.visitStudyEntity('STUDY1', 1); | ||
cy.get('[class*="EntityTitle"] button[class*="ant-btn-default"]').eq(0).click({force: true}); | ||
}); | ||
|
||
describe('Page d\'une étude - Télécharger le clinical data', () => { | ||
beforeEach(() => { | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier [CQDG-861]', () => { | ||
cy.validateFileName(`cqdg_clinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [CQDG-861]', () => { | ||
cy.validateXlsxFileContent('DownloadClinicalDataFamily.json'); | ||
}); | ||
}); |
44 changes: 44 additions & 0 deletions
44
cypress/e2e/Telechargement/ClinicalDataTableauParticipants.cy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/// <reference types="cypress"/> | ||
import '../../support/commands'; | ||
import { getDateTime, oneMinute } from '../../support/utils'; | ||
|
||
const { strDate } = getDateTime(); | ||
|
||
beforeEach(() => { | ||
cy.removeFilesFromFolder(Cypress.config('downloadsFolder')); | ||
|
||
cy.login(); | ||
cy.visitDataExploration('participants', '?sharedFilterId=f586eafb-ed2d-4cde-8ac0-c0c44fa2a504'); | ||
cy.get('div[role="tabpanel"] [class*="ant-table-row"]').eq(0).find('[type="checkbox"]').check({force: true}); | ||
cy.get('[class*="Header_ProTableHeader"] button[class*="ant-dropdown-trigger"]').eq(1).click({force: true}); | ||
}); | ||
|
||
describe('Page Data Exploration (Participants) - Télécharger le clinical data', () => { | ||
beforeEach(() => { | ||
cy.clickAndIntercept('[data-menu-id*="-clinicalData"]', 'POST', '**/file-manifest', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier [CQDG-861]', () => { | ||
cy.validateFileName(`cqdg_clinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [CQDG-861]', () => { | ||
cy.validateXlsxFileContent('DownloadClinicalData.json'); | ||
}); | ||
}); | ||
|
||
describe('Page Data Exploration (Participants) - Télécharger le clinical data (family)', () => { | ||
beforeEach(() => { | ||
cy.clickAndIntercept('[data-menu-id*="-familyClinicalData"]', 'POST', '**/file-manifest', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier [CQDG-861]', () => { | ||
cy.validateFileName(`cqdg_familyClinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [CQDG-861]', () => { | ||
cy.validateXlsxFileContent('DownloadClinicalDataFamily.json'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ "content": ["Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"External Family ID", | ||
"Relationship to Proband", | ||
"Study Name", | ||
"Study Code", | ||
"Family Type", | ||
"Sex", | ||
"Ethnicity", | ||
"Vital Status", | ||
"Affected Status", | ||
"Age at Recruitment", | ||
"Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"External Family ID", | ||
"Relationship to Proband", | ||
"Phenotype (HPO)", | ||
"Phenotype (Source Text)", | ||
"Interpretation", | ||
"Age at Phenotype Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"External Family ID", | ||
"Relationship to Proband", | ||
"Diagnosis (MONDO)", | ||
"Diagnosis (ICD)", | ||
"Diagnosis (Source Text)", | ||
"Age at Diagnosis Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"External Family ID", | ||
"Family Member ID", | ||
"Relationship to Proband"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ "content": ["Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"External Family ID", | ||
"Relationship to Proband", | ||
"Study Name", | ||
"Study Code", | ||
"Family Type", | ||
"Sex", | ||
"Ethnicity", | ||
"Vital Status", | ||
"Affected Status", | ||
"Age at Recruitment Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"External Family ID", | ||
"Relationship to Proband", | ||
"Phenotype (HPO)", | ||
"Phenotype (Source Text)", | ||
"Interpretation", | ||
"Age at Phenotype Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"External Family ID", | ||
"Relationship to Proband", | ||
"Diagnosis (MONDO)", | ||
"Diagnosis (ICD)", | ||
"Diagnosis (Source Text)", | ||
"Age at Diagnosis"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.