Skip to content

Commit

Permalink
Correct page view button in e2e tests (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoelBiju committed Sep 3, 2021
1 parent 2e6b6d3 commit d282562
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ describe('Datasets Cards', () => {
['@getDatasetsCount', '@getDatasetsOrder', '@getDatasetsOrder'],
{ timeout: 10000 }
);
cy.get('[aria-label="page-view"]').click().wait(['@getDatasetsOrder'], {
timeout: 10000,
});
cy.get('[aria-label="page-view Display as cards"]')
.click()
.wait(['@getDatasetsOrder'], {
timeout: 10000,
});
});

it('should load correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ describe('DLS - Datasets Cards', () => {
timeout: 10000,
}
);
cy.get('[aria-label="page-view"]').click().wait(['@getDatasetsOrder'], {
timeout: 10000,
});
cy.get('[aria-label="page-view Display as cards"]')
.click()
.wait(['@getDatasetsOrder'], {
timeout: 10000,
});
});

it('should load correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('DLS - Proposals Cards', () => {
['@getInvestigationsCount', '@getInvestigationsOrder'],
{ timeout: 10000 }
);
cy.get('[aria-label="page-view"]')
cy.get('[aria-label="page-view Display as cards"]')
.click()
.wait(['@getInvestigationsOrder'], {
timeout: 10000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('DLS - Visits Cards', () => {
['@getInvestigationsCount', '@getInvestigationsOrder'],
{ timeout: 10000 }
);
cy.get('[aria-label="page-view"]')
cy.get('[aria-label="page-view Display as cards"]')
.click()
.wait(['@getInvestigationsOrder'], {
timeout: 10000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Investigations Cards', () => {
],
{ timeout: 15000 }
);
cy.get('[aria-label="page-view"]').click();
cy.get('[aria-label="page-view Display as cards"]').click();
});

it('should load correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ describe('ISIS - Datasets Cards', () => {
).wait(['@getDatasetsCount', '@getDatasetsOrder', '@getDatasetsOrder'], {
timeout: 10000,
});
cy.get('[aria-label="page-view"]').click().wait(['@getDatasetsOrder'], {
timeout: 10000,
});
cy.get('[aria-label="page-view Display as cards"]')
.click()
.wait(['@getDatasetsOrder'], {
timeout: 10000,
});
});

it('should load correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('ISIS - Instruments Cards', () => {
['@getInstrumentsCount', '@getInstrumentsOrder'],
{ timeout: 10000 }
);
cy.get('[aria-label="page-view"]').click();
cy.get('[aria-label="page-view Display as cards"]').click();
});

it('should load correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ describe('ISIS - Investigations Cards', () => {
['@getInvestigationsCount', '@getInvestigationsOrder'],
{ timeout: 10000 }
);
cy.get('[aria-label="page-view"]').click();
cy.get('[aria-label="page-view Display as cards"]').click();
});

it('should load correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ describe('ISIS - Studies Cards', () => {
['@getStudiesCount', '@getStudiesOrder'],
{ timeout: 10000 }
);
cy.get('[aria-label="page-view"]').click();
cy.get('[aria-label="page-view Display as cards"]').click();
});

it('should load correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('PageContainer Component', () => {

cy.get('[aria-label="view-cart"]').should('exist');

cy.get('[aria-label="page-view"]').should('exist');
cy.get('[aria-label="page-view Display as cards"]').should('exist');
});

it('should display correct entity count', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('PageContainer Component', () => {

cy.get('[aria-label="view-cart"]').should('exist');

cy.get('[aria-label="page-view"]').should('exist');
cy.get('[aria-label="page-view Display as cards"]').should('exist');
});

it('should display correct entity count', () => {
Expand Down

0 comments on commit d282562

Please sign in to comment.