From 553ed0ce1097ad33c8e583f5a2e74b9a389fe8bb Mon Sep 17 00:00:00 2001 From: Mark Grothe Date: Sat, 26 Oct 2024 14:08:07 -0500 Subject: [PATCH] fix: tests --- .../0-assets/dai.avalanche-v2.cy.ts | 6 +- .../0-assets/usdc.avalanche-v2.cy.ts | 2 - .../0-assets/usdt.avalanche-v2.cy.ts | 4 -- .../0-assets/wbtc.avalanche-v2.cy.ts | 2 - .../0-assets/weth.avalanche-v2.cy.ts | 2 - .../0-assets/link.ethereum-v3.cy.ts | 2 - .../0-assets/wbtc.ethereum-v3.cy.ts | 2 - .../0-assets/link.arbitrum-v3.cy.ts | 2 - .../0-assets/wbtc.arbitrum-v3.cy.ts | 2 - .../0-assets/link.avalanche-v3.cy.ts | 2 - .../0-assets/wbtc.avalanche-v3.cy.ts | 2 - .../0-assets/weth.avalanche-v3.cy.ts | 2 - .../0-assets/link.polygon-v3.cy.ts | 2 - .../0-assets/wbtc.polygon-v3.cy.ts | 2 - .../0-assets/weth.polygon-v3.cy.ts | 2 - .../0-assets/link.optimism-v3.cy.ts | 6 +- .../0-assets/wbtc.optimism-v3.cy.ts | 2 - .../0-assets/link.fantom-v3.cy.ts | 2 - .../0-assets/wbtc.fantom-v3.cy.ts | 2 - .../0-assets/weth.fantom-v3.cy.ts | 2 - cypress/support/commands.ts | 6 +- cypress/support/helpers/dashboard.helper.ts | 5 +- cypress/support/steps/verification.steps.ts | 60 +------------------ .../BorrowedPositionsListItem.tsx | 3 +- .../GhoBorrowedPositionsListItem.tsx | 2 +- 25 files changed, 9 insertions(+), 117 deletions(-) diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/dai.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/dai.avalanche-v2.cy.ts index ad2aa297a4..0b9be613ef 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/dai.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/dai.avalanche-v2.cy.ts @@ -3,10 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, - switchApyBlocked, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { @@ -71,6 +68,5 @@ describe('DAI INTEGRATION SPEC, AVALANCHE V2 MARKET', () => { supply(testData.testCases.deposit, skipTestState, true); repay(testData.testCases.repay, skipTestState, false); withdraw(testData.testCases.withdraw, skipTestState, false); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); dashboardAssetValuesVerification(testData.verifications.finalDashboard, skipTestState); }); diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts index 3e6d5a6ac1..812aedeff8 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdc.avalanche-v2.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/co import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -82,6 +81,5 @@ describe('USDC INTEGRATION SPEC, AVALANCHE V2 MARKET', () => { repay(repayCase, skipTestState, false); }); withdraw(testData.testCases.withdraw, skipTestState, false); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); dashboardAssetValuesVerification(testData.verifications.finalDashboard, skipTestState); }); diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts index 3adaa13a9b..77639fadb9 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/usdt.avalanche-v2.cy.ts @@ -4,9 +4,7 @@ import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { - changeBorrowTypeBlocked, dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -87,7 +85,5 @@ describe.skip('USDT INTEGRATION SPEC, AVALANCHE V2 MARKET', () => { repay(repayCase, skipTestState, false); }); withdraw(testData.testCases.withdraw, skipTestState, false); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); - changeBorrowTypeBlocked(testData.testCases.checkBorrowTypeBlocked, skipTestState); dashboardAssetValuesVerification(testData.verifications.finalDashboard, skipTestState); }); diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts index 1256b10865..ce762dc3fc 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/wbtc.avalanche-v2.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/co import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -71,6 +70,5 @@ describe.skip('WBTC INTEGRATION SPEC, AVALANCHE V2 MARKET', () => { supply(testData.testCases.deposit, skipTestState, true); repay(testData.testCases.repay, skipTestState, false); withdraw(testData.testCases.withdraw, skipTestState, false); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); dashboardAssetValuesVerification(testData.verifications.finalDashboard, skipTestState); }); diff --git a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts index 61d310513c..0b1a9b92ed 100644 --- a/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts +++ b/cypress/e2e/0-v2-markets/3-avalanche-v2-market/0-assets/weth.avalanche-v2.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/co import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -71,6 +70,5 @@ describe('WETH INTEGRATION SPEC, AVALANCHE V2 MARKET', () => { supply(testData.testCases.deposit, skipTestState, true); repay(testData.testCases.repay, skipTestState, false); withdraw(testData.testCases.withdraw, skipTestState, false); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); dashboardAssetValuesVerification(testData.verifications.finalDashboard, skipTestState); }); diff --git a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts index f70cffb835..ff77b1305b 100644 --- a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/link.ethereum-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAEthereumV3Fork } from '../../../../support/steps/ import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -85,7 +84,6 @@ describe('LINK INTEGRATION SPEC, ETHEREUM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts index e4abd5a356..0057a90ac7 100644 --- a/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/0-ethereum-v3-market/0-assets/wbtc.ethereum-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAEthereumV3Fork } from '../../../../support/steps/ import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -85,7 +84,6 @@ describe('WBTC INTEGRATION SPEC, ETHEREUM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts index 02dd6715cb..72f54b7e67 100644 --- a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/link.arbitrum-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyArbitrumFork } from '../../../../support/steps/con import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -85,7 +84,6 @@ describe('LINK INTEGRATION SPEC, ARBITRUM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts index 1a840edadf..e8d82092d3 100644 --- a/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/wbtc.arbitrum-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyArbitrumFork } from '../../../../support/steps/con import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -84,7 +83,6 @@ describe('WBTC INTEGRATION SPEC, ARBITRUM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts index f42fc98fee..ae46e758a4 100644 --- a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/link.avalanche-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/co import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -85,7 +84,6 @@ describe('LINK INTEGRATION SPEC, AVALANCHE V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts index e69fa0f9bd..ac8f0973e0 100644 --- a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/wbtc.avalanche-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/co import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -85,7 +84,6 @@ describe('WBTC INTEGRATION SPEC, AVALANCHE V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts index f71fd40e13..9905bc7cf3 100644 --- a/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/weth.avalanche-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/co import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -85,7 +84,6 @@ describe('WETH INTEGRATION SPEC, AVALANCHE V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts index 58218cd1dc..8252e862fa 100644 --- a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/link.polygon-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyPolygonFork } from '../../../../support/steps/conf import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -86,7 +85,6 @@ describe.skip('LINK INTEGRATION SPEC, POLYGON V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts index b9cfc382ea..c87e473900 100644 --- a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/wbtc.polygon-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyPolygonFork } from '../../../../support/steps/conf import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -87,7 +86,6 @@ describe('WBTC INTEGRATION SPEC, POLYGON V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts index 71c9210420..4a2bf1c401 100644 --- a/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/weth.polygon-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyPolygonFork } from '../../../../support/steps/conf import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -87,7 +86,6 @@ describe('WETH INTEGRATION SPEC, POLYGON V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/link.optimism-v3.cy.ts b/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/link.optimism-v3.cy.ts index 232edc267a..375d418c1a 100644 --- a/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/link.optimism-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/link.optimism-v3.cy.ts @@ -3,10 +3,7 @@ import constants from '../../../../fixtures/constans.json'; import { skipState } from '../../../../support/steps/common'; import { configEnvWithTenderlyOptimismFork } from '../../../../support/steps/configuration.steps'; import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; -import { - dashboardAssetValuesVerification, - switchApyBlocked, -} from '../../../../support/steps/verification.steps'; +import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; const tokensToRequest: RequestedTokens = { @@ -84,7 +81,6 @@ describe('LINK INTEGRATION SPEC, OPTIMISM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts b/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts index 5ace96b854..c8b5a57d6c 100644 --- a/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/4-optimism-v3-market/0-assets/wbtc.optimism-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyOptimismFork } from '../../../../support/steps/con import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; import { RequestedTokens, tokenSet } from '../../../4-gho-ethereum/helpers/token.helper'; @@ -87,7 +86,6 @@ describe.skip('WBTC INTEGRATION SPEC, OPTIMISM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts index 64c2bfd4c8..e91f383d0f 100644 --- a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/link.fantom-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyFantomFork } from '../../../../support/steps/confi import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; const testData = { @@ -87,7 +86,6 @@ describe('LINK INTEGRATION SPEC, FANTOM V3 MARKET', () => { testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); withdraw(testData.testCases.withdraw, skipTestState, false); dashboardAssetValuesVerification(testData.verifications.finalDashboard, skipTestState); }); diff --git a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts index 9b770b7d4d..39f9043e04 100644 --- a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/wbtc.fantom-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyFantomFork } from '../../../../support/steps/confi import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; const testData = { @@ -83,7 +82,6 @@ describe('WBTC INTEGRATION SPEC, FANTOM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts index 7277e266ce..c4dfe32b1f 100644 --- a/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts +++ b/cypress/e2e/1-v3-markets/5-fantom-v3-market/0-assets/weth.fantom-v3.cy.ts @@ -5,7 +5,6 @@ import { configEnvWithTenderlyFantomFork } from '../../../../support/steps/confi import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps'; import { dashboardAssetValuesVerification, - switchApyBlocked, } from '../../../../support/steps/verification.steps'; const testData = { @@ -83,7 +82,6 @@ describe('WETH INTEGRATION SPEC, FANTOM V3 MARKET', () => { testData.testCases.borrow.forEach((borrowCase) => { borrow(borrowCase, skipTestState, true); }); - switchApyBlocked(testData.testCases.checkDisabledApy, skipTestState); supply(testData.testCases.deposit, skipTestState, true); testData.testCases.repay.forEach((repayCase) => { repay(repayCase, skipTestState, false); diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts index 84d651de9f..289792844f 100644 --- a/cypress/support/commands.ts +++ b/cypress/support/commands.ts @@ -97,10 +97,8 @@ Cypress.Commands.add( } ); -Cypress.Commands.add('getDashBoardBorrowedRow', (assetName: string, apyType: string) => { - return cy - .get(`[data-cy='dashboardBorrowedListItem_${assetName.toUpperCase()}_${apyType}']`) - .first(); +Cypress.Commands.add('getDashBoardBorrowedRow', (assetName: string) => { + return cy.get(`[data-cy='dashboardBorrowedListItem_${assetName.toUpperCase()}']`).first(); }); Cypress.Commands.add('getDashBoardSuppliedRow', (assetName: string, isCollateralType?: boolean) => { diff --git a/cypress/support/helpers/dashboard.helper.ts b/cypress/support/helpers/dashboard.helper.ts index b8474b0aa7..de345d370e 100644 --- a/cypress/support/helpers/dashboard.helper.ts +++ b/cypress/support/helpers/dashboard.helper.ts @@ -1,9 +1,8 @@ import assets from '../../fixtures/assets.json'; export class DashboardHelpers { - public static getApyBorrowedRate(tokenName: string, isVariable = true) { - const typeToken = isVariable ? 'Variable' : 'Stable'; - const _selector = `[data-cy="dashboardBorrowedListItem_${tokenName}_${typeToken}"]`; + public static getApyBorrowedRate(tokenName: string) { + const _selector = `[data-cy="dashboardBorrowedListItem_${tokenName}"]`; cy.doSwitchToDashboardBorrowView(); return this.getApyRate(_selector); } diff --git a/cypress/support/steps/verification.steps.ts b/cypress/support/steps/verification.steps.ts index a0265fe6ab..837da6dc5b 100644 --- a/cypress/support/steps/verification.steps.ts +++ b/cypress/support/steps/verification.steps.ts @@ -81,7 +81,7 @@ export const dashboardAssetValuesVerification = ( if (estimatedCase.isGho) { expect($row.find(`[data-cy="apyButton_fixed"]`)).to.exist; } else { - expect($row.find(`[data-cy="apyButton_${estimatedCase.apyType}"]`)).to.exist; + // expect($row.find(`[data-cy="apyButton_${estimatedCase.apyType}"]`)).to.exist; } if (estimatedCase.amount) { cy.get('[data-cy=nativeAmount]').contains(estimatedCase.amount.toString()); @@ -200,64 +200,6 @@ export const switchCollateralBlockedInModal = ( }); }; -/** - * This full step to verification that switch apy blocked blocked - * @example switchApyBlocked({{ shortName: 'ETH'; fullName: 'Ethereum' }, apyType:'Variable'}, skipTestState) - */ -export const switchApyBlocked = ( - { - asset, - apyType, - }: { - asset: { shortName: string; fullName: string }; - apyType: string; - }, - skip: SkipType -) => { - const _shortName = asset.shortName; - return describe('Check that apy switcher disabled', () => { - skipSetup(skip); - it(`Open dashboard`, () => { - cy.doSwitchToDashboardBorrowView(); - }); - it(`Verify that switching button disabled with APY ${apyType}`, () => { - cy.getDashBoardBorrowedRow(_shortName, apyType) - .find(`[data-cy='apyButton_${apyType}']`) - .should('be.disabled') - .should('have.text', `${apyType}`); - }); - }); -}; - -/** - * This full step to verification that switch apy blocked blocked - * @example changeBorrowTypeBlocked({{ shortName: 'ETH'; fullName: 'Ethereum' }, isCollateralType: true}, skipTestState) - */ -export const changeBorrowTypeBlocked = ( - { - asset, - isCollateralType, - }: { - asset: { shortName: string; fullName: string }; - isCollateralType: boolean; - }, - skip: SkipType -) => { - const _shortName = asset.shortName; - - return describe(`Verify that Switch borrow is unavailable`, () => { - skipSetup(skip); - it('Open dashboard page', () => { - cy.doSwitchToDashboardSupplyView(); - }); - it('Try to change apy type', () => { - cy.getDashBoardSuppliedRow(_shortName, isCollateralType) - .find('.MuiSwitch-input ') - .should('be.disabled'); - }); - }); -}; - /** * This full step to verification dashboard health factor * diff --git a/src/modules/dashboard/lists/BorrowedPositionsList/BorrowedPositionsListItem.tsx b/src/modules/dashboard/lists/BorrowedPositionsList/BorrowedPositionsListItem.tsx index c3837930aa..48669b7295 100644 --- a/src/modules/dashboard/lists/BorrowedPositionsList/BorrowedPositionsListItem.tsx +++ b/src/modules/dashboard/lists/BorrowedPositionsList/BorrowedPositionsListItem.tsx @@ -93,7 +93,6 @@ interface BorrowedPositionsListItemProps extends DashboardReserve { const BorrowedPositionsListItemDesktop = ({ reserve, - borrowRateMode, disableBorrow, disableSwitch, disableRepay, @@ -118,7 +117,7 @@ const BorrowedPositionsListItemDesktop = ({ frozen={reserve.isFrozen} paused={reserve.isPaused} borrowEnabled={reserve.borrowingEnabled} - data-cy={`dashboardBorrowedListItem_${reserve.symbol.toUpperCase()}_${borrowRateMode}`} + data-cy={`dashboardBorrowedListItem_${reserve.symbol.toUpperCase()}`} showBorrowCapTooltips showExternalIncentivesTooltips={showExternalIncentivesTooltip( reserve.symbol, diff --git a/src/modules/dashboard/lists/BorrowedPositionsList/GhoBorrowedPositionsListItem.tsx b/src/modules/dashboard/lists/BorrowedPositionsList/GhoBorrowedPositionsListItem.tsx index 6655f4a615..9c8fb21fec 100644 --- a/src/modules/dashboard/lists/BorrowedPositionsList/GhoBorrowedPositionsListItem.tsx +++ b/src/modules/dashboard/lists/BorrowedPositionsList/GhoBorrowedPositionsListItem.tsx @@ -139,7 +139,7 @@ const GhoBorrowedPositionsListItemDesktop = ({ detailsAddress={underlyingAsset} currentMarket={currentMarket} frozen={isFrozen} - data-cy={`dashboardBorrowedListItem_${symbol.toUpperCase()}_Variable`} + data-cy={`dashboardBorrowedListItem_${symbol.toUpperCase()}`} showBorrowCapTooltips >