Skip to content

Commit

Permalink
feat: CQDG-925 Adjust Cypress tests related to CQDG-914
Browse files Browse the repository at this point in the history
  • Loading branch information
Karine St-Onge committed Oct 22, 2024
1 parent 24e131b commit cd80e1d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/Consultation/Landing.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('Page Landing - Vérifier les informations affichées', () => {

it('Section Studies Side Panel Tile', () => {
cy.get('[class*="Studies_container"] [class*="Summary"] [id="study"]').should('exist');
cy.get('[class*="Studies_container"] [class*="Summary"] [class*="TextIcon_layout"]').contains('3').should('exist');
cy.get('[class*="Studies_container"] [class*="Summary"] [class*="TextIcon_layout"]').contains('4').should('exist');
cy.get('[class*="Studies_container"] [class*="Summary"] [class*="TextIcon_layout"]').contains(/(Studies|Études)/).should('exist');
cy.get('[class*="Studies_container"] [class*="Summary"]').contains(/(Explorez les données harmonisées d’études dans les populations pédiatriques et adultes.|Explore harmonized data from studies in both pediatric and adult populations.)/).should('exist');
});
Expand Down Expand Up @@ -54,7 +54,7 @@ describe('Page Landing - Vérifier les informations affichées', () => {
cy.get('[class*="Stats_wrapper"] [class*="ant-card-head"]').contains(/(Données CQDG|Release) v1.0/).should('exist');

cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(0).find('[id="study"]').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(0).contains('3').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(0).contains('4').should('exist');
cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(0).contains(/(Études|Studies)/).should('exist');

cy.get('[class*="Stats_wrapper"] [class*="ant-card-body"] [class*="TextIcon_layout"]').eq(1).find('[id="participant"]').should('exist');
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Facettes/PageDataExploration.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ describe('Page Data Exploration (Participants) - Filtrer avec les facettes', ()
});

it('Diagnosis (Source Text) - Intractable Epilepsy', () => {
cy.validateFacetFilter('Diagnosis (Source Text)', 'Intractable Epilepsy', 'Intractable Epilepsy', /^205$/);
cy.validateFacetFilter('Diagnosis (Source Text)', 'Intractable Epilepsy', 'Intractable Epilepsy', /\d{1}/);
cy.validateFacetRank(9, 'Diagnosis (Source Text)');
});
});
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/Facettes/PageStudies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ describe('Page des études - Filtrer avec les facettes', () => {
});

it('Population - Pediatric and adult', () => {
cy.validateFacetFilter('Population', 'Pediatric and adult', 'Pediatric and adult', /^3 Results$/, false);
cy.validateFacetFilter('Population', 'Pediatric and adult', 'Pediatric and adult', /\d{1} Results/, false);
cy.validateFacetRank(1, 'Population');
});

it('Access Limitation - Health or medical or biomedical research (DUO:0000006)', () => {
cy.validateFacetFilter('Access Limitation', 'Health or medical or biomedical research (DUO:0000006)', 'health or medical or biomedical research (DUO:0000006)', /^3 Results$/, false);
cy.validateFacetFilter('Access Limitation', 'Health or medical or biomedical research (DUO:0000006)', 'health or medical or biomedical research (DUO:0000006)', /\d{1} Results/, false);
cy.validateFacetRank(2, 'Access Limitation');
});

it('Access Requirement - Genetic studies only (DUO:0000016)', () => {
cy.validateFacetFilter('Access Requirement', 'Genetic studies only (DUO:0000016)', 'genetic studies only (DUO:0000016)', /^3 Results$/, false);
cy.validateFacetFilter('Access Requirement', 'Genetic studies only (DUO:0000016)', 'genetic studies only (DUO:0000016)', /\d{1} Results/, false);
cy.validateFacetRank(3, 'Access Requirement');
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/Recherche/PageStudies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('Page des études - Rechercher des études', () => {

it('Par mot-clé', () => {
cy.typeAndIntercept('[class*="PageContent_search"]', 'FAMILY', 'POST', '**/graphql', 6);
cy.validateTableResultsCount(/2 Results/);
cy.validateTableResultsCount(/\d{1} Results/);
cy.validateTableFirstRow('STUDY2', 0);

cy.get('button[class*="Header_clearFilterLink"]').should('contain', 'Clear filters').clickAndWait({force: true});
Expand Down

0 comments on commit cd80e1d

Please sign in to comment.