diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index aad6fe9..ad47379 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -25,71 +25,71 @@ jobs: flags_features: ${{ inputs.flags_features}} secrets: inherit - # with-wallet-aave-ethereum-tests: - # name: 'With wallet - Aave - Ethereum' - # runs-on: ubuntu-latest - # env: - # TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }} - # TENDERLY_USER: ${{ secrets.TENDERLY_USER }} - # TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }} - # container: - # image: synthetixio/docker-node:18.16-ubuntu - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/setup-node@v3 - # with: - # node-version: 18 - # - name: Install dependencies - # run: yarn - # - name: Install playwright - # run: npx playwright install && npx playwright install-deps - # - name: Install xvfb - # run: apt-get update -y && apt-get -y install xvfb && rm -rf /var/lib/apt/lists/* /var/cache/apt/* - # - name: Run With wallet Aave Ethereum tests - # run: | - # TENDERLY_PROJECT=${{ secrets.TENDERLY_PROJECT }} \ - # TENDERLY_USER=${{ secrets.TENDERLY_USER }} \ - # TENDERLY_ACCESS_KEY=${{ secrets.TENDERLY_ACCESS_KEY }} \ - # yarn nightly:with-wallet:aave:ethereum - # - uses: actions/upload-artifact@v3 - # if: always() - # with: - # name: playwright-report-with-wallet-aave-ethereum - # path: playwright-reports/with-wallet-aave-ethereum - # retention-days: 30 + with-wallet-aave-ethereum-tests: + name: 'With wallet - Aave - Ethereum' + runs-on: ubuntu-latest + env: + TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }} + TENDERLY_USER: ${{ secrets.TENDERLY_USER }} + TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }} + container: + image: synthetixio/docker-node:18.16-ubuntu + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: yarn + - name: Install playwright + run: npx playwright install && npx playwright install-deps + - name: Install xvfb + run: apt-get update -y && apt-get -y install xvfb && rm -rf /var/lib/apt/lists/* /var/cache/apt/* + - name: Run With wallet Aave Ethereum tests + run: | + TENDERLY_PROJECT=${{ secrets.TENDERLY_PROJECT }} \ + TENDERLY_USER=${{ secrets.TENDERLY_USER }} \ + TENDERLY_ACCESS_KEY=${{ secrets.TENDERLY_ACCESS_KEY }} \ + yarn nightly:with-wallet:aave:ethereum + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report-with-wallet-aave-ethereum + path: playwright-reports/with-wallet-aave-ethereum + retention-days: 30 - # with-wallet-aave-other-tests: - # name: 'With wallet - Aave - Arbitrum, Optimism & Base' - # runs-on: ubuntu-latest - # env: - # TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }} - # TENDERLY_USER: ${{ secrets.TENDERLY_USER }} - # TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }} - # container: - # image: synthetixio/docker-node:18.16-ubuntu - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/setup-node@v3 - # with: - # node-version: 18 - # - name: Install dependencies - # run: yarn - # - name: Install playwright - # run: npx playwright install && npx playwright install-deps - # - name: Install xvfb - # run: apt-get update -y && apt-get -y install xvfb && rm -rf /var/lib/apt/lists/* /var/cache/apt/* - # - name: Run With wallet Aave Arbitrum, Optimism and Base tests - # run: | - # TENDERLY_PROJECT=${{ secrets.TENDERLY_PROJECT }} \ - # TENDERLY_USER=${{ secrets.TENDERLY_USER }} \ - # TENDERLY_ACCESS_KEY=${{ secrets.TENDERLY_ACCESS_KEY }} \ - # yarn nightly:with-wallet:aave:other - # - uses: actions/upload-artifact@v3 - # if: always() - # with: - # name: playwright-report-with-wallet-aave-other - # path: playwright-reports/with-wallet-aave-other - # retention-days: 30 + with-wallet-aave-other-tests: + name: 'With wallet - Aave - Arbitrum, Optimism & Base' + runs-on: ubuntu-latest + env: + TENDERLY_PROJECT: ${{ secrets.TENDERLY_PROJECT }} + TENDERLY_USER: ${{ secrets.TENDERLY_USER }} + TENDERLY_ACCESS_KEY: ${{ secrets.TENDERLY_ACCESS_KEY }} + container: + image: synthetixio/docker-node:18.16-ubuntu + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install dependencies + run: yarn + - name: Install playwright + run: npx playwright install && npx playwright install-deps + - name: Install xvfb + run: apt-get update -y && apt-get -y install xvfb && rm -rf /var/lib/apt/lists/* /var/cache/apt/* + - name: Run With wallet Aave Arbitrum, Optimism and Base tests + run: | + TENDERLY_PROJECT=${{ secrets.TENDERLY_PROJECT }} \ + TENDERLY_USER=${{ secrets.TENDERLY_USER }} \ + TENDERLY_ACCESS_KEY=${{ secrets.TENDERLY_ACCESS_KEY }} \ + yarn nightly:with-wallet:aave:other + - uses: actions/upload-artifact@v3 + if: always() + with: + name: playwright-report-with-wallet-aave-other + path: playwright-reports/with-wallet-aave-other + retention-days: 30 # with-wallet-ajna-and-morphoblue-tests: # name: 'With wallet - Ajna & Morpho Blue' diff --git a/tests/sharedTestSteps/positionManagement.ts b/tests/sharedTestSteps/positionManagement.ts index 4aa4f4a..8c5e438 100644 --- a/tests/sharedTestSteps/positionManagement.ts +++ b/tests/sharedTestSteps/positionManagement.ts @@ -97,7 +97,6 @@ export const openPosition = async ({ if (buttonLabel === `Set ${deposit.token} allowance` || ajnaExistingDpm) { await app.position.setup.setTokenAllowance(deposit.token); } - // Setting up allowance randomly fails - Retry until it's set. await expect(async () => { await app.position.setup.approveAllowanceOrRetry(); @@ -108,7 +107,6 @@ export const openPosition = async ({ }); await app.position.setup.continueShouldBeVisible(); }).toPass({ timeout: longTestTimeout }); - await app.position.setup.continue(); } @@ -458,7 +456,11 @@ export const manageDebtOrCollateral = async ({ // ================= // Recently added for Arbitrum Borrow ETH/USDC - await app.position.setup.confirm(); + const manageHeader = app.page.getByText('Manage your '); + const confirmButton = app.page.getByRole('button', { name: 'Confirm' }); + if ((await manageHeader.isVisible()) && (await confirmButton.isVisible())) { + await app.position.setup.confirm(); + } // ================= // Position creation randomly fails - Retry until it's created. diff --git a/tests/withWallet/aaveV3/base/aaveV3BorrowBase_1.spec.ts b/tests/withWallet/aaveV3/base-old/aaveV3BorrowBase_1.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/base/aaveV3BorrowBase_1.spec.ts rename to tests/withWallet/aaveV3/base-old/aaveV3BorrowBase_1.spec.ts diff --git a/tests/withWallet/aaveV3/base/aaveV3EarnBase.spec.ts b/tests/withWallet/aaveV3/base-old/aaveV3EarnBase.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/base/aaveV3EarnBase.spec.ts rename to tests/withWallet/aaveV3/base-old/aaveV3EarnBase.spec.ts diff --git a/tests/withWallet/aaveV3/base/aaveV3MultiplyBase.spec.ts b/tests/withWallet/aaveV3/base-old/aaveV3MultiplyBase.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/base/aaveV3MultiplyBase.spec.ts rename to tests/withWallet/aaveV3/base-old/aaveV3MultiplyBase.spec.ts diff --git a/tests/withWallet/aaveV3/base/aaveV3MultiplyBaseAutomations_1.spec.ts b/tests/withWallet/aaveV3/base-old/aaveV3MultiplyBaseAutomations_1.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/base/aaveV3MultiplyBaseAutomations_1.spec.ts rename to tests/withWallet/aaveV3/base-old/aaveV3MultiplyBaseAutomations_1.spec.ts diff --git a/tests/withWallet/aaveV3/base/aaveV3MultiplyBaseAutomations_2.spec.ts b/tests/withWallet/aaveV3/base-old/aaveV3MultiplyBaseAutomations_2.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/base/aaveV3MultiplyBaseAutomations_2.spec.ts rename to tests/withWallet/aaveV3/base-old/aaveV3MultiplyBaseAutomations_2.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum-old/aaveV3BorrowEthereum.spec.ts b/tests/withWallet/aaveV3/ethereum-old/aaveV3BorrowEthereum.spec.ts new file mode 100644 index 0000000..f6f8c7a --- /dev/null +++ b/tests/withWallet/aaveV3/ethereum-old/aaveV3BorrowEthereum.spec.ts @@ -0,0 +1,189 @@ +import { BrowserContext, test } from '@playwright/test'; +import { metamaskSetUp } from 'utils/setup'; +import { resetState } from '@synthetixio/synpress/commands/synpress'; +import * as tenderly from 'utils/tenderly'; +import { setup } from 'utils/setup'; +import { extremelyLongTestTimeout, longTestTimeout } from 'utils/config'; +import { App } from 'src/app'; +import { + close, + manageDebtOrCollateral, + openPosition, +} from 'tests/sharedTestSteps/positionManagement'; + +let context: BrowserContext; +let app: App; +let forkId: string; +let walletAddress: string; + +test.describe.configure({ mode: 'serial' }); + +test.describe('Aave V3 Borrow - Ethereum - Wallet connected', async () => { + test.afterAll(async () => { + await tenderly.deleteFork(forkId); + + await app.page.close(); + + await context.close(); + + await resetState(); + }); + + test('It should open an Aave V3 Borrow Ethereum position - WSTETH/USDT @regression', async () => { + test.info().annotations.push({ + type: 'Test case', + description: '11682', + }); + + test.setTimeout(extremelyLongTestTimeout); + + ({ context } = await metamaskSetUp({ network: 'mainnet' })); + let page = await context.newPage(); + app = new App(page); + + ({ forkId, walletAddress } = await setup({ app, network: 'mainnet' })); + + await tenderly.setTokenBalance({ + forkId, + network: 'mainnet', + walletAddress, + token: 'WSTETH', + balance: '50', + }); + + await app.page.goto('/ethereum/aave/v3/borrow/WSTETH-USDT#setup'); + + await openPosition({ + app, + forkId, + deposit: { token: 'WSTETH', amount: '7.5' }, + borrow: { token: 'USDT', amount: '3000' }, + }); + }); + + test('It should Deposit and Borrow in a single tx from an existing Aave V3 Ethereum Borrow position @regression', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxxx', + }); + + test.setTimeout(longTestTimeout); + + await manageDebtOrCollateral({ + app, + forkId, + allowanceNotNeeded: true, + deposit: { token: 'WSTETH', amount: '1.5' }, + borrow: { token: 'USDT', amount: '1000' }, + expectedCollateralDeposited: { + amount: '9.00', + token: 'WSTETH', + }, + expectedDebt: { amount: '4,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + }); + }); + + test('It should Withdraw and Pay back in a single tx from an existing Aave V3 Ethereum Borrow position @regression', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxxx', + }); + + test.setTimeout(longTestTimeout); + + await app.position.manage.withdrawCollateral(); + + await manageDebtOrCollateral({ + app, + forkId, + withdraw: { token: 'WSTETH', amount: '2' }, + payBack: { token: 'USDT', amount: '2000' }, + expectedCollateralDeposited: { + amount: '7.00', + token: 'WSTETH', + }, + expectedDebt: { amount: '2,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + }); + }); + + test('It should Borrow and Deposit in a single tx on an existing Aave V3 Ethereum Borrow position @regression', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxx', + }); + + test.setTimeout(longTestTimeout); + + await app.position.manage.openManageOptions({ currentLabel: 'WSTETH' }); + await app.position.manage.select('Manage debt'); + + await manageDebtOrCollateral({ + app, + forkId, + allowanceNotNeeded: true, + borrow: { token: 'USDT', amount: '3000' }, + deposit: { token: 'WSTETH', amount: '3' }, + expectedCollateralDeposited: { + amount: '10.00', + token: 'WSTETH', + }, + expectedDebt: { amount: '5,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + }); + }); + + test('It should Pay back and Withdraw in a single tx on an existing Aave V3 Ethereum Borrow position @regression', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxx', + }); + + test.setTimeout(longTestTimeout); + + // Reload page to avoid random fails + await app.page.reload(); + + await app.position.manage.openManageOptions({ currentLabel: 'WSTETH' }); + await app.position.manage.select('Manage debt'); + await app.position.manage.payBackDebt(); + + await manageDebtOrCollateral({ + app, + forkId, + payBack: { token: 'USDT', amount: '4000' }, + withdraw: { token: 'WSTETH', amount: '1.5' }, + expectedCollateralDeposited: { + amount: '8.50', + token: 'WSTETH', + }, + expectedDebt: { amount: '1,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + allowanceNotNeeded: true, + }); + }); + + test('It should close an existent Aave V3 Borrow Ethereum position - Close to collateral token (WSTETH)', async () => { + test.info().annotations.push({ + type: 'Test case', + description: '12060', + }); + + test.setTimeout(longTestTimeout); + + // Pause and relaod to avoid random fails + await app.page.waitForTimeout(1000); + await app.page.reload(); + + await close({ + forkId, + app, + positionType: 'Borrow', + closeTo: 'collateral', + collateralToken: 'WSTETH', + debtToken: 'USDT', + tokenAmountAfterClosing: '[4-8].[0-9]{3,4}', + }); + }); +}); diff --git a/tests/withWallet/aaveV3/ethereum-old/earn/aaveV3EarnEthereum1.spec.ts b/tests/withWallet/aaveV3/ethereum-old/earn/aaveV3EarnEthereum1.spec.ts new file mode 100644 index 0000000..a154675 --- /dev/null +++ b/tests/withWallet/aaveV3/ethereum-old/earn/aaveV3EarnEthereum1.spec.ts @@ -0,0 +1,193 @@ +import { BrowserContext, test } from '@playwright/test'; +import { metamaskSetUp } from 'utils/setup'; +import { resetState } from '@synthetixio/synpress/commands/synpress'; +import * as tenderly from 'utils/tenderly'; +import { setup } from 'utils/setup'; +import { extremelyLongTestTimeout, positionTimeout, veryLongTestTimeout } from 'utils/config'; +import { App } from 'src/app'; +import { manageDebtOrCollateral, openPosition } from 'tests/sharedTestSteps/positionManagement'; +import { reloadUntilCorrect } from 'utils/general'; + +let context: BrowserContext; +let app: App; +let forkId: string; +let walletAddress: string; + +test.describe.configure({ mode: 'serial' }); + +test.describe('Aave V3 Earn - Ethereum - Wallet connected', async () => { + test.afterAll(async () => { + await tenderly.deleteFork(forkId); + + await app.page.close(); + + await context.close(); + + await resetState(); + }); + + test('It should open an Aave V3 Earn Ethereum position - WSTETH-ETH @regression', async () => { + test.info().annotations.push({ + type: 'Test case', + description: '11672', + }); + + test.setTimeout(extremelyLongTestTimeout); + + await test.step('Test setup', async () => { + ({ context } = await metamaskSetUp({ network: 'mainnet' })); + let page = await context.newPage(); + app = new App(page); + + ({ forkId, walletAddress } = await setup({ app, network: 'mainnet' })); + + await tenderly.setTokenBalance({ + forkId, + walletAddress, + network: 'mainnet', + token: 'WSTETH', + balance: '50', + }); + }); + + await app.position.openPage('/ethereum/aave/v3/earn/wsteth-eth#simulate'); + + await openPosition({ + app, + forkId, + deposit: { token: 'ETH', amount: '10' }, + }); + }); + + test('It should Deposit extra collateral on an existing Aave V3 Ethereum Earn position', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxxx', + }); + + test.setTimeout(veryLongTestTimeout); + + await app.position.overview.shouldHaveExposure({ + amount: '9.[0-9]{4}', + token: 'WSTETH', + timeout: positionTimeout, + }); + await app.position.overview.shouldHaveDebt({ + amount: '1.[0-9]{4}', + token: 'ETH', + }); + + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage collateral'); + + await manageDebtOrCollateral({ + app, + forkId, + deposit: { token: 'WSTETH', amount: '20' }, + expectedCollateralExposure: { + amount: '29.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '1.[0-9]{4}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); + }); + + test('It should Withdraw from an existing Aave V3 Ethereum Earn position', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxxx', + }); + + test.setTimeout(veryLongTestTimeout); + + // Pause and Reload page to avoid random fails + await app.page.waitForTimeout(1_000); + await reloadUntilCorrect(app); + + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage collateral'); + await app.position.manage.withdrawCollateral(); + + await manageDebtOrCollateral({ + app, + forkId, + withdraw: { token: 'WSTETH', amount: '10' }, + expectedCollateralExposure: { + amount: '19.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '1.[0-9]{2}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); + }); + + test('It should Borrow from an existing Aave V3 Ethereum Earn position', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxx', + }); + + test.setTimeout(veryLongTestTimeout); + + // Pause and Reload page to avoid random fails + await app.page.waitForTimeout(1_000); + await reloadUntilCorrect(app); + + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage debt'); + await app.position.manage.withdrawDebt(); + + await manageDebtOrCollateral({ + app, + forkId, + borrow: { token: 'ETH', amount: '10' }, + expectedCollateralExposure: { + amount: '19.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '11.[0-9]{2}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); + }); + + test('It should Pay back on an existing Aave V3 Ethereum Earn position', async () => { + test.info().annotations.push({ + type: 'Test case', + description: 'xxxx', + }); + + test.setTimeout(veryLongTestTimeout); + + // Pause and Reload page to avoid random fails + await app.page.waitForTimeout(1_000); + await reloadUntilCorrect(app); + + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage debt'); + + await manageDebtOrCollateral({ + app, + forkId, + payBack: { token: 'ETH', amount: '5' }, + expectedCollateralExposure: { + amount: '19.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '6.[0-9]{2}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); + }); +}); diff --git a/tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum2.spec.ts b/tests/withWallet/aaveV3/ethereum-old/earn/aaveV3EarnEthereum2.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum2.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/earn/aaveV3EarnEthereum2.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum3.spec.ts b/tests/withWallet/aaveV3/ethereum-old/earn/aaveV3EarnEthereum3.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum3.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/earn/aaveV3EarnEthereum3.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/Multiply/aaveV3MultiplyEthereum1.spec.ts b/tests/withWallet/aaveV3/ethereum-old/multiply/aaveV3MultiplyEthereum1.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/Multiply/aaveV3MultiplyEthereum1.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/multiply/aaveV3MultiplyEthereum1.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/Multiply/aaveV3MultiplyEthereum2.spec.ts b/tests/withWallet/aaveV3/ethereum-old/multiply/aaveV3MultiplyEthereum2.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/Multiply/aaveV3MultiplyEthereum2.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/multiply/aaveV3MultiplyEthereum2.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/Multiply/aaveV3MultiplyEthereumAutomations.spec.ts b/tests/withWallet/aaveV3/ethereum-old/multiply/aaveV3MultiplyEthereumAutomations.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/Multiply/aaveV3MultiplyEthereumAutomations.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/multiply/aaveV3MultiplyEthereumAutomations.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/borrEthUsdcToAny.spec.ts b/tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/borrEthUsdcToAny.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/borrEthUsdcToAny.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/borrEthUsdcToAny.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/borrWbtcDaiToAny.spec.ts b/tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/borrWbtcDaiToAny.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/borrWbtcDaiToAny.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/borrWbtcDaiToAny.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/multEthDaiToAny.spec.ts b/tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/multEthDaiToAny.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/multEthDaiToAny.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/multEthDaiToAny.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/multUsdcEthToAny.spec.ts b/tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/multUsdcEthToAny.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/multUsdcEthToAny.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/multUsdcEthToAny.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/multWbtcUsdcToAny.spec.ts b/tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/multWbtcUsdcToAny.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/swap/aaveToMorpho/multWbtcUsdcToAny.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/swap/aaveToMorpho/multWbtcUsdcToAny.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/swap/aaveToSpark/borrEthDaiToAny.spec.ts b/tests/withWallet/aaveV3/ethereum-old/swap/aaveToSpark/borrEthDaiToAny.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/swap/aaveToSpark/borrEthDaiToAny.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/swap/aaveToSpark/borrEthDaiToAny.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/swap/aaveToSpark/multWstethUsdcToAny.spec.ts b/tests/withWallet/aaveV3/ethereum-old/swap/aaveToSpark/multWstethUsdcToAny.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/ethereum/swap/aaveToSpark/multWstethUsdcToAny.spec.ts rename to tests/withWallet/aaveV3/ethereum-old/swap/aaveToSpark/multWstethUsdcToAny.spec.ts diff --git a/tests/withWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts b/tests/withWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts index f6f8c7a..050168e 100644 --- a/tests/withWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts +++ b/tests/withWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts @@ -1,8 +1,8 @@ -import { BrowserContext, test } from '@playwright/test'; -import { metamaskSetUp } from 'utils/setup'; -import { resetState } from '@synthetixio/synpress/commands/synpress'; -import * as tenderly from 'utils/tenderly'; +import { testWithSynpress } from '@synthetixio/synpress'; +import { metaMaskFixtures } from '@synthetixio/synpress/playwright'; +import basicSetup from 'utils/synpress/test-wallet-setup/basic.setup'; import { setup } from 'utils/setup'; +import * as tenderly from 'utils/tenderly'; import { extremelyLongTestTimeout, longTestTimeout } from 'utils/config'; import { App } from 'src/app'; import { @@ -11,37 +11,18 @@ import { openPosition, } from 'tests/sharedTestSteps/positionManagement'; -let context: BrowserContext; let app: App; let forkId: string; let walletAddress: string; -test.describe.configure({ mode: 'serial' }); +const test = testWithSynpress(metaMaskFixtures(basicSetup)); test.describe('Aave V3 Borrow - Ethereum - Wallet connected', async () => { - test.afterAll(async () => { - await tenderly.deleteFork(forkId); - - await app.page.close(); - - await context.close(); - - await resetState(); - }); - - test('It should open an Aave V3 Borrow Ethereum position - WSTETH/USDT @regression', async () => { - test.info().annotations.push({ - type: 'Test case', - description: '11682', - }); - - test.setTimeout(extremelyLongTestTimeout); + test.beforeEach(async ({ metamask, page }) => { + test.setTimeout(longTestTimeout); - ({ context } = await metamaskSetUp({ network: 'mainnet' })); - let page = await context.newPage(); app = new App(page); - - ({ forkId, walletAddress } = await setup({ app, network: 'mainnet' })); + ({ forkId, walletAddress } = await setup({ metamask, app, network: 'mainnet' })); await tenderly.setTokenBalance({ forkId, @@ -50,140 +31,142 @@ test.describe('Aave V3 Borrow - Ethereum - Wallet connected', async () => { token: 'WSTETH', balance: '50', }); - - await app.page.goto('/ethereum/aave/v3/borrow/WSTETH-USDT#setup'); - - await openPosition({ - app, - forkId, - deposit: { token: 'WSTETH', amount: '7.5' }, - borrow: { token: 'USDT', amount: '3000' }, - }); }); - test('It should Deposit and Borrow in a single tx from an existing Aave V3 Ethereum Borrow position @regression', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxxx', - }); - - test.setTimeout(longTestTimeout); - - await manageDebtOrCollateral({ - app, - forkId, - allowanceNotNeeded: true, - deposit: { token: 'WSTETH', amount: '1.5' }, - borrow: { token: 'USDT', amount: '1000' }, - expectedCollateralDeposited: { - amount: '9.00', - token: 'WSTETH', - }, - expectedDebt: { amount: '4,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, - protocol: 'Aave V3', - }); + test.afterEach(async () => { + await tenderly.deleteFork(forkId); + await app.page.close(); }); - test('It should Withdraw and Pay back in a single tx from an existing Aave V3 Ethereum Borrow position @regression', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxxx', - }); - - test.setTimeout(longTestTimeout); + test('It should open and manage an Aave V3 Borrow Ethereum position - WSTETH/USDT @regression', async ({ + metamask, + }) => { + test.setTimeout(extremelyLongTestTimeout); - await app.position.manage.withdrawCollateral(); + await app.page.goto('/ethereum/aave/v3/borrow/WSTETH-USDT#setup'); - await manageDebtOrCollateral({ - app, - forkId, - withdraw: { token: 'WSTETH', amount: '2' }, - payBack: { token: 'USDT', amount: '2000' }, - expectedCollateralDeposited: { - amount: '7.00', - token: 'WSTETH', - }, - expectedDebt: { amount: '2,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, - protocol: 'Aave V3', + await test.step('It should open a position', async () => { + // Pause to avoid flakiness + await app.page.waitForTimeout(2_000); + + await openPosition({ + metamask, + app, + forkId, + deposit: { token: 'WSTETH', amount: '7.5' }, + borrow: { token: 'USDT', amount: '3000' }, + }); }); - }); - test('It should Borrow and Deposit in a single tx on an existing Aave V3 Ethereum Borrow position @regression', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxx', + // Pause to avoid flakiness + await app.page.waitForTimeout(2_000); + + await test.step('It should Deposit and Borrow in a single tx', async () => { + await manageDebtOrCollateral({ + metamask, + app, + forkId, + allowanceNotNeeded: true, + deposit: { token: 'WSTETH', amount: '1.5' }, + borrow: { token: 'USDT', amount: '1000' }, + expectedCollateralDeposited: { + amount: '9.00', + token: 'WSTETH', + }, + expectedDebt: { amount: '4,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + }); }); - test.setTimeout(longTestTimeout); - - await app.position.manage.openManageOptions({ currentLabel: 'WSTETH' }); - await app.position.manage.select('Manage debt'); - - await manageDebtOrCollateral({ - app, - forkId, - allowanceNotNeeded: true, - borrow: { token: 'USDT', amount: '3000' }, - deposit: { token: 'WSTETH', amount: '3' }, - expectedCollateralDeposited: { - amount: '10.00', - token: 'WSTETH', - }, - expectedDebt: { amount: '5,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, - protocol: 'Aave V3', + // Pause to avoid flakiness + await app.page.waitForTimeout(2_000); + + await test.step('It should Withdraw and Pay back in a single tx', async () => { + await app.position.manage.withdrawCollateral(); + + await manageDebtOrCollateral({ + metamask, + app, + forkId, + withdraw: { token: 'WSTETH', amount: '2' }, + payBack: { token: 'USDT', amount: '2000' }, + expectedCollateralDeposited: { + amount: '7.00', + token: 'WSTETH', + }, + expectedDebt: { amount: '2,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + }); }); - }); - test('It should Pay back and Withdraw in a single tx on an existing Aave V3 Ethereum Borrow position @regression', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxx', + // Pause to avoid flakiness + await app.page.waitForTimeout(2_000); + + await test.step('It should Borrow and Deposit in a single tx', async () => { + await app.position.manage.openManageOptions({ currentLabel: 'WSTETH' }); + await app.position.manage.select('Manage debt'); + + await manageDebtOrCollateral({ + metamask, + app, + forkId, + allowanceNotNeeded: true, + borrow: { token: 'USDT', amount: '3000' }, + deposit: { token: 'WSTETH', amount: '3' }, + expectedCollateralDeposited: { + amount: '10.00', + token: 'WSTETH', + }, + expectedDebt: { amount: '5,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + }); }); - test.setTimeout(longTestTimeout); - - // Reload page to avoid random fails - await app.page.reload(); - - await app.position.manage.openManageOptions({ currentLabel: 'WSTETH' }); - await app.position.manage.select('Manage debt'); - await app.position.manage.payBackDebt(); - - await manageDebtOrCollateral({ - app, - forkId, - payBack: { token: 'USDT', amount: '4000' }, - withdraw: { token: 'WSTETH', amount: '1.5' }, - expectedCollateralDeposited: { - amount: '8.50', - token: 'WSTETH', - }, - expectedDebt: { amount: '1,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, - protocol: 'Aave V3', - allowanceNotNeeded: true, - }); - }); - - test('It should close an existent Aave V3 Borrow Ethereum position - Close to collateral token (WSTETH)', async () => { - test.info().annotations.push({ - type: 'Test case', - description: '12060', + // Pause to avoid flakiness + await app.page.waitForTimeout(2_000); + + await test.step('It should Pay back and Withdraw in a single tx', async () => { + // Reload page to avoid random fails + await app.page.reload(); + + await app.position.manage.openManageOptions({ currentLabel: 'WSTETH' }); + await app.position.manage.select('Manage debt'); + await app.position.manage.payBackDebt(); + + await manageDebtOrCollateral({ + metamask, + app, + forkId, + payBack: { token: 'USDT', amount: '4000' }, + withdraw: { token: 'WSTETH', amount: '1.5' }, + expectedCollateralDeposited: { + amount: '8.50', + token: 'WSTETH', + }, + expectedDebt: { amount: '1,[0-9]{3}.[0-9]{2}([0-9]{1,2})?', token: 'USDT' }, + protocol: 'Aave V3', + allowanceNotNeeded: true, + }); }); - test.setTimeout(longTestTimeout); - - // Pause and relaod to avoid random fails - await app.page.waitForTimeout(1000); - await app.page.reload(); - - await close({ - forkId, - app, - positionType: 'Borrow', - closeTo: 'collateral', - collateralToken: 'WSTETH', - debtToken: 'USDT', - tokenAmountAfterClosing: '[4-8].[0-9]{3,4}', + // Pause to avoid flakiness + await app.page.waitForTimeout(2_000); + + await test.step('It should close a position', async () => { + // Pause and relaod to avoid random fails + await app.page.waitForTimeout(1000); + await app.page.reload(); + + await close({ + metamask, + forkId, + app, + positionType: 'Borrow', + closeTo: 'collateral', + collateralToken: 'WSTETH', + debtToken: 'USDT', + tokenAmountAfterClosing: '[4-8].[0-9]{3,4}', + }); }); }); }); diff --git a/tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum1.spec.ts b/tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum1.spec.ts index a154675..e44630a 100644 --- a/tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum1.spec.ts +++ b/tests/withWallet/aaveV3/ethereum/earn/aaveV3EarnEthereum1.spec.ts @@ -1,193 +1,168 @@ -import { BrowserContext, test } from '@playwright/test'; -import { metamaskSetUp } from 'utils/setup'; -import { resetState } from '@synthetixio/synpress/commands/synpress'; -import * as tenderly from 'utils/tenderly'; +import { testWithSynpress } from '@synthetixio/synpress'; +import { metaMaskFixtures } from '@synthetixio/synpress/playwright'; +import basicSetup from 'utils/synpress/test-wallet-setup/basic.setup'; import { setup } from 'utils/setup'; -import { extremelyLongTestTimeout, positionTimeout, veryLongTestTimeout } from 'utils/config'; +import * as tenderly from 'utils/tenderly'; +import { extremelyLongTestTimeout, longTestTimeout, positionTimeout } from 'utils/config'; import { App } from 'src/app'; import { manageDebtOrCollateral, openPosition } from 'tests/sharedTestSteps/positionManagement'; import { reloadUntilCorrect } from 'utils/general'; -let context: BrowserContext; let app: App; let forkId: string; let walletAddress: string; -test.describe.configure({ mode: 'serial' }); +const test = testWithSynpress(metaMaskFixtures(basicSetup)); test.describe('Aave V3 Earn - Ethereum - Wallet connected', async () => { - test.afterAll(async () => { - await tenderly.deleteFork(forkId); - - await app.page.close(); + test.beforeEach(async ({ metamask, page }) => { + test.setTimeout(longTestTimeout); - await context.close(); + app = new App(page); + ({ forkId, walletAddress } = await setup({ metamask, app, network: 'mainnet' })); - await resetState(); + await tenderly.setTokenBalance({ + forkId, + network: 'mainnet', + walletAddress, + token: 'WSTETH', + balance: '50', + }); }); - test('It should open an Aave V3 Earn Ethereum position - WSTETH-ETH @regression', async () => { - test.info().annotations.push({ - type: 'Test case', - description: '11672', - }); + test.afterEach(async () => { + await tenderly.deleteFork(forkId); + await app.page.close(); + }); + test('It should open and manage an Aave V3 Earn Ethereum position - WSTETH-ETH @regression', async ({ + metamask, + }) => { test.setTimeout(extremelyLongTestTimeout); - await test.step('Test setup', async () => { - ({ context } = await metamaskSetUp({ network: 'mainnet' })); - let page = await context.newPage(); - app = new App(page); + await app.page.goto('/ethereum/aave/v3/earn/wsteth-eth#simulate'); - ({ forkId, walletAddress } = await setup({ app, network: 'mainnet' })); + await test.step('It should Open a position', async () => { + // Pause to avoid flakiness + await app.page.waitForTimeout(2_000); - await tenderly.setTokenBalance({ + await openPosition({ + metamask, + app, forkId, - walletAddress, - network: 'mainnet', - token: 'WSTETH', - balance: '50', + deposit: { token: 'ETH', amount: '10' }, }); }); - await app.position.openPage('/ethereum/aave/v3/earn/wsteth-eth#simulate'); + await test.step('It should Deposti extra collateral', async () => { + // Pause to avoid flakiness + await app.page.waitForTimeout(1_000); - await openPosition({ - app, - forkId, - deposit: { token: 'ETH', amount: '10' }, - }); - }); - - test('It should Deposit extra collateral on an existing Aave V3 Ethereum Earn position', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxxx', - }); - - test.setTimeout(veryLongTestTimeout); - - await app.position.overview.shouldHaveExposure({ - amount: '9.[0-9]{4}', - token: 'WSTETH', - timeout: positionTimeout, - }); - await app.position.overview.shouldHaveDebt({ - amount: '1.[0-9]{4}', - token: 'ETH', - }); - - await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); - await app.position.manage.select('Manage collateral'); - - await manageDebtOrCollateral({ - app, - forkId, - deposit: { token: 'WSTETH', amount: '20' }, - expectedCollateralExposure: { - amount: '29.[0-9]{2}', + await app.position.overview.shouldHaveExposure({ + amount: '9.[0-9]{4}', token: 'WSTETH', - }, - expectedDebt: { + timeout: positionTimeout, + }); + await app.position.overview.shouldHaveDebt({ amount: '1.[0-9]{4}', token: 'ETH', - }, - protocol: 'Aave V3', - }); - }); - - test('It should Withdraw from an existing Aave V3 Ethereum Earn position', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxxx', - }); - - test.setTimeout(veryLongTestTimeout); - - // Pause and Reload page to avoid random fails - await app.page.waitForTimeout(1_000); - await reloadUntilCorrect(app); + }); - await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); - await app.position.manage.select('Manage collateral'); - await app.position.manage.withdrawCollateral(); + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage collateral'); - await manageDebtOrCollateral({ - app, - forkId, - withdraw: { token: 'WSTETH', amount: '10' }, - expectedCollateralExposure: { - amount: '19.[0-9]{2}', - token: 'WSTETH', - }, - expectedDebt: { - amount: '1.[0-9]{2}', - token: 'ETH', - }, - protocol: 'Aave V3', + await manageDebtOrCollateral({ + metamask, + app, + forkId, + deposit: { token: 'WSTETH', amount: '20' }, + expectedCollateralExposure: { + amount: '29.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '1.[0-9]{4}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); }); - }); - test('It should Borrow from an existing Aave V3 Ethereum Earn position', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxx', - }); + await test.step('It should Withdraw collateral', async () => { + // Pause to avoid flakiness + await app.page.waitForTimeout(1_000); + await reloadUntilCorrect(app); - test.setTimeout(veryLongTestTimeout); + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage collateral'); + await app.position.manage.withdrawCollateral(); - // Pause and Reload page to avoid random fails - await app.page.waitForTimeout(1_000); - await reloadUntilCorrect(app); + await manageDebtOrCollateral({ + metamask, + app, + forkId, + withdraw: { token: 'WSTETH', amount: '10' }, + expectedCollateralExposure: { + amount: '19.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '1.[0-9]{2}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); + }); - await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); - await app.position.manage.select('Manage debt'); - await app.position.manage.withdrawDebt(); + await test.step('It should Borrow', async () => { + // Pause to avoid flakiness + await app.page.waitForTimeout(1_000); + await reloadUntilCorrect(app); - await manageDebtOrCollateral({ - app, - forkId, - borrow: { token: 'ETH', amount: '10' }, - expectedCollateralExposure: { - amount: '19.[0-9]{2}', - token: 'WSTETH', - }, - expectedDebt: { - amount: '11.[0-9]{2}', - token: 'ETH', - }, - protocol: 'Aave V3', - }); - }); + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage debt'); + await app.position.manage.withdrawDebt(); - test('It should Pay back on an existing Aave V3 Ethereum Earn position', async () => { - test.info().annotations.push({ - type: 'Test case', - description: 'xxxx', + await manageDebtOrCollateral({ + metamask, + app, + forkId, + borrow: { token: 'ETH', amount: '10' }, + expectedCollateralExposure: { + amount: '19.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '11.[0-9]{2}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); }); - test.setTimeout(veryLongTestTimeout); - - // Pause and Reload page to avoid random fails - await app.page.waitForTimeout(1_000); - await reloadUntilCorrect(app); + await test.step('It should Pay back', async () => { + // Pause to avoid flakiness + await app.page.waitForTimeout(1_000); + await reloadUntilCorrect(app); - await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); - await app.position.manage.select('Manage debt'); + await app.position.manage.openManageOptions({ currentLabel: 'Adjust' }); + await app.position.manage.select('Manage debt'); - await manageDebtOrCollateral({ - app, - forkId, - payBack: { token: 'ETH', amount: '5' }, - expectedCollateralExposure: { - amount: '19.[0-9]{2}', - token: 'WSTETH', - }, - expectedDebt: { - amount: '6.[0-9]{2}', - token: 'ETH', - }, - protocol: 'Aave V3', + await manageDebtOrCollateral({ + metamask, + app, + forkId, + payBack: { token: 'ETH', amount: '5' }, + expectedCollateralExposure: { + amount: '19.[0-9]{2}', + token: 'WSTETH', + }, + expectedDebt: { + amount: '6.[0-9]{2}', + token: 'ETH', + }, + protocol: 'Aave V3', + }); }); }); }); diff --git a/tests/withWallet/aaveV3/optimism/aavV3MultOptAutomations_1.spec.ts b/tests/withWallet/aaveV3/optimism-old/aavV3MultOptAutomations_1.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/optimism/aavV3MultOptAutomations_1.spec.ts rename to tests/withWallet/aaveV3/optimism-old/aavV3MultOptAutomations_1.spec.ts diff --git a/tests/withWallet/aaveV3/optimism/aavV3MultOptAutomations_2.spec.ts b/tests/withWallet/aaveV3/optimism-old/aavV3MultOptAutomations_2.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/optimism/aavV3MultOptAutomations_2.spec.ts rename to tests/withWallet/aaveV3/optimism-old/aavV3MultOptAutomations_2.spec.ts diff --git a/tests/withWallet/aaveV3/optimism/aaveV3BorrowOptimism1.spec.ts b/tests/withWallet/aaveV3/optimism-old/aaveV3BorrowOptimism1.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/optimism/aaveV3BorrowOptimism1.spec.ts rename to tests/withWallet/aaveV3/optimism-old/aaveV3BorrowOptimism1.spec.ts diff --git a/tests/withWallet/aaveV3/optimism/aaveV3BorrowOptimism2.spec.ts b/tests/withWallet/aaveV3/optimism-old/aaveV3BorrowOptimism2.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/optimism/aaveV3BorrowOptimism2.spec.ts rename to tests/withWallet/aaveV3/optimism-old/aaveV3BorrowOptimism2.spec.ts diff --git a/tests/withWallet/aaveV3/optimism/aaveV3MultiplyOptimism.spec.ts b/tests/withWallet/aaveV3/optimism-old/aaveV3MultiplyOptimism.spec.ts similarity index 100% rename from tests/withWallet/aaveV3/optimism/aaveV3MultiplyOptimism.spec.ts rename to tests/withWallet/aaveV3/optimism-old/aaveV3MultiplyOptimism.spec.ts