Skip to content

Commit

Permalink
refactor sort request specs to remove fragility
Browse files Browse the repository at this point in the history
  • Loading branch information
Jer-Sch committed Dec 9, 2021
1 parent 6591e88 commit 49f83be
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cypress/integration/grants/test_grant_explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,12 @@ describe('Grants Explorer page', () => {
// Options in All-Time category
cy.get('.vselect-clean').click();

cy.get('.vs__dropdown-menu').find('#vs3__option-14') // Need to be more specific here because the same options exist above. If sort options are added or removed, this option will need to be altered accordingly.
.contains('Highest Amount Raised').click();
cy.get('.vs__dropdown-menu li').filter(':contains("Highest Amount Raised")').last().click();
cy.url().should('contain', 'sort_option=-amount_received');

cy.get('.vselect-clean').click();

cy.get('.vs__dropdown-menu').find('#vs3__option-15') // Need to be more specific here because the same options exist above. If sort options are added or removed, this option will need to be altered accordingly.
.contains('Highest Contributor Count').click();
cy.get('.vs__dropdown-menu li').filter(':contains("Highest Contributor Count")').last().click();
cy.url().should('contain', 'sort_option=-contributor_count');

// Admin options
Expand Down

0 comments on commit 49f83be

Please sign in to comment.