Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: CQDG-861 fix allow custom filename to dataset filemanifest #328

Merged
merged 3 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 6 additions & 22 deletions cypress/e2e/RequestAccessButton/PageDataExploration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,50 +48,34 @@ describe('Page Data Exploration (Data Files) - Bouton Request Access', () => {
});

it('Valider les fonctionnalités - Bouton Download', () => {
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-manifest', 1);
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-request-access', 1);
cy.get('[class*="DownloadRequestAccessModal_modal"]').should('have.css', 'display', 'none');
cy.waitUntilFile(oneMinute);
cy.validateFileName('*.tsv');
cy.validateFileName('*.gz');
});
});

describe('Page Data Exploration (Data Files) - Télécharger le Request Access', () => {
beforeEach(() => {
cy.get('[data-cy="RequestAccess_Button"]').click({force: true});
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-manifest', 1);
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-request-access', 1);
cy.waitUntilFile(oneMinute);
});

it('Valider le nom du fichier', () => {
cy.validateFileName('cqdg_fileRequestAccess_'+`${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}`+'.tsv');
});

it('Valider les en-têtes du fichier', () => {
cy.validateFileHeaders('DownloadRequestAccess.json');
});

it('Valider le contenu du fichier', () => {
cy.validateFileContent('DownloadRequestAccess.json');
cy.validateFileName('CQDG-access-request.tar.gz');
});
});

describe('Page Data Exploration (Data Files) - Télécharger le Request Access (checkbox)', () => {
beforeEach(() => {
cy.get('[data-cy="RequestAccess_Button"]').click({force: true});
cy.get('[class="ant-modal-body"] input[type="checkbox"]').check({force: true});
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-manifest', 1);
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-request-access', 1);
cy.waitUntilFile(oneMinute);
});

it('Valider le nom du fichier', () => {
cy.validateFileName('cqdg_fileRequestAccess_'+`${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}`+'.tsv');
});

it('Valider les en-têtes du fichier', () => {
cy.validateFileHeaders('DownloadRequestAccessFamily.json');
});

it('Valider le contenu du fichier', () => {
cy.validateFileContent('DownloadRequestAccessFamily.json');
cy.validateFileName('CQDG-access-request.tar.gz');
});
});
16 changes: 4 additions & 12 deletions cypress/e2e/RequestAccessButton/PageStudy.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,29 +52,21 @@ describe('Page d\'une étude - Bouton Request Access', () => {
});

it('Valider les fonctionnalités - Bouton Download', () => {
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-manifest', 1);
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-request-access', 1);
cy.get('[class*="DownloadRequestAccessModal_modal"]').should('have.css', 'display', 'none');
cy.waitUntilFile(oneMinute);
cy.validateFileName('*.tsv');
cy.validateFileName('*.gz');
});
});

describe('Page d\'une étude - Télécharger le Request Access', () => {
beforeEach(() => {
cy.get('[class*="EntityTitle"] [data-cy="RequestAccess_Button"]').click({force: true});
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-manifest', 1);
cy.clickAndIntercept('[class="ant-modal-footer"] button[class*="ant-btn-primary"]', 'POST', '**/file-request-access', 1);
cy.waitUntilFile(oneMinute);
});

it('Valider le nom du fichier', () => {
cy.validateFileName('cqdg_fileRequestAccess_'+`${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}`+'.tsv');
});

it('Valider les en-têtes du fichier', () => {
cy.validateFileHeaders('DownloadRequestAccessFamily.json');
});

it('Valider le contenu du fichier', () => {
cy.validateFileContent('DownloadRequestAccessFamily.json');
cy.validateFileName('CQDG-access-request.tar.gz');
});
});
12 changes: 6 additions & 6 deletions cypress/e2e/Telechargement/ClinicalDataPageParticipant.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ describe('Page d\'un participant - Télécharger le clinical data', () => {
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 nom du fichier', () => {
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]', () => {
it('Valider le contenu du fichier [CQDG-889]', () => {
cy.validateXlsxFileContent('DownloadClinicalData.json');
});
});
Expand All @@ -33,11 +33,11 @@ describe('Page d\'un participant - Télécharger le clinical data (family)', ()
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 nom du fichier', () => {
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]', () => {
it('Valider le contenu du fichier [CQDG-889]', () => {
cy.validateXlsxFileContent('DownloadClinicalDataFamily.json');
});
});
8 changes: 4 additions & 4 deletions cypress/e2e/Telechargement/ClinicalDataPageStudy.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ describe('Page d\'une étude - Télécharger le clinical data', () => {
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 nom du fichier', () => {
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('DownloadClinicalDataFamily.json');
it('Valider le contenu du fichier [CQDG-889]', () => {
cy.validateXlsxFileContent('DownloadClinicalDataStudy.json');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ describe('Page Data Exploration (Participants) - Télécharger le clinical data'
cy.waitUntilFile(oneMinute);
});

it('Valider le nom du fichier [CQDG-861]', () => {
it('Valider le nom du fichier', () => {
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]', () => {
it('Valider le contenu du fichier [CQDG-889]', () => {
cy.validateXlsxFileContent('DownloadClinicalData.json');
});
});
Expand All @@ -34,11 +34,11 @@ describe('Page Data Exploration (Participants) - Télécharger le clinical data
cy.waitUntilFile(oneMinute);
});

it('Valider le nom du fichier [CQDG-861]', () => {
it('Valider le nom du fichier', () => {
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]', () => {
it('Valider le contenu du fichier [CQDG-889]', () => {
cy.validateXlsxFileContent('DownloadClinicalDataFamily.json');
});
});
8 changes: 4 additions & 4 deletions cypress/e2e/Telechargement/SampleDataPageParticipant.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ beforeEach(() => {
});

describe('Page d\'un participant - Télécharger le sample data', () => {
it('Valider le nom du fichier [CQDG-861]', () => {
cy.validateFileName(`cqdg_biospecimenData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`);
it('Valider le nom du fichier', () => {
cy.validateFileName(`cqdg_biospecimenData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}.xlsx`);
});

it('Valider le contenu du fichier [CQDG-861]', () => {
cy.validateXlsxFileContent('DownloadbiospecimenData.json');
it('Valider le contenu du fichier [CQDG-889]', () => {
cy.validateXlsxFileContent('DownloadBiospecimenData.json');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ beforeEach(() => {
});

describe('Page Data Exploration (Biospecimens) - Télécharger le sample data', () => {
it('Valider le nom du fichier [CQDG-861]', () => {
cy.validateFileName(`cqdg_biospecimenData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}T*.xlsx`);
it('Valider le nom du fichier', () => {
cy.validateFileName(`cqdg_biospecimenData_${strDate.slice(0, 4)}${strDate.slice(4, 6)}${strDate.slice(6, 8)}.xlsx`);
});

it('Valider le contenu du fichier [CQDG-861]', () => {
cy.validateXlsxFileContent('DownloadbiospecimenData.json');
it('Valider le contenu du fichier [CQDG-889]', () => {
cy.validateXlsxFileContent('DownloadBiospecimenData.json');
});
});
80 changes: 46 additions & 34 deletions cypress/fixtures/DownloadClinicalData.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,48 @@
{ "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"]
"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",
"Phenotype (HPO)",
"Phenotype (Source Text)",
"Interpretation",
"Age at Phenotype",
"Diagnosis (MONDO)",
"Diagnosis (ICD)",
"Diagnosis (Source Text)",
"Age at Diagnosis",
"Family Member ID",
"PT0000010",
"HSJ-1005-389",
"FM0000487",
"HSJ0389",
"Proband",
"Developmental and epileptic encephalopathies",
"T-DEE",
"Case-parent trio",
"male",
"Unknown",
"Yes",
"Seizure (HP:0001250)",
"Intractable Seizures",
"Observed",
"Neonatal (< 28 days)",
"epilepsy (MONDO:0005027)",
"Generalized idiopathic epilepsy and epileptic syndromes, intractable (G40.31)",
"Intractable Epilepsy",
"PT0000483",
"HSJ-1007-389",
"Father",
"PT0000091",
"HSJ-1006-389",
"Mother",
"--"]
}
75 changes: 47 additions & 28 deletions cypress/fixtures/DownloadClinicalDataFamily.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,49 @@
{ "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"]
"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",
"Phenotype (HPO)",
"Phenotype (Source Text)",
"Interpretation",
"Age at Phenotype",
"Diagnosis (MONDO)",
"Diagnosis (ICD)",
"Diagnosis (Source Text)",
"Age at Diagnosis",
"PT0000010",
"HSJ-1005-389",
"FM0000487",
"HSJ0389",
"Proband",
"Developmental and epileptic encephalopathies",
"T-DEE",
"Case-parent trio",
"male",
"Unknown",
"Yes",
"PT0000091",
"HSJ-1006-389",
"Mother",
"female",
"No",
"PT0000483",
"HSJ-1007-389",
"Father",
"Seizure (HP:0001250)",
"Intractable Seizures",
"Observed",
"Neonatal (< 28 days)",
"epilepsy (MONDO:0005027)",
"Generalized idiopathic epilepsy and epileptic syndromes, intractable (G40.31)",
"Intractable Epilepsy",
"--"]
}
Loading
Loading