diff --git a/cypress.config.ts b/cypress.config.ts index ff52e33d50..a2e2a3f104 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -156,5 +156,6 @@ export default defineConfig({ }) }, specPattern: 'cypress/e2e/specs/*.e2e.cy.ts', + excludeSpecPattern: '*/*/**/zap.e2e.cy.ts', }, }) diff --git a/cypress/e2e/selectors/constants.cy.ts b/cypress/e2e/selectors/constants.cy.ts index e10804a1fd..7ce18b6ae6 100644 --- a/cypress/e2e/selectors/constants.cy.ts +++ b/cypress/e2e/selectors/constants.cy.ts @@ -12,11 +12,11 @@ export enum TAG { } export const TOKEN_SYMBOLS = { - Ethereum: ['BAND', 'wstETH', 'USDT', 'USDC', '1INCH'], - Arbitrum: ['ANGLE', 'ARB', 'USDT', 'USDC.e', 'BOB'], - Optimism: ['BOND', 'wstETH', 'USDT', 'USDC', 'BOB'], - Avalanche: ['AAVE.e', 'sAVAX', 'USDT.e', 'USDC.e', 'BUSD.e'], - BNB: ['RICE', 'BUSD', 'USDT', 'USDC', 'BOB'], + Ethereum: ['BAND', 'wstETH', 'USDT', 'AAVE', '1INCH'], + Arbitrum: ['ANGLE', 'ARB', 'USDT', 'ANGLE', 'BOB'], + Optimism: ['BOND', 'WETH', 'USDT', 'AAVE', 'BOB'], + Avalanche: ['AAVE.e', 'sAVAX', 'USDT.e', 'ANGLE', 'BUSD.e'], + BNB: ['RICE', 'BUSD', 'USDT', 'AAVE', 'BOB'], } export const NETWORK_LIST = [ diff --git a/cypress/e2e/specs/intercept.e2e.cy.ts b/cypress/e2e/specs/intercept.e2e.cy.ts index 3bfb40ae59..983b320833 100644 --- a/cypress/e2e/specs/intercept.e2e.cy.ts +++ b/cypress/e2e/specs/intercept.e2e.cy.ts @@ -11,7 +11,7 @@ describe('Intercept', { tags: TAG.regression }, () => { SwapPage.open(DEFAULT_URL) }) - afterEach(() => { + beforeEach(() => { cy.reload() }) describe('Swap', () => { @@ -46,21 +46,13 @@ describe('Intercept', { tags: TAG.regression }, () => { }) }) - describe('My Pools', () => { - it('Should get farm list successfully', () => { - cy.intercept('GET', '**/farm-pools?**').as('get-farm-list') - SwapPage.goToMyPoolsPage() - cy.wait('@get-farm-list', { timeout: 5000 }).its('response.statusCode').should('equal', 200) - }) - }) - describe('Farms', () => { it('Should get pool, farm list successfully', () => { cy.intercept('GET', '**/farm-pools?**').as('get-farm-list') cy.intercept('GET', '**/pools?**').as('get-pool-list') SwapPage.goToFarmPage() cy.get('[data-testid=farm-block]') - .should(_ => {}) + .should(_ => { }) .then($list => { if ($list.length) { cy.wait('@get-pool-list', { timeout: 5000 }).its('response.statusCode').should('equal', 200) @@ -69,4 +61,12 @@ describe('Intercept', { tags: TAG.regression }, () => { }) }) }) + + describe('My Pools', () => { + it('Should get farm list successfully', () => { + cy.intercept('GET', '**/farm-pools?**').as('get-farm-list') + SwapPage.goToMyPoolsPage() + cy.wait('@get-farm-list', { timeout: 5000 }).its('response.statusCode').should('equal', 200) + }) + }) }) \ No newline at end of file diff --git a/cypress/e2e/specs/swap-page.e2e.cy.ts b/cypress/e2e/specs/swap-page.e2e.cy.ts index 3e7f7856b0..dd96372409 100644 --- a/cypress/e2e/specs/swap-page.e2e.cy.ts +++ b/cypress/e2e/specs/swap-page.e2e.cy.ts @@ -37,15 +37,18 @@ describe(`Token Catalog on ${NETWORK}`, { tags: TAG.regression }, () => { it('Should be selected tokenOut in favorite tokens list successfully', () => { SwapPage.selectTokenOut().getFavoriteTokens(arr => { - tokenCatalog.selectFavoriteToken(arr[2]) + tokenCatalog.selectFavoriteToken(arr[0]) SwapPage.getCurrentTokenOut(text => { - expect(text).to.equal(arr[2]) + expect(text).to.equal(arr[0]) }) }) }) }) describe('Remove/add token with favorite tokens list', () => { + afterEach(() => { + tokenCatalog.closePopup() + }) it('Should be removed tokenIn from favorite tokens list', () => { SwapPage.selectTokenIn().getFavoriteTokens(arr => { tokenCatalog.removeFavoriteToken(arr[1]) @@ -54,7 +57,6 @@ describe(`Token Catalog on ${NETWORK}`, { tags: TAG.regression }, () => { expect(list).not.to.include.members([arr[1]]) }) }) - tokenCatalog.closePopup() }) it('Should be added tokenIn to favorite tokens list', () => { @@ -62,7 +64,6 @@ describe(`Token Catalog on ${NETWORK}`, { tags: TAG.regression }, () => { tokenCatalog.getFavoriteTokens(list => { expect(list).to.include.members([tokenSymbols[0]]) }) - tokenCatalog.closePopup() }) it('Should be removed tokenOut from favorite tokens list', () => { @@ -73,15 +74,13 @@ describe(`Token Catalog on ${NETWORK}`, { tags: TAG.regression }, () => { expect(list).not.to.include.members([arr[2]]) }) }) - tokenCatalog.closePopup() }) it('Should be added tokenOut to favorite tokens list', () => { - SwapPage.selectTokenOut().addFavoriteToken([tokenSymbols[0]]) + SwapPage.selectTokenOut().addFavoriteToken([tokenSymbols[4]]) tokenCatalog.getFavoriteTokens(list => { - expect(list).to.include.members([tokenSymbols[0]]) + expect(list).to.include.members([tokenSymbols[4]]) }) - tokenCatalog.closePopup() }) })