Skip to content

Commit 614e94e

Browse files
e2e: wait before sorting again
1 parent 831e088 commit 614e94e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/curve-ui-kit/src/shared/ui/DataTable/Sortable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const Sortable = <T extends TableItem>({
2929
rotated={column?.getIsSorted() === 'asc'}
3030
fontSize={column?.getIsSorted() ? 20 : 0}
3131
isEnabled={isEnabled}
32-
{...(isEnabled && { 'data-testid': `icon-sort-${column?.id}-${column?.getIsSorted()}` })}
32+
{...(isEnabled && { testId: `icon-sort-${column?.id}-${column?.getIsSorted()}` })}
3333
/>
3434
</Stack>
3535
)

tests/cypress/e2e/main/dex-markets.cy.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ describe('DEX Pools', () => {
8585
getTopUsdValues('volume').then((vals) => expectDesc(vals)) // initial is Volume desc
8686
cy.url().should('not.include', 'volume') // initial sort not in URL
8787
sortBy('volume')
88+
cy.get('[data-testid="icon-sort-volume-desc"]').should('be.visible')
8889
getTopUsdValues('volume').then((vals) => expectAsc(vals))
8990
cy.url().should('include', 'sort=volume')
9091
})
@@ -94,6 +95,7 @@ describe('DEX Pools', () => {
9495
sortBy('tvl')
9596
getTopUsdValues('tvl').then((vals) => expectDesc(vals))
9697
cy.url().should('include', 'sort=-tvl')
98+
cy.get('[data-testid="icon-sort-tvl-desc"]').should('be.visible')
9799
sortBy('tvl')
98100
getTopUsdValues('tvl').then((vals) => expectAsc(vals))
99101
cy.url().should('include', 'sort=tvl')
@@ -120,7 +122,7 @@ describe('DEX Pools', () => {
120122
cy.get('[data-testid="collapse-icon"]').first().should('be.visible')
121123
cy.get('[data-testid="pool-link-deposit"]').click()
122124
}
123-
cy.url(LOAD_TIMEOUT).should('match', /\/dex\/arbitrum\/pools\/[^/]+\/deposit\/?$/)
125+
cy.url(LOAD_TIMEOUT).should('match', /\/dex\/arbitrum\/pools\/[^/]+\/(deposit|swap)\/?$/)
124126
cy.title().should('match', /Curve - Pool - .* - Curve/)
125127
})
126128
})

0 commit comments

Comments
 (0)