-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: SKFP-1276 Add Clinical Data Cypress tests
- Loading branch information
Showing
9 changed files
with
840 additions
and
1 deletion.
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('PT_01236T3G'); | ||
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', '**/clinical-data', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier', () => { | ||
cy.validateFileName(`kf_clinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [SKFP-1277]', () => { | ||
cy.validateXlsxFileContent('DownloadClinicalData.json'); | ||
}); | ||
}); | ||
|
||
describe('Page d\'un participant - Télécharger le clinical data (family)', () => { | ||
beforeEach(() => { | ||
cy.clickAndIntercept('[data-menu-id*="-familyClinicalData"]', 'POST', '**/family-clinical-data', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier', () => { | ||
cy.validateFileName(`kf_familyClinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [SKFP-1277]', () => { | ||
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=c80e4b42-a3e3-4525-a425-933b44eafef9'); | ||
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', '**/clinical-data', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier', () => { | ||
cy.validateFileName(`kf_clinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [SKFP-1277]', () => { | ||
cy.validateXlsxFileContent('DownloadClinicalData.json'); | ||
}); | ||
}); | ||
|
||
describe('Page Data Exploration (Participants) - Télécharger le clinical data (family)', () => { | ||
beforeEach(() => { | ||
cy.clickAndIntercept('[data-menu-id*="-familyClinicalData"]', 'POST', '**/family-clinical-data', 1); | ||
cy.waitUntilFile(oneMinute); | ||
}); | ||
|
||
it('Valider le nom du fichier', () => { | ||
cy.validateFileName(`kf_familyClinicalData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`); | ||
}); | ||
|
||
it('Valider le contenu du fichier [SKFP-1277]', () => { | ||
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,46 @@ | ||
{ "content": ["Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"Proband", | ||
"Study Name", | ||
"Study Code", | ||
"Family Composition", | ||
"Sex", | ||
"Race", | ||
"Ethnicity", | ||
"Vital Status", | ||
"Age at Last Vital Status (Days)", | ||
"PT_01236T3G", | ||
"01-0665", | ||
"FM_Z4Y7FP70", | ||
"Yes", | ||
"Kids First: Genomic Analysis of Congenital Diaphragmatic Hernia", | ||
"KF-CDH", | ||
"trio", | ||
"female", | ||
"White", | ||
"Not Hispanic or Latino", | ||
"Deceased", | ||
"Phenotype (HPO)", | ||
"Phenotype (Source Text)", | ||
"Interpretation", | ||
"Age at Phenotype Assignment (Days)", | ||
"Congenital diaphragmatic hernia (HP:0000776)", | ||
"congential diaphragmatic hernia", | ||
"Observed", | ||
"congenital diaphragmatic hernia", | ||
"Diagnosis (MONDO)", | ||
"Diagnosis (NCIT)", | ||
"Diagnosis (Source Text)", | ||
"Age at Diagnosis (Days)", | ||
"Tumor Location (Source Text)", | ||
"congenital diaphragmatic hernia (MONDO:0005711)", | ||
"Congenital Diaphragmatic Hernia (NCIT:C98893)", | ||
"Not Reported", | ||
"Family Role", | ||
"PT_1DYA8779", | ||
"mother", | ||
"PT_RZVC67GC", | ||
"father", | ||
"--"] | ||
} |
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,51 @@ | ||
{ "content": ["Participant ID", | ||
"External Participant ID", | ||
"Family ID", | ||
"Proband", | ||
"Study Name", | ||
"Study Code", | ||
"Family Composition", | ||
"Family Role", | ||
"Sex", | ||
"Race", | ||
"Ethnicity", | ||
"Vital Status", | ||
"Age at Last Vital Status (Days)", | ||
"PT_01236T3G", | ||
"01-0665", | ||
"FM_Z4Y7FP70", | ||
"Yes", | ||
"Kids First: Genomic Analysis of Congenital Diaphragmatic Hernia", | ||
"KF-CDH", | ||
"trio", | ||
"female", | ||
"White", | ||
"Not Hispanic or Latino", | ||
"Deceased", | ||
"PT_1DYA8779", | ||
"667", | ||
"No", | ||
"mother", | ||
"PT_RZVC67GC", | ||
"668", | ||
"father", | ||
"male", | ||
"Phenotype (HPO)", | ||
"Phenotype (Source Text)", | ||
"Interpretation", | ||
"Age at Phenotype Assignment (Days)", | ||
"Congenital diaphragmatic hernia (HP:0000776)", | ||
"congential diaphragmatic hernia", | ||
"Observed", | ||
"congenital diaphragmatic hernia", | ||
"Not Observed", | ||
"Diagnosis (MONDO)", | ||
"Diagnosis (NCIT)", | ||
"Diagnosis (Source Text)", | ||
"Age at Diagnosis (Days)", | ||
"Tumor Location (Source Text)", | ||
"congenital diaphragmatic hernia (MONDO:0005711)", | ||
"Congenital Diaphragmatic Hernia (NCIT:C98893)", | ||
"Not Reported", | ||
"--"] | ||
} |
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.