Skip to content

Commit

Permalink
Fixed dataview e2e tests #1541
Browse files Browse the repository at this point in the history
  • Loading branch information
kaperoo committed Sep 6, 2023
1 parent 52d0395 commit 72be066
Show file tree
Hide file tree
Showing 11 changed files with 82 additions and 78 deletions.
14 changes: 7 additions & 7 deletions packages/datagateway-dataview/cypress/e2e/table/datafiles.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,20 @@ describe('Datafiles Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="4"]').contains(
'/five/with/question.bmp'
);

// multiple columns
cy.contains('[role="button"]', 'Name').click();
cy.wait('@datafilesOrder', { timeout: 10000 });
cy.contains('[role="button"]', 'Modified Time').click();
cy.contains('[role="button"]', 'Modified Time').click({ shiftKey: true });
cy.wait('@datafilesOrder', { timeout: 10000 });

cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 1071');
Expand Down
12 changes: 6 additions & 6 deletions packages/datagateway-dataview/cypress/e2e/table/datasets.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ describe('Datasets Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('DATASET 1');

cy.contains('[role="button"]', 'Create Time').as('timeSortButton').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,24 @@ describe('DLS - Datafiles Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="4"]').contains(
'/time/run/drug.jpeg'
);

// multiple columns
cy.get('@timeSortButton').click();
cy.wait('@datafilesOrder', { timeout: 10000 });
cy.contains('[role="button"]', 'Name').as('nameSortButton').click();
cy.contains('[role="button"]', 'Name')
.as('nameSortButton')
.click({ shiftKey: true });
cy.wait('@datafilesOrder', { timeout: 10000 });
cy.get('@nameSortButton').click();
cy.get('@nameSortButton').click({ shiftKey: true });
cy.wait('@datafilesOrder', { timeout: 10000 });

cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 60');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,20 @@ describe('DLS - Datasets Table', () => {
cy.get('@nameSortButton').click();
cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('DATASET 1');

// multiple columns
cy.get('@timeSortButton').click();
cy.wait('@datasets', { timeout: 10000 });
cy.get('@nameSortButton').click();
cy.get('@nameSortButton').click({ shiftKey: true });
cy.wait('@datasets', { timeout: 10000 });
cy.get('@nameSortButton').click();
cy.get('@nameSortButton').click({ shiftKey: true });
cy.wait('@datasets', { timeout: 10000 });

cy.get('[aria-rowcount="2"]').should('exist');
Expand Down
14 changes: 7 additions & 7 deletions packages/datagateway-dataview/cypress/e2e/table/dls/myData.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,19 @@ describe('DLS - MyData Table', () => {
cy.get('@titleSortButton').click();
cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="2"]').contains(
'Star enter wide nearly off.'
);

// multiple columns
cy.get('@titleSortButton').click();
cy.contains('[role="button"]', 'Instrument').click();
cy.contains('[role="button"]', 'Instrument').click({ shiftKey: true });

cy.get('[aria-rowindex="1"] [aria-colindex="2"]').contains(
'Across prepare why go.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ describe('Investigations Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains(
'Analysis reflect work or hour color maybe. Much team discussion message weight.'
);

// multiple columns
cy.contains('[role="button"]', 'Start Date').click();
cy.get('@titleSortButton').click();
cy.get('@titleSortButton').click({ shiftKey: true });
cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains(
'Analysis reflect work or hour color maybe. Much team discussion message weight.'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,20 @@ describe('ISIS - Data Publication Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.be.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.be.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="1"]').contains(
'Article subject amount'
);

// multiple columns
cy.get('@dateSortButton').click();
cy.get('@dateSortButton').click();
cy.get('@titleSortButton').click();
cy.get('@dateSortButton').click({ shiftKey: true });
cy.get('@titleSortButton').click({ shiftKey: true });

cy.get('[aria-rowindex="1"] [aria-colindex="1"]').contains(
'Church child time Congress'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,24 @@ describe('ISIS - Datafiles Table', () => {
cy.get('@locationSortButton').click();
cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="4"]').contains(
'/debate/form/growth.gif'
);

// multiple columns
cy.get('@timeSortButton').click();
cy.wait('@datafilesOrder', { timeout: 10000 });
cy.contains('[role="button"]', 'Name').as('nameSortButton').click();
cy.contains('[role="button"]', 'Name')
.as('nameSortButton')
.click({ shiftKey: true });
cy.wait('@datafilesOrder', { timeout: 10000 });
cy.get('@nameSortButton').click();
cy.get('@nameSortButton').click({ shiftKey: true });
cy.wait('@datafilesOrder', { timeout: 10000 });

cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('Datafile 78');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,18 @@ describe('ISIS - Datasets Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('DATASET 19');

// multiple columns
cy.get('@timeSortButton').click();
cy.wait('@datasetsOrder', { timeout: 10000 });
cy.get('@nameSortButton').click();
cy.get('@nameSortButton').click({ shiftKey: true });
cy.wait('@datasetsOrder', { timeout: 10000 });

cy.get('[aria-rowindex="1"] [aria-colindex="3"]').contains('DATASET 19');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ describe('ISIS - FacilityCycles Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="2"]').contains(
'2001-04-02 00:00:00'
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ describe('ISIS - Instruments Table', () => {

cy.get('[aria-sort="ascending"]').should('not.exist');
cy.get('[aria-sort="descending"]').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
'have.css',
'opacity',
'0'
);
// cy.get('.MuiTableSortLabel-iconDirectionDesc').should('not.exist');
// cy.get('.MuiTableSortLabel-iconDirectionAsc').should(
// 'have.css',
// 'opacity',
// '0'
// );
cy.get('[aria-rowindex="1"] [aria-colindex="2"]').contains(
'Stop prove field onto think suffer measure.'
);
Expand Down

0 comments on commit 72be066

Please sign in to comment.