Skip to content

Commit

Permalink
feat: SKFP-1283 Adjust Cypress tests after ETLs run
Browse files Browse the repository at this point in the history
  • Loading branch information
kstonge committed Sep 26, 2024
1 parent 12fc793 commit 75dbfeb
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 37 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/Consultation/TableauFiles.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ describe('Page Data Exploration (Data Files) - Valider les fonctionnalités du t

it('Valider les fonctionnalités du tableau - Tri Biospecimens', () => {
cy.sortTableAndIntercept('Biospecimens', 1);
cy.validateTableFirstRow(/^1$/, 11, true);
cy.validateTableFirstRow(/(^0$|^1$)/, 11, true);
cy.sortTableAndIntercept('Biospecimens', 1);
cy.validateTableFirstRow(/\d{1}/, 11, true);
});
Expand All @@ -160,7 +160,7 @@ describe('Page Data Exploration (Data Files) - Valider les fonctionnalités du t
it('Valider les fonctionnalités du tableau - Tri Repository', () => {
cy.showColumn('Repository');
cy.sortTableAndIntercept('Repository', 1);
cy.validateTableFirstRow(/^(?!-).*$/, 12, true);
cy.validateTableFirstRow(/(-|^(?!-).*$)/, 12, true);
cy.sortTableAndIntercept('Repository', 1);
cy.validateTableFirstRow('Gen3', 12, true);
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Consultation/TableauParticipants.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('Page Data Exploration (Participants) - Valider les fonctionnalités du

it('Valider les fonctionnalités du tableau - Tri Sex', () => {
cy.sortTableAndIntercept('Sex', 1);
cy.validateTableFirstRow('Female', 5, true);
cy.validateTableFirstRow(/(Female|-)/, 5, true);
cy.sortTableAndIntercept('Sex', 1);
cy.validateTableFirstRow('Unknown', 5, true);
});
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Consultation/TableauStudies.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('Page des études - Consultation du tableau', () => {

it('Valider les fonctionnalités du tableau - Tri dbGaP', () => {
cy.sortTableAndIntercept('dbGaP', 1);
cy.validateTableFirstRow(/^(?!-).*$/, 4);
cy.validateTableFirstRow(/(-|^(?!-).*$)/, 4);
cy.sortTableAndIntercept('dbGaP', 1);
cy.validateTableFirstRow(/^(?!-).*$/, 4);
});
Expand All @@ -87,7 +87,7 @@ describe('Page des études - Consultation du tableau', () => {

it('Valider les fonctionnalités du tableau - Tri Biospecimens', () => {
cy.sortTableAndIntercept('Biospecimens', 1);
cy.validateTableFirstRow('50', 6);
cy.validateTableFirstRow(/\d{1}/, 6);
cy.sortTableAndIntercept('Biospecimens', 1);
cy.validateTableFirstRow(/\d{1}/, 6);
});
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Requetes/ActionsSur0Requete.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Page Data Exploration - Requêtes', () => {
cy.validatePillSelectedQuery('Sample Type', ['DNA']);
cy.wait(5000);
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27K|31.9K|32K)/);
cy.validateTableResultsCount(/(26,073|26,205|26,998|26,978|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);
cy.validateClearAllButton(false);
});
});
6 changes: 3 additions & 3 deletions cypress/e2e/Requetes/ActionsSur1Requete1Pilule.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('Page Data Exploration - Requêtes', () => {

cy.validatePillSelectedQuery('Sample Type', ['DNA','RNA']);
cy.validateTotalSelectedQuery(/(26.2K|26.3K|27.2K|32K|32.1K|32.2K)/);
cy.validateTableResultsCount(/(26,173|26,339|27,172|27,192|32,036|32,056|32,155)/);
cy.validateTableResultsCount(/(26,173|26,339|26,349|27,172|27,192|32,036|32,056|32,155)/);
cy.validateClearAllButton(false);
});

Expand All @@ -31,7 +31,7 @@ describe('Page Data Exploration - Requêtes', () => {

cy.validatePillSelectedQuery('Sample Type', ['DNA','RNA']);
cy.validateTotalSelectedQuery(/(26.2K|26.3K|27.2K|32K|32.1K|32.2K)/);
cy.validateTableResultsCount(/(26,173|26,339|27,172|27,192|32,036|32,056|32,155)/);
cy.validateTableResultsCount(/(26,173|26,339|26,349|27,172|27,192|32,036|32,056|32,155)/);
cy.validateClearAllButton(false);
});

Expand Down Expand Up @@ -76,7 +76,7 @@ describe('Page Data Exploration - Requêtes', () => {

cy.validatePillSelectedQuery('Sample Type', ['DNA']);
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27K|31.9K|32K)/);
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);
cy.validateClearAllButton(true);
});
});
10 changes: 5 additions & 5 deletions cypress/e2e/Requetes/ActionsSur1Requete2Pilules.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe('Page Data Exploration - Requêtes', () => {
cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000'], 1);
cy.validateOperatorSelectedQuery('or');
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27.1K|32.7K|32.8K)/);
cy.validateTableResultsCount(/(26,073|26,205|27,072|27,094|32,675|32,697|32,760)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|27,072|27,094|32,675|32,697|32,760)/);
cy.validateClearAllButton(false);

cy.intercept('POST', '**/graphql').as('getPOSTgraphql2');
Expand All @@ -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|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTableResultsCount(/(1,843|1,918|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,676|2,696|7,623|7,643|7,705)/);
cy.validateClearAllButton(false);
});

Expand All @@ -52,8 +52,8 @@ describe('Page Data Exploration - Requêtes', () => {
};

cy.validatePillSelectedQuery('Age at Biospec. Collection (days)', ['20000']);
cy.validateTotalSelectedQuery(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateClearAllButton(false);
});
});
42 changes: 21 additions & 21 deletions cypress/e2e/Requetes/ActionsSur2Requetes.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,54 +16,54 @@ describe('Page Data Exploration - Requêtes', () => {
});

it('Sélectionner une requête', () => {
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);

cy.intercept('POST', '**/graphql').as('getPOSTgraphql');
cy.get('.simplebar-wrapper').invoke('css', 'overflow', 'visible');
cy.get('[class*="QueryBar_queryBarWrapper"]').eq(1).clickAndWait();
cy.wait('@getPOSTgraphql');

cy.validateTableResultsCount(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
});

it('Afficher/Masquer les champs', () => {
cy.get('button[role="switch"]').clickAndWait({force: true});

cy.validatePillSelectedQuery('', ['DNA']);
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27K|31.9K|32K)/);
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);
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|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,770|2,792|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|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,770|2,792|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']);
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27K|31.9K|32K)/);
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);
cy.validateClearAllButton(true);
});

it('Masquer/Afficher le panneau des requêtes', () => {
cy.get('[id="query-builder-header-tools"]').find('span[class*="ant-collapse-arrow"]').clickAndWait({force: true});

cy.get('[id="query-builder-header-tools"]').find('div[class*="ant-collapse-content-inactive ant-collapse-content-hidden"]').should('exist');
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);

cy.get('[id="query-builder-header-tools"]').find('span[class*="ant-collapse-arrow"]').clickAndWait({force: true});

cy.get('[id="query-builder-header-tools"]').find('div[class*="ant-collapse-content-active"]').should('exist');
cy.validatePillSelectedQuery('Sample Type', ['DNA']);
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27K|31.9K|32K)/);
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);
cy.validateClearAllButton(true);
});

Expand All @@ -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|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTableResultsCount(/(1,843|1,918|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,676|2,696|7,623|7,643|7,705)/);
cy.validateClearAllButton(true);
});

Expand All @@ -97,7 +97,7 @@ describe('Page Data Exploration - Requêtes', () => {
cy.validatePillSelectedQuery('', ['Q2'], 1);
cy.validateOperatorSelectedQuery('or');
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27.1K|32.7K|32.8K)/);
cy.validateTableResultsCount(/(26,073|26,205|27,072|27,094|32,675|32,697|32,760)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|27,072|27,094|32,675|32,697|32,760)/);
cy.validateClearAllButton(true);
});

Expand All @@ -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|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTableResultsCount(/(1,843|1,918|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,676|2,696|7,623|7,643|7,705)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,676|2,696|7,623|7,643|7,705)/);
cy.validateClearAllButton(true);
});

Expand All @@ -126,7 +126,7 @@ describe('Page Data Exploration - Requêtes', () => {
cy.get('[class*="QueryBar_queryBarWrapper"]').its('length').should('eq', 2);
cy.validatePillSelectedQuery('Sample Type', ['DNA']);
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27K|31.9K|32K)/);
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);
cy.validateClearAllButton(true);
});

Expand All @@ -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|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateClearAllButton(false);
});

Expand All @@ -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|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateClearAllButton(false);
});

Expand All @@ -165,7 +165,7 @@ describe('Page Data Exploration - Requêtes', () => {
cy.get('[class*="QueryBar_queryBarWrapper"]').its('length').should('eq', 2);
cy.validatePillSelectedQuery('Sample Type', ['DNA']);
cy.validateTotalSelectedQuery(/(26.1K|26.2K|27K|31.9K|32K)/);
cy.validateTableResultsCount(/(26,073|26,205|26,978|26,998|31,933|31,953|32,018)/);
cy.validateTableResultsCount(/(26,073|26,205|26,215|26,978|26,998|31,933|31,953|32,018)/);
cy.validateClearAllButton(true);
});

Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/Requetes/ActionsSurCombinaison.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTotalSelectedQuery(/(1,843|1,918|1,928|2,770|2,792|8,365|8,387|8,447)/);
cy.validateTableResultsCount(/(1,843|1,918|1,928|2,770|2,792|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);
Expand Down

0 comments on commit 75dbfeb

Please sign in to comment.