Skip to content

Commit

Permalink
Simplify filtering tests
Browse files Browse the repository at this point in the history
  • Loading branch information
wlsf82 committed Oct 31, 2024
1 parent 7c34fdb commit e094c3f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 33 deletions.
10 changes: 4 additions & 6 deletions cypress/e2e/gui/EngageSphere.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import capitalizeFirstLetter from '../../support/utils'

const options = {
viewportHeight: 1240,
viewportWidth: 1024
Expand Down Expand Up @@ -70,10 +68,10 @@ describe('EngageSphere Frontend', options, () => {
'GET',
`${CUSTOMERS_API_URL}**&size=${encodedSize}**`,
{ fixture: `${sizeKey}Customers` }
).as(`get${capitalizeFirstLetter(sizeKey)}Customers`)
).as('getFilteredBySizeCustomers')

cy.get('[data-testid="size-filter"]').select(sizeValue)
cy.wait(`@get${capitalizeFirstLetter(sizeKey)}Customers`)
cy.wait('@getFilteredBySizeCustomers')
cy.get('tbody tr').should('have.length', 1)
})
})
Expand Down Expand Up @@ -113,10 +111,10 @@ describe('EngageSphere Frontend', options, () => {
'GET',
`${CUSTOMERS_API_URL}**&industry=${industryValue}**`,
{ fixture: `${industryKey}Customers` }
).as(`get${capitalizeFirstLetter(industryKey)}Customers`)
).as('getFilteredByIndutryCustomers')

cy.get('[data-testid="industry-filter"]').select(industryValue)
cy.wait(`@get${capitalizeFirstLetter(industryKey)}Customers`)
cy.wait('@getFilteredByIndutryCustomers')
cy.get('tbody tr').should('have.length', 1)
})
})
Expand Down
27 changes: 0 additions & 27 deletions cypress/support/utils.js

This file was deleted.

0 comments on commit e094c3f

Please sign in to comment.