From 36a4304135a5c219ac381fb6b3b2cf0b34c7f3ed Mon Sep 17 00:00:00 2001 From: yivlad Date: Thu, 19 Dec 2024 18:11:12 +0100 Subject: [PATCH 1/2] Rewrite deposit to savings E2E tests --- .../deposit/SavingsDepositDialog.test-e2e.ts | 157 --------- .../savings/deposit/e2e/General.test-e2e.ts | 154 +++++++++ .../deposit/e2e/Validation.test-e2e.ts | 95 ++++++ .../e2e/mainnet/DepositDAI.test-e2e.ts | 313 +++++++++--------- .../e2e/mainnet/DepositUSDC.test-e2e.ts | 223 +++++++------ .../e2e/mainnet/DepositUSDS.test-e2e.ts | 128 +++---- .../deposit/e2e/mainnet/General.test-e2e.ts | 60 ---- .../e2e/mainnet/Validation.test-e2e.ts | 89 ----- 8 files changed, 580 insertions(+), 639 deletions(-) delete mode 100644 packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts create mode 100644 packages/app/src/features/dialogs/savings/deposit/e2e/General.test-e2e.ts create mode 100644 packages/app/src/features/dialogs/savings/deposit/e2e/Validation.test-e2e.ts delete mode 100644 packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/General.test-e2e.ts delete mode 100644 packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/Validation.test-e2e.ts diff --git a/packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts deleted file mode 100644 index 2b8993b94..000000000 --- a/packages/app/src/features/dialogs/savings/deposit/SavingsDepositDialog.test-e2e.ts +++ /dev/null @@ -1,157 +0,0 @@ -// import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' -// import { SavingsPageObject } from '@/pages/Savings.PageObject' -// import { GNOSIS_DEFAULT_BLOCK_NUMBER, DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' -// import { setupFork } from '@/test/e2e/forking/setupFork' -// import { setup } from '@/test/e2e/setup' -// import { test } from '@playwright/test' -// import { base, gnosis, mainnet } from 'viem/chains' -// import { SavingsDialogPageObject } from '../common/e2e/SavingsDialog.PageObject' - -// test.describe('Savings deposit dialog', () => { -// test.describe('Mainnet', () => { -// const fork = setupFork({ -// blockNumber: DEFAULT_BLOCK_NUMBER, -// chainId: mainnet.id, -// useTenderlyVnet: true, -// }) - -// let depositDialog: SavingsDialogPageObject -// let savingsPage: SavingsPageObject - -// test.beforeEach(async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// ETH: 1, -// DAI: 10_000, -// USDC: 10_000, -// }, -// }, -// }) - -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickStartSavingButtonAction() - -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// }) - -// test('can switch between tokens', async () => { -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) - -// await depositDialog.fillAmountAction(1000) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'DAI' }, -// { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sDAI' }, -// ]) - -// await depositDialog.selectAssetAction('USDC') -// await depositDialog.fillAmountAction(1000) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDC' }, -// { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sDAI' }, -// ]) - -// await depositDialog.selectAssetAction('DAI') -// await depositDialog.fillAmountAction(1000) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'DAI' }, -// { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sDAI' }, -// ]) -// }) - -// test('can select only supported assets', async () => { -// await depositDialog.openAssetSelectorAction() -// await depositDialog.expectAssetSelectorOptions(['DAI', 'USDC']) -// }) -// }) - -// test.describe('Gnosis', () => { -// const fork = setupFork({ blockNumber: GNOSIS_DEFAULT_BLOCK_NUMBER, chainId: gnosis.id, useTenderlyVnet: true }) -// let savingsPage: SavingsPageObject -// let depositDialog: SavingsDialogPageObject - -// test.beforeEach(async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// XDAI: 100, -// }, -// }, -// }) - -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickStartSavingButtonAction() - -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// }) - -// test('can select only supported assets', async () => { -// await depositDialog.openAssetSelectorAction() -// await depositDialog.expectAssetSelectorOptions(['XDAI']) -// }) -// }) - -// test.describe('Base', () => { -// const fork = setupFork({ chainId: base.id, blockNumber: 22143788n, useTenderlyVnet: true }) - -// let depositDialog: SavingsDialogPageObject -// let savingsPage: SavingsPageObject - -// test.beforeEach(async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// USDC: 1000, -// USDS: 10_000, -// }, -// }, -// }) - -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickStartSavingButtonAction() - -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// }) - -// test('can switch between tokens', async () => { -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) - -// await depositDialog.fillAmountAction(1000) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDS' }, -// { type: 'depositToSavings', asset: 'USDS', savingsAsset: 'sUSDS' }, -// ]) - -// await depositDialog.selectAssetAction('USDC') -// await depositDialog.fillAmountAction(1000) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDC' }, -// { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sUSDS' }, -// ]) - -// await depositDialog.selectAssetAction('USDS') -// await depositDialog.fillAmountAction(1000) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDS' }, -// { type: 'depositToSavings', asset: 'USDS', savingsAsset: 'sUSDS' }, -// ]) -// }) - -// test('can select only supported assets', async () => { -// await depositDialog.openAssetSelectorAction() -// await depositDialog.expectAssetSelectorOptions(['USDC', 'USDS']) -// }) -// }) -// }) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/General.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/General.test-e2e.ts new file mode 100644 index 000000000..262bdd9d4 --- /dev/null +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/General.test-e2e.ts @@ -0,0 +1,154 @@ +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { BASE_DEFAULT_BLOCK_NUMBER, DEFAULT_BLOCK_NUMBER, GNOSIS_DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { test } from '@playwright/test' +import { base, gnosis, mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../common/e2e/SavingsDialog.PageObject' + +test.describe('Savings deposit dialog', () => { + test.describe('Mainnet', () => { + let depositDialog: SavingsDialogPageObject + let savingsPage: SavingsPageObject + + test.beforeEach(async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: mainnet.id, + blockNumber: DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + ETH: 1, + DAI: 10_000, + USDC: 10_000, + }, + }, + }) + + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickStartSavingButtonAction() + + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + }) + + test('can switch between tokens', async () => { + await depositDialog.fillAmountAction(1000) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'DAI' }, + { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sUSDS' }, + ]) + + await depositDialog.selectAssetAction('USDC') + await depositDialog.fillAmountAction(1000) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'USDC' }, + { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sUSDS' }, + ]) + + await depositDialog.selectAssetAction('DAI') + await depositDialog.fillAmountAction(1000) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'DAI' }, + { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sUSDS' }, + ]) + }) + + test('can select only supported assets', async () => { + await depositDialog.openAssetSelectorAction() + await depositDialog.expectAssetSelectorOptions(['DAI', 'USDC', 'USDS']) + }) + }) + + test.describe('Gnosis', () => { + let savingsPage: SavingsPageObject + let depositDialog: SavingsDialogPageObject + + test.beforeEach(async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: gnosis.id, + blockNumber: GNOSIS_DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + XDAI: 100, + }, + }, + }) + + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickStartSavingButtonAction() + + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + }) + + test('can select only supported assets', async () => { + await depositDialog.openAssetSelectorAction() + await depositDialog.expectAssetSelectorOptions(['XDAI']) + }) + }) + + test.describe('Base', () => { + let depositDialog: SavingsDialogPageObject + let savingsPage: SavingsPageObject + + test.beforeEach(async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: base.id, + blockNumber: BASE_DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + USDC: 1000, + USDS: 10_000, + }, + }, + }) + + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickStartSavingButtonAction() + + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + }) + + test('can switch between tokens', async () => { + await depositDialog.fillAmountAction(1000) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'USDS' }, + { type: 'depositToSavings', asset: 'USDS', savingsAsset: 'sUSDS' }, + ]) + + await depositDialog.selectAssetAction('USDC') + await depositDialog.fillAmountAction(1000) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'USDC' }, + { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sUSDS' }, + ]) + + await depositDialog.selectAssetAction('USDS') + await depositDialog.fillAmountAction(1000) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'USDS' }, + { type: 'depositToSavings', asset: 'USDS', savingsAsset: 'sUSDS' }, + ]) + }) + + test('can select only supported assets', async () => { + await depositDialog.openAssetSelectorAction() + await depositDialog.expectAssetSelectorOptions(['USDC', 'USDS']) + }) + }) +}) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/Validation.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/Validation.test-e2e.ts new file mode 100644 index 000000000..5e6a00166 --- /dev/null +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/Validation.test-e2e.ts @@ -0,0 +1,95 @@ +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { test } from '@playwright/test' +import { mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../common/e2e/SavingsDialog.PageObject' +import { depositValidationIssueToMessage } from '../logic/validation' + +test.describe('Validation', () => { + let savingsPage: SavingsPageObject + let depositDialog: SavingsDialogPageObject + + test.describe('Input value exceeds balance', () => { + test.beforeEach(async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: mainnet.id, + blockNumber: DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + ETH: 1, + USDS: 100, + }, + }, + }) + + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickDepositButtonAction('USDS') + + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + await depositDialog.fillAmountAction(10_000) + }) + + test('displays validation error', async () => { + await depositDialog.expectAssetInputError(depositValidationIssueToMessage['exceeds-balance']) + }) + + test('actions are disabled', async () => { + await depositDialog.actionsContainer.expectDisabledActions([ + { type: 'approve', asset: 'USDS' }, + { type: 'depositToSavings', asset: 'USDS', savingsAsset: 'sUSDS' }, + ]) + }) + + test('displays sensible tx overview', async () => { + await depositDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '12.50%', + description: 'Earn ~1,250.00 USDS/year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 USDS', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '9,830.34 sUSDS', + tokenUsdValue: '$10,000.00', + }, + ], + outcome: '9,830.34 sUSDS', + outcomeUsd: '$10,000.00', + }) + }) + }) + + test('displays validation error for dirty input with 0 value', async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: mainnet.id, + blockNumber: DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + ETH: 1, + USDS: 100, + }, + }, + }) + + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickDepositButtonAction('USDS') + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + + await depositDialog.fillAmountAction(10) + await depositDialog.fillAmountAction(0) + + await depositDialog.expectAssetInputError(depositValidationIssueToMessage['value-not-positive']) + }) +}) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts index 17dfb8af3..42d30ee67 100644 --- a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts @@ -1,157 +1,156 @@ -// import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' -// import { SavingsPageObject } from '@/pages/Savings.PageObject' -// import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' -// import { setupFork } from '@/test/e2e/forking/setupFork' -// import { setup } from '@/test/e2e/setup' -// import { test } from '@playwright/test' -// import { mainnet } from 'viem/chains' -// import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' - -// test.describe('Deposit DAI', () => { -// const fork = setupFork({ blockNumber: DEFAULT_BLOCK_NUMBER, chainId: mainnet.id, useTenderlyVnet: true }) -// let savingsPage: SavingsPageObject -// let depositDialog: SavingsDialogPageObject - -// test.beforeEach(async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// ETH: 1, -// DAI: 10_000, -// }, -// }, -// }) - -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickDepositButtonAction('DAI') - -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// await depositDialog.fillAmountAction(10_000) -// }) - -// test.describe('To sUSDS', () => { -// test('uses PSM actions native deposit', async () => { -// await depositDialog.actionsContainer.expectActions([ -// { type: 'approve', asset: 'DAI' }, -// { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sUSDS' }, -// ]) -// }) - -// test('displays transaction overview', async () => { -// await depositDialog.expectNativeRouteTransactionOverview({ -// apy: { -// value: '6.25%', -// description: 'Earn ~625.00 USDS/year', -// }, -// routeItems: [ -// { -// tokenAmount: '10,000.00 DAI', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '10,000.00 USDS', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '9,999.77 sUSDS', -// tokenUsdValue: '$10,000.00', -// }, -// ], -// outcome: '9,999.77 sUSDS', -// outcomeUsd: '$10,000.00', -// }) -// }) - -// test('executes deposit', async () => { -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) -// await actionsContainer.acceptAllActionsAction(2) - -// await depositDialog.expectSuccessPage() -// await depositDialog.clickBackToSavingsButton() - -// await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,999.77 sUSDS', estimatedUsdsValue: '10,000' }) -// await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') -// }) -// }) - -// test.describe('To sDAI', () => { -// test.beforeEach(async () => { -// await depositDialog.clickUpgradeSwitch() -// }) - -// test('uses PSM actions native deposit', async () => { -// await depositDialog.actionsContainer.expectActions([ -// { type: 'approve', asset: 'DAI' }, -// { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sDAI' }, -// ]) -// }) - -// test('displays transaction overview', async () => { -// await depositDialog.expectNativeRouteTransactionOverview({ -// apy: { -// value: '6.00%', -// description: 'Earn ~600.00 DAI/year', -// }, -// routeItems: [ -// { -// tokenAmount: '10,000.00 DAI', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '9,020.46 sDAI', -// tokenUsdValue: '$10,000.00', -// }, -// ], -// outcome: '9,020.46 sDAI', -// outcomeUsd: '$10,000.00', -// }) -// }) - -// test('executes deposit', async () => { -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) -// await actionsContainer.acceptAllActionsAction(2) - -// await depositDialog.expectSuccessPage() -// await depositDialog.clickBackToSavingsButton() - -// await savingsPage.expectSavingsDaiBalance({ sdaiBalance: '9,020.46 sDAI', estimatedDaiValue: '10,000' }) -// await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') -// }) -// }) - -// test('executes sDai deposit after switching from already approved sUsds', async () => { -// // accepting only approve -// await depositDialog.actionsContainer.acceptAllActionsAction(1) -// await depositDialog.actionsContainer.expectEnabledActionAtIndex(1) -// // switching to sDai deposit when already approved sUsds -// await depositDialog.clickUpgradeSwitch() -// // actions should reset and new approval is required -// await depositDialog.actionsContainer.acceptAllActionsAction(2) - -// await depositDialog.expectSuccessPage() -// await depositDialog.clickBackToSavingsButton() - -// await savingsPage.expectSavingsDaiBalance({ sdaiBalance: '9,020.46 sDAI', estimatedDaiValue: '10,000' }) -// await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') -// }) - -// test('executes sUsds deposit after switching from already approved sUsds and back', async () => { -// // accepting only approve -// await depositDialog.actionsContainer.acceptAllActionsAction(1) -// await depositDialog.actionsContainer.expectEnabledActionAtIndex(1) -// // switching to sDai deposit and back to sUsds -// await depositDialog.clickUpgradeSwitch() -// await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) -// await depositDialog.clickUpgradeSwitch() -// // approval should be already successful, only deposit needed -// await depositDialog.actionsContainer.acceptActionAtIndex(1) - -// await depositDialog.expectSuccessPage() -// await depositDialog.clickBackToSavingsButton() - -// await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,999.77 sUSDS', estimatedUsdsValue: '10,000' }) -// await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') -// }) -// }) +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { test } from '@playwright/test' +import { mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' + +test.describe('Deposit DAI', () => { + let savingsPage: SavingsPageObject + let depositDialog: SavingsDialogPageObject + + test.beforeEach(async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: mainnet.id, + blockNumber: DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + ETH: 1, + DAI: 10_000, + }, + }, + }) + + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickDepositButtonAction('DAI') + + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + await depositDialog.fillAmountAction(10_000) + }) + + test.describe('To sUSDS', () => { + test('uses PSM actions native deposit', async () => { + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'DAI' }, + { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sUSDS' }, + ]) + }) + + test('displays transaction overview', async () => { + await depositDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '12.50%', + description: 'Earn ~1,250.00 USDS/year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 DAI', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '10,000.00 USDS', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '9,830.34 sUSDS', + tokenUsdValue: '$10,000.00', + }, + ], + outcome: '9,830.34 sUSDS', + outcomeUsd: '$10,000.00', + }) + }) + + test('executes deposit', async () => { + await depositDialog.actionsContainer.acceptAllActionsAction(2) + + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() + + await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,830.34 sUSDS', estimatedUsdsValue: '10,000' }) + await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') + }) + }) + + test.describe('To sDAI', () => { + test.beforeEach(async () => { + await depositDialog.clickUpgradeSwitch() + }) + + test('uses PSM actions native deposit', async () => { + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'DAI' }, + { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sDAI' }, + ]) + }) + + test('displays transaction overview', async () => { + await depositDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '6.00%', + description: 'Earn ~600.00 DAI/year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 DAI', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '8,884.16 sDAI', + tokenUsdValue: '$10,000.00', + }, + ], + outcome: '8,884.16 sDAI', + outcomeUsd: '$10,000.00', + }) + }) + + test('executes deposit', async () => { + await depositDialog.actionsContainer.acceptAllActionsAction(2) + + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() + + await savingsPage.expectSavingsDaiBalance({ sdaiBalance: '8,884.16 sDAI', estimatedDaiValue: '10,000' }) + await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') + }) + }) + + test('executes sDai deposit after switching from already approved sUsds', async () => { + // accepting only approve + await depositDialog.actionsContainer.acceptAllActionsAction(1) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(1) + // switching to sDai deposit when already approved sUsds + await depositDialog.clickUpgradeSwitch() + // actions should reset and new approval is required + await depositDialog.actionsContainer.acceptAllActionsAction(2) + + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() + + await savingsPage.expectSavingsDaiBalance({ sdaiBalance: '8,884.16 sDAI', estimatedDaiValue: '10,000' }) + await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') + }) + + test('executes sUsds deposit after switching from already approved sUsds and back', async () => { + // accepting only approve + await depositDialog.actionsContainer.acceptAllActionsAction(1) + await depositDialog.actionsContainer.expectEnabledActionAtIndex(1) + // switching to sDai deposit and back to sUsds + await depositDialog.clickUpgradeSwitch() + await depositDialog.actionsContainer.expectEnabledActionAtIndex(0) + await depositDialog.clickUpgradeSwitch() + // approval should be already successful, only deposit needed + await depositDialog.actionsContainer.acceptActionAtIndex(1) + + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() + + await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,830.34 sUSDS', estimatedUsdsValue: '10,000' }) + await savingsPage.expectStablecoinsInWalletAssetBalance('DAI', '-') + }) +}) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDC.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDC.test-e2e.ts index 10f44f77f..d5f627c79 100644 --- a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDC.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDC.test-e2e.ts @@ -1,127 +1,126 @@ -// import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' -// import { SavingsPageObject } from '@/pages/Savings.PageObject' -// import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' -// import { setupFork } from '@/test/e2e/forking/setupFork' -// import { setup } from '@/test/e2e/setup' -// import { test } from '@playwright/test' -// import { mainnet } from 'viem/chains' -// import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { test } from '@playwright/test' +import { mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' -// test.describe('Deposit USDC', () => { -// const fork = setupFork({ blockNumber: DEFAULT_BLOCK_NUMBER, chainId: mainnet.id, useTenderlyVnet: true }) -// let savingsPage: SavingsPageObject -// let depositDialog: SavingsDialogPageObject +test.describe('Deposit USDC', () => { + let savingsPage: SavingsPageObject + let depositDialog: SavingsDialogPageObject -// test.beforeEach(async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// ETH: 1, -// USDC: 10_000, -// }, -// }, -// }) + test.beforeEach(async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: mainnet.id, + blockNumber: DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + ETH: 1, + USDC: 10_000, + }, + }, + }) -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickDepositButtonAction('USDC') + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickDepositButtonAction('USDC') -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// await depositDialog.fillAmountAction(10_000) -// }) + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + await depositDialog.fillAmountAction(10_000) + }) -// test.describe('To sUSDS', () => { -// test('uses PSM actions native deposit', async () => { -// await depositDialog.actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDC' }, -// { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sUSDS' }, -// ]) -// }) + test.describe('To sUSDS', () => { + test('uses PSM actions native deposit', async () => { + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'USDC' }, + { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sUSDS' }, + ]) + }) -// test('displays transaction overview', async () => { -// await depositDialog.expectNativeRouteTransactionOverview({ -// apy: { -// value: '6.25%', -// description: 'Earn ~625.00 USDS/year', -// }, -// routeItems: [ -// { -// tokenAmount: '10,000.00 USDC', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '10,000.00 USDS', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '9,999.77 sUSDS', -// tokenUsdValue: '$10,000.00', -// }, -// ], -// outcome: '9,999.77 sUSDS', -// outcomeUsd: '$10,000.00', -// }) -// }) + test('displays transaction overview', async () => { + await depositDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '12.50%', + description: 'Earn ~1,250.00 USDS/year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 USDC', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '10,000.00 USDS', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '9,830.34 sUSDS', + tokenUsdValue: '$10,000.00', + }, + ], + outcome: '9,830.34 sUSDS', + outcomeUsd: '$10,000.00', + }) + }) -// test('executes deposit', async () => { -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) -// await actionsContainer.acceptAllActionsAction(2) + test('executes deposit', async () => { + await depositDialog.actionsContainer.acceptAllActionsAction(2) -// await depositDialog.expectSuccessPage() -// await depositDialog.clickBackToSavingsButton() + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() -// await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,999.77 sUSDS', estimatedUsdsValue: '10,000' }) -// await savingsPage.expectStablecoinsInWalletAssetBalance('USDC', '-') -// }) -// }) + await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,830.34 sUSDS', estimatedUsdsValue: '10,000' }) + await savingsPage.expectStablecoinsInWalletAssetBalance('USDC', '-') + }) + }) -// test.describe('To sDAI', () => { -// test.beforeEach(async () => { -// await depositDialog.clickUpgradeSwitch() -// }) + test.describe('To sDAI', () => { + test.beforeEach(async () => { + await depositDialog.clickUpgradeSwitch() + }) -// test('uses PSM actions native deposit', async () => { -// await depositDialog.actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDC' }, -// { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sDAI' }, -// ]) -// }) + test('uses PSM actions native deposit', async () => { + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'USDC' }, + { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sDAI' }, + ]) + }) -// test('displays transaction overview', async () => { -// await depositDialog.expectNativeRouteTransactionOverview({ -// apy: { -// value: '6.00%', -// description: 'Earn ~600.00 DAI/year', -// }, -// routeItems: [ -// { -// tokenAmount: '10,000.00 USDC', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '10,000.00 DAI', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '9,020.46 sDAI', -// tokenUsdValue: '$10,000.00', -// }, -// ], -// outcome: '9,020.46 sDAI', -// outcomeUsd: '$10,000.00', -// }) -// }) + test('displays transaction overview', async () => { + await depositDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '11.50%', + description: 'Earn ~1,150.00 DAI/year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 USDC', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '10,000.00 DAI', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '8,884.16 sDAI', + tokenUsdValue: '$10,000.00', + }, + ], + outcome: '8,884.16 sDAI', + outcomeUsd: '$10,000.00', + }) + }) -// test('executes deposit', async () => { -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) -// await actionsContainer.acceptAllActionsAction(2) + test('executes deposit', async () => { + await depositDialog.actionsContainer.acceptAllActionsAction(2) -// await depositDialog.expectSuccessPage() -// await depositDialog.clickBackToSavingsButton() + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() -// await savingsPage.expectSavingsDaiBalance({ sdaiBalance: '9,020.46 sDAI', estimatedDaiValue: '10,000' }) -// await savingsPage.expectStablecoinsInWalletAssetBalance('USDC', '-') -// }) -// }) -// }) + await savingsPage.expectSavingsDaiBalance({ sdaiBalance: '8,884.16 sDAI', estimatedDaiValue: '10,000' }) + await savingsPage.expectStablecoinsInWalletAssetBalance('USDC', '-') + }) + }) +}) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDS.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDS.test-e2e.ts index e5d6f7a63..46680e5ec 100644 --- a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDS.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositUSDS.test-e2e.ts @@ -1,74 +1,74 @@ -// import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' -// import { SavingsPageObject } from '@/pages/Savings.PageObject' -// import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' -// import { setupFork } from '@/test/e2e/forking/setupFork' -// import { setup } from '@/test/e2e/setup' -// import { test } from '@playwright/test' -// import { mainnet } from 'viem/chains' -// import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' +import { SavingsPageObject } from '@/pages/Savings.PageObject' +import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' +import { setup } from '@/test/e2e/setup' +import { test } from '@playwright/test' +import { mainnet } from 'viem/chains' +import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' -// test.describe('Deposit USDS', () => { -// const fork = setupFork({ blockNumber: DEFAULT_BLOCK_NUMBER, chainId: mainnet.id, useTenderlyVnet: true }) -// let savingsPage: SavingsPageObject -// let depositDialog: SavingsDialogPageObject +test.describe('Deposit USDS', () => { + let savingsPage: SavingsPageObject + let depositDialog: SavingsDialogPageObject -// test.beforeEach(async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// ETH: 1, -// USDS: 10_000, -// }, -// }, -// }) + test.beforeEach(async ({ page }) => { + const testContext = await setup(page, { + blockchain: { + chainId: mainnet.id, + blockNumber: DEFAULT_BLOCK_NUMBER, + }, + initialPage: 'savings', + account: { + type: 'connected-random', + assetBalances: { + ETH: 1, + USDS: 10_000, + }, + }, + }) -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickDepositButtonAction('USDS') + savingsPage = new SavingsPageObject(testContext) + await savingsPage.clickDepositButtonAction('USDS') -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// await depositDialog.fillAmountAction(10_000) -// }) + depositDialog = new SavingsDialogPageObject({ testContext, type: 'deposit' }) + await depositDialog.fillAmountAction(10_000) + }) -// test('uses native sUSDS deposit', async () => { -// await depositDialog.actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDS' }, -// { type: 'depositToSavings', asset: 'USDS', savingsAsset: 'sUSDS' }, -// ]) -// }) + test('uses native sUSDS deposit', async () => { + await depositDialog.actionsContainer.expectActions([ + { type: 'approve', asset: 'USDS' }, + { type: 'depositToSavings', asset: 'USDS', savingsAsset: 'sUSDS' }, + ]) + }) -// test('displays transaction overview', async () => { -// await depositDialog.expectNativeRouteTransactionOverview({ -// apy: { -// value: '6.25%', -// description: 'Earn ~625.00 USDS/year', -// }, -// routeItems: [ -// { -// tokenAmount: '10,000.00 USDS', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '9,999.77 sUSDS', -// tokenUsdValue: '$10,000.00', -// }, -// ], -// outcome: '9,999.77 sUSDS', -// outcomeUsd: '$10,000.00', -// }) + test('displays transaction overview', async () => { + await depositDialog.expectNativeRouteTransactionOverview({ + apy: { + value: '12.50%', + description: 'Earn ~1,250.00 USDS/year', + }, + routeItems: [ + { + tokenAmount: '10,000.00 USDS', + tokenUsdValue: '$10,000.00', + }, + { + tokenAmount: '9,830.34 sUSDS', + tokenUsdValue: '$10,000.00', + }, + ], + outcome: '9,830.34 sUSDS', + outcomeUsd: '$10,000.00', + }) -// await depositDialog.expectUpgradeSwitchToBeHidden() -// }) + await depositDialog.expectUpgradeSwitchToBeHidden() + }) -// test('executes deposit', async () => { -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) -// await actionsContainer.acceptAllActionsAction(2, fork) + test('executes deposit', async () => { + await depositDialog.actionsContainer.acceptAllActionsAction(2) -// await depositDialog.expectSuccessPage() -// await depositDialog.clickBackToSavingsButton() + await depositDialog.expectSuccessPage() + await depositDialog.clickBackToSavingsButton() -// await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,999.77 sUSDS', estimatedUsdsValue: '10,000' }) -// await savingsPage.expectStablecoinsInWalletAssetBalance('USDS', '-') -// }) -// }) + await savingsPage.expectSavingsUsdsBalance({ susdsBalance: '9,830.34 sUSDS', estimatedUsdsValue: '10,000' }) + await savingsPage.expectStablecoinsInWalletAssetBalance('USDS', '-') + }) +}) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/General.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/General.test-e2e.ts deleted file mode 100644 index cb111a865..000000000 --- a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/General.test-e2e.ts +++ /dev/null @@ -1,60 +0,0 @@ -// import { ActionsPageObject } from '@/features/actions/ActionsContainer.PageObject' -// import { SavingsPageObject } from '@/pages/Savings.PageObject' -// import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' -// import { setupFork } from '@/test/e2e/forking/setupFork' -// import { setup } from '@/test/e2e/setup' -// import { test } from '@playwright/test' -// import { mainnet } from 'viem/chains' -// import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' - -// test.describe('General dialog behavior', () => { -// const fork = setupFork({ -// blockNumber: DEFAULT_BLOCK_NUMBER, -// chainId: mainnet.id, -// useTenderlyVnet: true, -// }) - -// test('can switch between tokens', async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// ETH: 1, -// DAI: 100, -// USDC: 100, -// }, -// }, -// }) - -// const savingsPage = new SavingsPageObject(page) - -// await savingsPage.clickDepositButtonAction('DAI') - -// const depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// const actionsContainer = new ActionsPageObject(depositDialog.locatePanelByHeader('Actions')) - -// await depositDialog.fillAmountAction(100) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'DAI' }, -// { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sDAI' }, -// ]) - -// await depositDialog.selectAssetAction('USDC') -// await depositDialog.fillAmountAction(100) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'USDC' }, -// { type: 'depositToSavings', asset: 'USDC', savingsAsset: 'sDAI' }, -// ]) - -// await depositDialog.selectAssetAction('DAI') -// await depositDialog.fillAmountAction(100) -// await actionsContainer.expectEnabledActionAtIndex(0) -// await actionsContainer.expectActions([ -// { type: 'approve', asset: 'DAI' }, -// { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sDAI' }, -// ]) -// }) -// }) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/Validation.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/Validation.test-e2e.ts deleted file mode 100644 index bb6a23a62..000000000 --- a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/Validation.test-e2e.ts +++ /dev/null @@ -1,89 +0,0 @@ -// import { SavingsPageObject } from '@/pages/Savings.PageObject' -// import { DEFAULT_BLOCK_NUMBER } from '@/test/e2e/constants' -// import { setupFork } from '@/test/e2e/forking/setupFork' -// import { setup } from '@/test/e2e/setup' -// import { test } from '@playwright/test' -// import { mainnet } from 'viem/chains' -// import { SavingsDialogPageObject } from '../../../common/e2e/SavingsDialog.PageObject' -// import { depositValidationIssueToMessage } from '../../logic/validation' - -// test.describe('Validation', () => { -// const fork = setupFork({ blockNumber: DEFAULT_BLOCK_NUMBER, chainId: mainnet.id }) -// let savingsPage: SavingsPageObject -// let depositDialog: SavingsDialogPageObject - -// test.describe('Input value exceeds balance', () => { -// test.beforeEach(async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// ETH: 1, -// DAI: 100, -// }, -// }, -// }) - -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickDepositButtonAction('DAI') - -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) -// await depositDialog.fillAmountAction(10_000) -// }) - -// test('displays validation error', async () => { -// await depositDialog.expectAssetInputError(depositValidationIssueToMessage['exceeds-balance']) -// }) - -// test('actions are disabled', async () => { -// await depositDialog.actionsContainer.expectDisabledActions([ -// { type: 'approve', asset: 'DAI' }, -// { type: 'depositToSavings', asset: 'DAI', savingsAsset: 'sDAI' }, -// ]) -// }) - -// test('displays sensible tx overview', async () => { -// await depositDialog.expectNativeRouteTransactionOverview({ -// apy: { -// value: '5.00%', -// description: 'Earn ~500.00 DAI/year', -// }, -// routeItems: [ -// { -// tokenAmount: '10,000.00 DAI', -// tokenUsdValue: '$10,000.00', -// }, -// { -// tokenAmount: '9,332.66 sDAI', -// tokenUsdValue: '$10,000.00', -// }, -// ], -// outcome: '9,332.66 sDAI', -// outcomeUsd: '$10,000.00', -// }) -// }) -// }) - -// test('displays validation error for dirty input with 0 value', async ({ page }) => { -// await setup(page, fork, { -// initialPage: 'savings', -// account: { -// type: 'connected-random', -// assetBalances: { -// ETH: 1, -// DAI: 100, -// }, -// }, -// }) - -// savingsPage = new SavingsPageObject(page) -// await savingsPage.clickDepositButtonAction('DAI') -// depositDialog = new SavingsDialogPageObject({ page, type: 'deposit' }) - -// await depositDialog.fillAmountAction(10) -// await depositDialog.fillAmountAction(0) - -// await depositDialog.expectAssetInputError(depositValidationIssueToMessage['value-not-positive']) -// }) -// }) From 12dfa069545cc259db5caf62901881d53455db9d Mon Sep 17 00:00:00 2001 From: yivlad Date: Thu, 19 Dec 2024 18:25:26 +0100 Subject: [PATCH 2/2] Update DSR --- .../savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts index 42d30ee67..edcff50d1 100644 --- a/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts +++ b/packages/app/src/features/dialogs/savings/deposit/e2e/mainnet/DepositDAI.test-e2e.ts @@ -91,8 +91,8 @@ test.describe('Deposit DAI', () => { test('displays transaction overview', async () => { await depositDialog.expectNativeRouteTransactionOverview({ apy: { - value: '6.00%', - description: 'Earn ~600.00 DAI/year', + value: '11.50%', + description: 'Earn ~1,150.00 DAI/year', }, routeItems: [ {