Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
grothem committed Oct 26, 2024
1 parent 5f952c1 commit 553ed0c
Show file tree
Hide file tree
Showing 25 changed files with 9 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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);
});
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 2 additions & 4 deletions cypress/support/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down
5 changes: 2 additions & 3 deletions cypress/support/helpers/dashboard.helper.ts
Original file line number Diff line number Diff line change
@@ -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);
}
Expand Down
Loading

0 comments on commit 553ed0c

Please sign in to comment.