Skip to content

Commit

Permalink
Merge pull request #402 from OasisDEX/open-positions-11
Browse files Browse the repository at this point in the history
Open positions - Open position for all available pools - Part 11
  • Loading branch information
juan-langa authored Jul 10, 2024
2 parents 79d2d09 + 21c091a commit 7ce04be
Show file tree
Hide file tree
Showing 11 changed files with 115 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test } from '@playwright/test';
import { morphoEthereumBorrowPools_1 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumBorrowPools_1.forEach((pool) => {
test.describe('Morpho Blue Borrow - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
protocol: 'morphoblue',
pool,
positionType: 'borrow',
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test } from '@playwright/test';
import { morphoEthereumBorrowPools_2 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumBorrowPools_2.forEach((pool) => {
test.describe('Morpho Blue Borrow - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
protocol: 'morphoblue',
pool,
positionType: 'borrow',
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test } from '@playwright/test';
import { morphoEthereumBorrowPools_3 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumBorrowPools_3.forEach((pool) => {
test.describe('Morpho Blue Borrow - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
protocol: 'morphoblue',
pool,
positionType: 'borrow',
});
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { test } from '@playwright/test';
import { morphoEthereumBorrowPools_4 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumBorrowPools_4.forEach((pool) => {
test.describe('Morpho Blue Borrow - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
protocol: 'morphoblue',
pool,
positionType: 'borrow',
});
});
});
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { test } from '@playwright/test';
import { morphoEthereumEarnPools } from 'utils/testData';
import { morphoEthereumEarnPools_1 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumEarnPools.forEach((pool) => {
morphoEthereumEarnPools_1.forEach((pool) => {
test.describe('Morpho Blue Multiply - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { test } from '@playwright/test';
import { morphoEthereumMultiplyPools_4 } from 'utils/testData';
import { morphoEthereumEarnPools_2 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumMultiplyPools_4.forEach((pool) => {
test.describe('Morpho Blue Multiply - Wallet connected', async () => {
morphoEthereumEarnPools_2.forEach((pool) => {
test.describe('Morpho Blue Earn - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
protocol: 'morphoblue',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { test } from '@playwright/test';
import { morphoEthereumMultiplyPools_2 } from 'utils/testData';
import { morphoEthereumEarnPools_3 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumMultiplyPools_2.forEach((pool) => {
morphoEthereumEarnPools_3.forEach((pool) => {
test.describe('Morpho Blue Multiply - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { test } from '@playwright/test';
import { morphoEthereumMultiplyPools_3 } from 'utils/testData';
import { morphoEthereumEarnPools_4 } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumMultiplyPools_3.forEach((pool) => {
morphoEthereumEarnPools_4.forEach((pool) => {
test.describe('Morpho Blue Multiply - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { test } from '@playwright/test';
import { morphoEthereumMultiplyPools_1 } from 'utils/testData';
import { morphoEthereumMultiplyPools } from 'utils/testData';
import { openNewPosition } from 'tests/sharedTestSteps/openNewPosition';

morphoEthereumMultiplyPools_1.forEach((pool) => {
morphoEthereumMultiplyPools.forEach((pool) => {
test.describe('Morpho Blue Multiply - Wallet connected', async () => {
await openNewPosition({
network: 'ethereum',
Expand Down
2 changes: 2 additions & 0 deletions utils/tenderly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export const tokenAddresses = {
OSETH: '0xf1c9acdc66974dfb6decb12aa385b9cd01190e38',
PYUSD: '0x6c3ea9036406852006290770BEdFcAbA0e23A0e8',
RETH: '0xae78736cd615f374d3085123a210448e74fc6393',
RSETH: '0xa1290d69c65a6fe4df752f95823fae25cb99e5a7',
SDAI: '0x83F20F44975D03b1b09e64809B757c47f942BEeA',
// STETH: '0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84',
SUSDE: '0x9d39a5de30e57443bff2a8307a4256c8797a3497',
Expand Down Expand Up @@ -130,6 +131,7 @@ export const tokenBalances = {
OSETH: '1000',
PYUSD: '200000',
RETH: '1000',
RSETH: '1000',
SDAI: '200000',
STETH: '1000',
SUSDE: '10000000',
Expand Down
60 changes: 46 additions & 14 deletions utils/testData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,46 +19,75 @@ export const sparkEthereumEarnPools = [
'WEETH-ETH',
];

export const morphoEthereumMultiplyPools_1 = [
export const morphoEthereumMultiplyPools = [
'WSTETH-USDC',
'WSTETH-USDT',
// 'WSTETH-USDA', - BUG 15978 - Pool should be removed for Multiply
'WBTC-USDC',
'WBTC-USDT',
'MKR-USDC',
'WSTETH-USDA', // - BUG 15978 - Pool should be removed for Multiply
];

export const morphoEthereumEarnPools_1 = [
'flagship-ETH',
'flagship-USDC',
'flagship-USDT',
'steakhouse-ETH',
'steakhouse-PYUSD',
'steakhouse-USDC',
'steakhouse-USDT',
];

export const morphoEthereumMultiplyPools_2 = [
export const morphoEthereumEarnPools_2 = [
'USDE-DAI-1',
'USDE-DAI-2',
'USDE-DAI-3',
'SUSDE-USDT',
'OSETH-ETH',
];

export const morphoEthereumMultiplyPools_3 = [
export const morphoEthereumEarnPools_3 = [
'WSTETH-ETH-1',
'WSTETH-ETH-2',
'WSTETH-ETH-3',
'WEETH-ETH',
'WOETH-ETH',
];

export const morphoEthereumMultiplyPools_4 = [
'MKR-USDC',
export const morphoEthereumEarnPools_4 = ['EZETH-ETH', 'SUSDE-DAI-1', 'SUSDE-DAI-2', 'SUSDE-DAI-3'];

export const morphoEthereumBorrowPools_1 = [
'USDE-DAI-1',
'USDE-DAI-2',
'USDE-DAI-3',
'OSETH-ETH',
'EZETH-ETH',
];

export const morphoEthereumBorrowPools_2 = [
'SUSDE-DAI-1',
'SUSDE-DAI-2',
'SUSDE-DAI-3',
'SUSDE-DAI-4',
'SUSDE-USDT',
];

export const morphoEthereumEarnPools = [
'flagship-ETH',
'flagship-USDC',
'flagship-USDT',
'steakhouse-ETH',
'steakhouse-PYUSD',
'steakhouse-USDC',
'steakhouse-USDT',
export const morphoEthereumBorrowPools_3 = [
'WSTETH-ETH-1',
'WSTETH-ETH-2',
'WSTETH-ETH-3',
'WSTETH-USDC',
'WSTETH-USDT',
'WSTETH-USDA',
];

export const morphoEthereumBorrowPools_4 = [
'WBTC-USDC',
'WBTC-USDT',
'MKR-USDC',
'RSETH-ETH',
'WOETH-ETH',
'WEETH-ETH',
];

export const morphoBaseMultiplyPools = ['ETH-USDC', 'WSTETH-USDC', 'CBETH-USDC', 'WEETH-USDC'];
Expand Down Expand Up @@ -207,6 +236,7 @@ export type Tokens =
| 'PTWEETH'
| 'RETH'
| 'RPL'
| 'RSETH'
| 'SDAI'
| 'SUSDE'
| 'USDA'
Expand Down Expand Up @@ -234,6 +264,7 @@ export type SetBalanceTokens =
| 'OSETH'
| 'PYUSD'
| 'RETH'
| 'RSETH'
| 'SDAI'
| 'STETH'
| 'SUSDE'
Expand Down Expand Up @@ -265,6 +296,7 @@ export const depositAmount = {
OSETH: '5',
PYUSD: '2000',
RETH: '5',
RSETH: '5',
SDAI: '2000',
STETH: '5',
SUSDE: '100000',
Expand Down

0 comments on commit 7ce04be

Please sign in to comment.