diff --git a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts index 77cc8c669..07f5689c4 100644 --- a/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/card/isis/datasets.cy.ts @@ -15,18 +15,18 @@ describe('ISIS - Datasets Cards', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.contains('[role="button"]', 'desc').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.contains('[role="button"]', 'asc').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should be able to click a dataset to see its datafiles', () => { cy.get('[data-testid="card"]') .first() - .contains('DATASET 79') + .contains('DATASET 19') .click({ force: true }); cy.location('pathname').should( 'eq', - '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/79' + '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/19' ); }); @@ -62,9 +62,7 @@ describe('ISIS - Datasets Cards', () => { // ascending cy.contains('[role="button"]', 'Name').as('nameSortButton').click(); - cy.wait('@getDatasetsOrder', { - timeout: 10000, - }); + cy.contains('[role="button"]', 'asc').should('exist'); cy.contains('[role="button"]', 'desc').should('not.exist'); cy.get('[data-testid="card"]').first().contains('DATASET 19'); @@ -144,4 +142,4 @@ describe('ISIS - Datasets Cards', () => { ); cy.get('[data-testid="card"]').should('not.exist'); }); -}); +}); \ No newline at end of file diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts index 51ae140a2..26d536378 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datafiles.cy.ts @@ -32,8 +32,8 @@ describe('ISIS - Datafiles Table', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.get('[aria-sort="descending"]').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.get('[aria-sort="ascending"]').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should not load incorrect URL', () => { @@ -120,6 +120,8 @@ describe('ISIS - Datafiles Table', () => { it('should change icons when sorting on a column', () => { // clear default sort cy.contains('[role="button"]', 'Modified Time').click(); + cy.contains('[role="button"]', 'Modified Time').click(); + cy.contains('[role="button"]', 'Modified Time').click(); cy.get('[data-testid="SortIcon"]').should('have.length', 4); @@ -165,30 +167,30 @@ describe('ISIS - Datafiles Table', () => { cy.get('[aria-label="Show details"]').eq(1).click(); cy.get('#details-panel').should('be.visible'); - cy.get('#details-panel').contains('Datafile 1625').should('be.visible'); + cy.get('#details-panel').contains('Datafile 1149').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); cy.get('[aria-label="Show details"]').first().click(); - cy.get('#details-panel').contains('Datafile 1744').should('be.visible'); - cy.get('#details-panel').contains('Datafile 1625').should('not.exist'); + cy.get('#details-panel').contains('Datafile 1030').should('be.visible'); + cy.get('#details-panel').contains('Datafile 1149').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); cy.get('[aria-controls="datafile-details-panel"]').should('be.visible'); cy.get('#details-panel') - .contains('Doctor involve recently treat') + .contains('See American arm college policy') .should('be.visible'); cy.get('[aria-controls="datafile-parameters-panel"]').should('be.visible'); cy.get('[aria-controls="datafile-parameters-panel"]').click(); cy.get('#parameter-grid').should('be.visible'); - cy.get('#details-panel').contains('PARAMETERTYPE 11').should('be.visible'); + cy.get('#details-panel').contains('PARAMETERTYPE 18').should('be.visible'); cy.get('[aria-label="Hide details"]').first().click(); cy.get('#details-panel').should('not.exist'); cy.get('[aria-label="Hide details"]').should('not.exist'); }); -}); +}); \ No newline at end of file diff --git a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts index cdc2f786d..20e34b576 100644 --- a/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts +++ b/packages/datagateway-dataview/cypress/e2e/table/isis/datasets.cy.ts @@ -10,7 +10,7 @@ describe('ISIS - Datasets Table', () => { }); // Check that we have received the size from the API as this will produce // a re-render which can prevent some interactions. - cy.contains('[aria-rowindex="1"] [aria-colindex="4"]', '1.36 GB').should( + cy.contains('[aria-rowindex="1"] [aria-colindex="4"]', '1.47 GB').should( 'exist' ); }); @@ -20,13 +20,12 @@ describe('ISIS - Datasets Table', () => { cy.get('#datagateway-dataview').should('be.visible'); //Default sort - cy.get('[aria-sort="descending"]').should('exist'); - cy.get('.MuiTableSortLabel-iconDirectionDesc').should('be.visible'); + cy.get('[aria-sort="ascending"]').should('exist'); + cy.get('.MuiTableSortLabel-iconDirectionAsc').should('be.visible'); }); it('should not load incorrect URL', () => { cy.visit('/browse/instrument/2/facilityCycle/15/investigation/87/dataset'); - cy.contains('Oops!').should('be.visible'); cy.get('[role="grid"]').should('not.exist'); }); @@ -36,7 +35,7 @@ describe('ISIS - Datasets Table', () => { cy.location('pathname').should( 'eq', - '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/79' + '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/19' ); }); @@ -164,27 +163,23 @@ describe('ISIS - Datasets Table', () => { cy.get('#details-panel').should('be.visible'); cy.get('[aria-label="Hide details"]').should('exist'); - cy.get('#details-panel').contains('DATASET 19').should('be.visible'); + cy.get('#details-panel').contains('DATASET 79').should('be.visible'); cy.get('[aria-label="Show details"]').first().click(); - cy.get('#details-panel').contains('DATASET 79').should('be.visible'); - cy.get('#details-panel').contains('DATASET 19').should('not.exist'); + cy.get('#details-panel').contains('DATASET 19').should('be.visible'); + cy.get('#details-panel').contains('DATASET 79').should('not.exist'); cy.get('[aria-label="Hide details"]').should('have.length', 1); cy.get('#details-panel') - .contains( - 'Example early fight chance culture fill either collection. Someone similar space few should lawyer various quite. Page discuss so music worker lawyer' - ) + .contains('Night out whether mouth participant chance') .should('be.visible'); cy.get('[aria-controls="dataset-type-panel"]').should('be.visible'); cy.get('[aria-controls="dataset-type-panel"]').click(); cy.get('#details-panel') - .contains( - 'Stop prove field onto think suffer measure. Table lose season identify professor happen third simply.' - ) + .contains('Suggest shake effort many last prepare small') .should('be.visible'); cy.get('[aria-label="Hide details"]').first().click(); @@ -199,8 +194,8 @@ describe('ISIS - Datasets Table', () => { cy.location('pathname').should( 'eq', - '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/79/datafile' + '/browse/instrument/1/facilityCycle/19/investigation/19/dataset/19/datafile' ); }); }); -}); +}); \ No newline at end of file