Skip to content

Commit f288925

Browse files
committed
test: cypress fixes
1 parent 31c6799 commit f288925

File tree

11 files changed

+42
-292
lines changed

11 files changed

+42
-292
lines changed

cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/dai.arbitrum-v3.cy.ts

Lines changed: 12 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@ import assets from '../../../../fixtures/assets.json';
44
import constants from '../../../../fixtures/constans.json';
55
import { skipState } from '../../../../support/steps/common';
66
import { configEnvWithTenderlyArbitrumFork } from '../../../../support/steps/configuration.steps';
7-
import {
8-
borrow,
9-
changeBorrowType,
10-
repay,
11-
supply,
12-
withdraw,
13-
withdrawAndSwitch,
14-
} from '../../../../support/steps/main.steps';
7+
import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps';
158
import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps';
169

1710
const tokensToRequest: RequestedTokens = {
@@ -27,40 +20,13 @@ const testData = {
2720
apyType: constants.borrowAPYType.variable,
2821
hasApproval: true,
2922
},
30-
{
31-
asset: assets.arbitrumMarket.DAI,
32-
amount: 25,
33-
apyType: constants.borrowAPYType.stable,
34-
hasApproval: true,
35-
},
36-
],
37-
changeBorrowType: [
38-
{
39-
asset: assets.arbitrumMarket.DAI,
40-
apyType: constants.borrowAPYType.stable,
41-
newAPY: constants.borrowAPYType.variable,
42-
hasApproval: true,
43-
},
44-
{
45-
asset: assets.arbitrumMarket.DAI,
46-
apyType: constants.borrowAPYType.variable,
47-
newAPY: constants.borrowAPYType.stable,
48-
hasApproval: true,
49-
},
5023
],
5124
deposit: {
5225
asset: assets.arbitrumMarket.DAI,
5326
amount: 10.1,
5427
hasApproval: false,
5528
},
5629
repay: [
57-
{
58-
asset: assets.arbitrumMarket.DAI,
59-
apyType: constants.apyType.stable,
60-
amount: 2,
61-
hasApproval: true,
62-
repayOption: constants.repayType.default,
63-
},
6430
{
6531
asset: assets.arbitrumMarket.DAI,
6632
apyType: constants.apyType.stable,
@@ -76,28 +42,28 @@ const testData = {
7642
amount: 1,
7743
hasApproval: true,
7844
},
79-
withdrawAndSwitch: {
80-
fromAsset: assets.arbitrumMarket.DAI,
81-
toAsset: assets.arbitrumMarket.USDC,
82-
isCollateralFromAsset: true,
83-
amount: 5,
84-
hasApproval: false,
85-
},
45+
// withdrawAndSwitch: {
46+
// fromAsset: assets.arbitrumMarket.DAI,
47+
// toAsset: assets.arbitrumMarket.USDC,
48+
// isCollateralFromAsset: true,
49+
// amount: 5,
50+
// hasApproval: false,
51+
// },
8652
},
8753
verifications: {
8854
finalDashboard: [
8955
{
9056
type: constants.dashboardTypes.deposit,
9157
assetName: assets.arbitrumMarket.DAI.shortName,
92-
amount: 2.0,
58+
amount: 7.1,
9359
collateralType: constants.collateralType.isCollateral,
9460
isCollateral: true,
9561
},
9662
{
9763
type: constants.dashboardTypes.borrow,
9864
assetName: assets.arbitrumMarket.DAI.shortName,
99-
amount: 46.0,
100-
apyType: constants.borrowAPYType.stable,
65+
amount: 23.0,
66+
apyType: constants.borrowAPYType.variable,
10167
},
10268
],
10369
},
@@ -112,14 +78,11 @@ describe('DAI INTEGRATION SPEC, ARBITRUM V3 MARKET', () => {
11278
testData.testCases.borrow.forEach((borrowCase) => {
11379
borrow(borrowCase, skipTestState, true);
11480
});
115-
testData.testCases.changeBorrowType.forEach((changeAPRCase) => {
116-
changeBorrowType(changeAPRCase, skipTestState, true);
117-
});
11881
supply(testData.testCases.deposit, skipTestState, true);
11982
testData.testCases.repay.forEach((repayCase) => {
12083
repay(repayCase, skipTestState, false);
12184
});
122-
withdrawAndSwitch(testData.testCases.withdrawAndSwitch, skipTestState, false);
85+
// withdrawAndSwitch(testData.testCases.withdrawAndSwitch, skipTestState, false);
12386
withdraw(testData.testCases.withdraw, skipTestState, false);
12487
dashboardAssetValuesVerification(testData.verifications.finalDashboard, skipTestState);
12588
});

cypress/e2e/1-v3-markets/1-arbitrum-v3-market/0-assets/usdc.arbitrum-v3.cy.ts

Lines changed: 5 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ import assets from '../../../../fixtures/assets.json';
44
import constants from '../../../../fixtures/constans.json';
55
import { skipState } from '../../../../support/steps/common';
66
import { configEnvWithTenderlyArbitrumFork } from '../../../../support/steps/configuration.steps';
7-
import {
8-
borrow,
9-
changeBorrowType,
10-
repay,
11-
supply,
12-
withdraw,
13-
} from '../../../../support/steps/main.steps';
7+
import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps';
148
import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps';
159

1610
const tokensToRequest: RequestedTokens = {
@@ -26,26 +20,6 @@ const testData = {
2620
apyType: constants.borrowAPYType.variable,
2721
hasApproval: true,
2822
},
29-
{
30-
asset: assets.arbitrumMarket.USDC,
31-
amount: 25,
32-
apyType: constants.borrowAPYType.stable,
33-
hasApproval: true,
34-
},
35-
],
36-
changeBorrowType: [
37-
{
38-
asset: assets.arbitrumMarket.USDC,
39-
apyType: constants.borrowAPYType.stable,
40-
newAPY: constants.borrowAPYType.variable,
41-
hasApproval: true,
42-
},
43-
{
44-
asset: assets.arbitrumMarket.USDC,
45-
apyType: constants.borrowAPYType.variable,
46-
newAPY: constants.borrowAPYType.stable,
47-
hasApproval: true,
48-
},
4923
],
5024
deposit: {
5125
asset: assets.arbitrumMarket.USDC,
@@ -55,21 +29,14 @@ const testData = {
5529
repay: [
5630
{
5731
asset: assets.arbitrumMarket.USDC,
58-
apyType: constants.apyType.stable,
59-
amount: 2,
60-
hasApproval: false,
61-
repayOption: constants.repayType.collateral,
62-
},
63-
{
64-
asset: assets.arbitrumMarket.USDC,
65-
apyType: constants.apyType.stable,
32+
apyType: constants.apyType.variable,
6633
amount: 2,
6734
hasApproval: true,
6835
repayOption: constants.repayType.wallet,
6936
},
7037
{
7138
asset: assets.arbitrumMarket.USDC,
72-
apyType: constants.apyType.stable,
39+
apyType: constants.apyType.variable,
7340
repayableAsset: assets.arbitrumMarket.aUSDC,
7441
amount: 2,
7542
hasApproval: true,
@@ -95,8 +62,8 @@ const testData = {
9562
{
9663
type: constants.dashboardTypes.borrow,
9764
assetName: assets.arbitrumMarket.USDC.shortName,
98-
amount: 44.0,
99-
apyType: constants.borrowAPYType.stable,
65+
amount: 21.0,
66+
apyType: constants.borrowAPYType.variable,
10067
},
10168
],
10269
},
@@ -111,9 +78,6 @@ describe('USDC INTEGRATION SPEC, ARBITRUM V3 MARKET', () => {
11178
testData.testCases.borrow.forEach((borrowCase) => {
11279
borrow(borrowCase, skipTestState, true);
11380
});
114-
testData.testCases.changeBorrowType.forEach((changeAPRCase) => {
115-
changeBorrowType(changeAPRCase, skipTestState, true);
116-
});
11781
supply(testData.testCases.deposit, skipTestState, true);
11882
testData.testCases.repay.forEach((repayCase) => {
11983
repay(repayCase, skipTestState, false);

cypress/e2e/1-v3-markets/2-avalanche-v3-market/0-assets/usdt.avalacnhe-v3.cy.ts

Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,14 @@ import assets from '../../../../fixtures/assets.json';
44
import constants from '../../../../fixtures/constans.json';
55
import { skipState } from '../../../../support/steps/common';
66
import { configEnvWithTenderlyAvalancheFork } from '../../../../support/steps/configuration.steps';
7-
import {
8-
borrow,
9-
changeBorrowType,
10-
repay,
11-
supply,
12-
withdraw,
13-
} from '../../../../support/steps/main.steps';
7+
import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps';
148
import {
159
dashboardAssetValuesVerification,
1610
switchCollateralBlocked,
1711
} from '../../../../support/steps/verification.steps';
1812

1913
const tokensToRequest: RequestedTokens = {
20-
aAVAXAvalancheV3: 9000,
14+
aAVAXAvalancheV3: 1,
2115
};
2216

2317
const testData = {
@@ -29,51 +23,24 @@ const testData = {
2923
apyType: constants.borrowAPYType.variable,
3024
hasApproval: true,
3125
},
32-
{
33-
asset: assets.avalancheV3Market.USDT,
34-
amount: 10,
35-
apyType: constants.borrowAPYType.stable,
36-
hasApproval: true,
37-
},
38-
],
39-
changeBorrowType: [
40-
{
41-
asset: assets.avalancheV3Market.USDT,
42-
apyType: constants.borrowAPYType.stable,
43-
newAPY: constants.borrowAPYType.variable,
44-
hasApproval: true,
45-
},
46-
{
47-
asset: assets.avalancheV3Market.USDT,
48-
apyType: constants.borrowAPYType.variable,
49-
newAPY: constants.borrowAPYType.stable,
50-
hasApproval: true,
51-
},
5226
],
5327
deposit: {
5428
asset: assets.avalancheV3Market.USDT,
5529
amount: 10.1,
5630
hasApproval: false,
5731
},
58-
repayCollateral: {
59-
asset: assets.avalancheV3Market.USDT,
60-
apyType: constants.apyType.stable,
61-
amount: 2,
62-
hasApproval: false,
63-
repayOption: constants.repayType.default,
64-
},
6532
repay: [
6633
{
6734
asset: assets.avalancheV3Market.USDT,
68-
apyType: constants.apyType.stable,
35+
apyType: constants.apyType.variable,
6936
repayableAsset: assets.avalancheV3Market.aUSDT,
7037
amount: 2,
7138
hasApproval: true,
7239
repayOption: constants.repayType.default,
7340
},
7441
{
7542
asset: assets.avalancheV3Market.USDT,
76-
apyType: constants.apyType.stable,
43+
apyType: constants.apyType.variable,
7744
amount: 2,
7845
hasApproval: false,
7946
repayOption: constants.repayType.collateral,
@@ -102,8 +69,8 @@ const testData = {
10269
{
10370
type: constants.dashboardTypes.borrow,
10471
assetName: assets.avalancheV3Market.USDT.shortName,
105-
amount: 14.0,
106-
apyType: constants.borrowAPYType.stable,
72+
amount: 21.0,
73+
apyType: constants.borrowAPYType.variable,
10774
},
10875
],
10976
},
@@ -119,10 +86,6 @@ describe.skip('USDT INTEGRATION SPEC, AVALANCHE V3 MARKET', () => {
11986
testData.testCases.borrow.forEach((borrowCase) => {
12087
borrow(borrowCase, skipTestState, true);
12188
});
122-
repay(testData.testCases.repayCollateral, skipTestState, false);
123-
testData.testCases.changeBorrowType.forEach((changeAPRCase) => {
124-
changeBorrowType(changeAPRCase, skipTestState, true);
125-
});
12689
supply(testData.testCases.deposit, skipTestState, true);
12790
testData.testCases.repay.forEach((repayCase) => {
12891
repay(repayCase, skipTestState, false);

cypress/e2e/1-v3-markets/3-polygon-v3-market/0-assets/usdc.polygon-v3.cy.ts

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ import assets from '../../../../fixtures/assets.json';
44
import constants from '../../../../fixtures/constans.json';
55
import { skipState } from '../../../../support/steps/common';
66
import { configEnvWithTenderlyPolygonFork } from '../../../../support/steps/configuration.steps';
7-
import {
8-
borrow,
9-
changeBorrowType,
10-
repay,
11-
supply,
12-
withdraw,
13-
} from '../../../../support/steps/main.steps';
7+
import { borrow, repay, supply, withdraw } from '../../../../support/steps/main.steps';
148
import { dashboardAssetValuesVerification } from '../../../../support/steps/verification.steps';
159

1610
const tokensToRequest: RequestedTokens = {
@@ -26,50 +20,23 @@ const testData = {
2620
apyType: constants.borrowAPYType.variable,
2721
hasApproval: true,
2822
},
29-
{
30-
asset: assets.polygonV3Market.USDC,
31-
amount: 25,
32-
apyType: constants.borrowAPYType.stable,
33-
hasApproval: true,
34-
},
35-
],
36-
changeBorrowType: [
37-
{
38-
asset: assets.polygonV3Market.USDC,
39-
apyType: constants.borrowAPYType.stable,
40-
newAPY: constants.borrowAPYType.variable,
41-
hasApproval: true,
42-
},
43-
{
44-
asset: assets.polygonV3Market.USDC,
45-
apyType: constants.borrowAPYType.variable,
46-
newAPY: constants.borrowAPYType.stable,
47-
hasApproval: true,
48-
},
4923
],
5024
deposit: {
5125
asset: assets.polygonV3Market.USDC,
5226
amount: 10.1,
5327
hasApproval: false,
5428
},
55-
repayCollateral: {
56-
asset: assets.polygonV3Market.USDC,
57-
apyType: constants.apyType.stable,
58-
amount: 2,
59-
hasApproval: false,
60-
repayOption: constants.repayType.collateral,
61-
},
6229
repay: [
6330
{
6431
asset: assets.polygonV3Market.USDC,
65-
apyType: constants.apyType.stable,
32+
apyType: constants.apyType.variable,
6633
amount: 2,
6734
hasApproval: true,
6835
repayOption: constants.repayType.wallet,
6936
},
7037
{
7138
asset: assets.polygonV3Market.USDC,
72-
apyType: constants.apyType.stable,
39+
apyType: constants.apyType.variable,
7340
repayableAsset: assets.polygonV3Market.aUSDC,
7441
amount: 2,
7542
hasApproval: true,
@@ -95,8 +62,8 @@ const testData = {
9562
{
9663
type: constants.dashboardTypes.borrow,
9764
assetName: assets.polygonV3Market.USDC.shortName,
98-
amount: 44.0,
99-
apyType: constants.borrowAPYType.stable,
65+
amount: 21.0,
66+
apyType: constants.borrowAPYType.variable,
10067
},
10168
],
10269
},
@@ -113,10 +80,6 @@ describe('USDC INTEGRATION SPEC, POLYGON V3 MARKET', () => {
11380
testData.testCases.borrow.forEach((borrowCase) => {
11481
borrow(borrowCase, skipTestState, true);
11582
});
116-
repay(testData.testCases.repayCollateral, skipTestState, false);
117-
testData.testCases.changeBorrowType.forEach((changeAPRCase) => {
118-
changeBorrowType(changeAPRCase, skipTestState, true);
119-
});
12083
supply(testData.testCases.deposit, skipTestState, true);
12184
testData.testCases.repay.forEach((repayCase) => {
12285
repay(repayCase, skipTestState, false);

0 commit comments

Comments
 (0)