From b6e2b32e68efb6b1fa699c673073b39696d72f96 Mon Sep 17 00:00:00 2001 From: Karine St-Onge Date: Tue, 10 Dec 2024 15:36:14 -0500 Subject: [PATCH] feat: SKFP-1398 Adjust Cypress tests related to SKFP-1396 --- cypress/e2e/Consultation/TableauFiles.cy.ts | 4 +-- .../Requetes/ActionsSur1Requete2Pilules.cy.ts | 8 +++--- .../e2e/Requetes/ActionsSur2Requetes.cy.ts | 26 +++++++++---------- .../e2e/Requetes/ActionsSurCombinaison.cy.ts | 4 +-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/cypress/e2e/Consultation/TableauFiles.cy.ts b/cypress/e2e/Consultation/TableauFiles.cy.ts index 6e62edb91..33519b9fa 100644 --- a/cypress/e2e/Consultation/TableauFiles.cy.ts +++ b/cypress/e2e/Consultation/TableauFiles.cy.ts @@ -156,7 +156,7 @@ describe('Page Data Exploration (Data Files) - Valider les fonctionnalités du t cy.sortTableAndIntercept('Size', 1); cy.validateTableFirstRow(/^(?!-).*$/, 9, true); cy.sortTableAndIntercept('Size', 1); - cy.validateTableFirstRow('572.08 GB', 9, true); + cy.validateTableFirstRow(/^(?!-).*$/, 9, true); }); it('Valider les fonctionnalités du tableau - Tri Participants', () => { @@ -186,7 +186,7 @@ describe('Page Data Exploration (Data Files) - Valider les fonctionnalités du t cy.sortTableAndIntercept('Platform', 1); cy.validateTableFirstRow('-', 12, true); cy.sortTableAndIntercept('Platform', 1); - cy.validateTableFirstRow('Not Reported', 12, true); + cy.validateTableFirstRow(/^(?!-).*$/, 12, true); }); it('Valider les fonctionnalités du tableau - Tri Repository', () => { diff --git a/cypress/e2e/Requetes/ActionsSur1Requete2Pilules.cy.ts b/cypress/e2e/Requetes/ActionsSur1Requete2Pilules.cy.ts index 0043bdb73..ac3ea0b7e 100644 --- a/cypress/e2e/Requetes/ActionsSur1Requete2Pilules.cy.ts +++ b/cypress/e2e/Requetes/ActionsSur1Requete2Pilules.cy.ts @@ -38,8 +38,8 @@ describe('Page Data Exploration - Requêtes', () => { cy.validatePillSelectedQuery('Sample Type', ['DNA']); cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000'], 1); cy.validateOperatorSelectedQuery('and'); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|5,885|7,623|7,643|7,705)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|5,885|7,623|7,643|7,705)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|4,357|5,885|7,623|7,643|7,705)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|4,357|5,885|7,623|7,643|7,705)/); cy.validateClearAllButton(false); }); @@ -52,8 +52,8 @@ describe('Page Data Exploration - Requêtes', () => { }; cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000']); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); cy.validateClearAllButton(false); }); }); diff --git a/cypress/e2e/Requetes/ActionsSur2Requetes.cy.ts b/cypress/e2e/Requetes/ActionsSur2Requetes.cy.ts index c91e4d2c6..e9745252a 100644 --- a/cypress/e2e/Requetes/ActionsSur2Requetes.cy.ts +++ b/cypress/e2e/Requetes/ActionsSur2Requetes.cy.ts @@ -23,7 +23,7 @@ describe('Page Data Exploration - Requêtes', () => { cy.get('[class*="QueryBar_queryBarWrapper"]').eq(1).clickAndWait(); cy.wait('@getPOSTgraphql'); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); }); it('Afficher/Masquer les champs', () => { @@ -35,15 +35,15 @@ describe('Page Data Exploration - Requêtes', () => { cy.get('.simplebar-wrapper').invoke('css', 'overflow', 'visible'); cy.get('[class*="QueryBar_queryBarWrapper"]').eq(1).clickAndWait(); cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000']); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); cy.validateClearAllButton(true); cy.get('button[role="switch"]').clickAndWait({force: true}); cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000']); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); cy.get('.simplebar-wrapper').invoke('css', 'overflow', 'visible'); cy.get('[class*="QueryBar_queryBarWrapper"]').eq(0).clickAndWait(); cy.validatePillSelectedQuery('Sample Type', ['DNA']); @@ -79,8 +79,8 @@ describe('Page Data Exploration - Requêtes', () => { cy.validatePillSelectedQuery('', ['Q1']); cy.validatePillSelectedQuery('', ['Q2'], 1); cy.validateOperatorSelectedQuery('and'); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|5,885|7,623|7,643|7,705)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|5,885|7,623|7,643|7,705)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|4,357|5,885|7,623|7,643|7,705)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|4,357|5,885|7,623|7,643|7,705)/); cy.validateClearAllButton(true); }); @@ -112,8 +112,8 @@ describe('Page Data Exploration - Requêtes', () => { cy.validatePillSelectedQuery('', ['Q1']); cy.validatePillSelectedQuery('', ['Q2'], 1); cy.validateOperatorSelectedQuery('and'); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|5,885|7,623|7,643|7,705)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|5,885|7,623|7,643|7,705)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|4,357|5,885|7,623|7,643|7,705)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,945|2,676|2,696|4,219|4,357|5,885|7,623|7,643|7,705)/); cy.validateClearAllButton(true); }); @@ -138,8 +138,8 @@ describe('Page Data Exploration - Requêtes', () => { cy.get('[class*="ant-popconfirm"]').should('not.exist'); cy.get('[class*="QueryBar_queryBarWrapper"]').its('length').should('eq', 1); cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000']); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); cy.validateClearAllButton(false); }); @@ -151,8 +151,8 @@ describe('Page Data Exploration - Requêtes', () => { cy.get('[class*="QueryBar_queryBarWrapper"]').its('length').should('eq', 1); cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000']); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); cy.validateClearAllButton(false); }); diff --git a/cypress/e2e/Requetes/ActionsSurCombinaison.cy.ts b/cypress/e2e/Requetes/ActionsSurCombinaison.cy.ts index 3eed967f2..ba89381e6 100644 --- a/cypress/e2e/Requetes/ActionsSurCombinaison.cy.ts +++ b/cypress/e2e/Requetes/ActionsSurCombinaison.cy.ts @@ -25,8 +25,8 @@ describe('Page Data Exploration - Requêtes', () => { cy.get('[class*="QueryBar_queryBarWrapper"]').its('length').should('eq', 2); cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000']); - cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); - cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|6,665|8,365|8,387|8,447)/); + cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); + cy.validateTableResultsCount(/(1,843|1,918|1,928|1,935|1,947|2,770|2,792|4,999|5,137|6,665|8,365|8,387|8,447)/); cy.get('[class*="QueryBar_queryBarWrapper"]').eq(1).find('[class*="QueryValues_queryValuesContainer"]').contains('Q1').should('exist'); cy.get('[class*="QueryBar_queryBarWrapper"]').eq(1).find('[class*="QueryValues_queryValuesContainer"]').contains('Q2').should('not.exist'); cy.validateClearAllButton(true);