Skip to content

Commit

Permalink
Merge pull request #699 from OasisDEX/daily-improvements-9-jan
Browse files Browse the repository at this point in the history
Daily improvements - January - 9th
  • Loading branch information
juan-langa authored Jan 9, 2025
2 parents 936dfc6 + 2fae0c5 commit 939f1cd
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 183 deletions.
34 changes: 0 additions & 34 deletions tests/noWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts

This file was deleted.

67 changes: 0 additions & 67 deletions tests/noWallet/aaveV3/ethereum/aaveV3EarnEthereum.spec.ts

This file was deleted.

63 changes: 0 additions & 63 deletions tests/noWallet/aaveV3/ethereum/aaveV3MultiplyEthereum.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,6 @@ import { expect, test } from '#noWalletFixtures';
import { longTestTimeout } from 'utils/config';

test.describe('Aave v3 Multiply Ethereum', async () => {
// To be moved to WITH-WALLET tests
test.skip('It should validate "Deposit <collateral>" field - No enough collateral in wallet', async ({
app,
}) => {
test.info().annotations.push({
type: 'Test case',
description: '11614',
});

await app.page.goto('/ethereum/aave/v3/multiply/rethusdc#simulate');
await app.position.setup.deposit({ token: 'RETH', amount: '5' });
await app.position.setup.shouldHaveError(
'You cannot deposit more collateral than the amount in your wallet'
);
});

// To be moved to WITH-WALLET tests
test.skip('It should validate risk slider - Safe', async ({ app }) => {
test.info().annotations.push({
type: 'Test case',
description: '11615',
});

test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/aave/v3/multiply/ethdai#simulate');

// Depositing collateral too quickly after loading page returns wrong simulation results
await app.position.overview.waitForComponentToBeStable();
await app.position.setup.deposit({ token: 'ETH', amount: '5' });
await app.position.setup.shouldHaveWarning(
'At the chosen risk level, the price of ETH needs to move over ',
'% with respect to DAI for this position to be available for liquidation.',
"Aave's liquidations penalty is at least ",
'%.'
);
});

// To be moved to WITH-WALLET tests
test.skip('It should validate risk slider - Risky', async ({ app }) => {
test.info().annotations.push({
type: 'Test case',
description: '11616',
});

test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/aave/v3/multiply/ethdai#simulate');

// Depositing collateral too quickly after loading page returns wrong simulation results
await app.position.overview.waitForComponentToBeStable();
await app.position.setup.deposit({ token: 'ETH', amount: '5' });
// It takes some time for the slider to be editable
await app.position.setup.waitForSliderToBeEditable();
await app.position.setup.moveSlider({ value: 0.9 });
await app.position.setup.shouldHaveWarning(
'At the chosen risk level, if the price of ETH moves over ',
'% with respect to DAI this Multiply position could be liquidated. ',
"Aave's liquidations penalty is at least ",
'%.'
);
});

test('It should show if position automation is ON - Stop-Loss @regression', async ({ app }) => {
await app.position.openPage('/ethereum/aave/v3/multiply/RETH-DAI/1276#overview');

Expand Down
2 changes: 1 addition & 1 deletion tests/noWallet/maker/makerMultiply.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test.describe('Maker Multiply', async () => {
description: '11997',
});

await app.page.goto('/ethereum/maker/30640#overview');
await app.position.openPage('/ethereum/maker/30640#overview', { tab: 'Overview' });

await app.position.shouldHaveHeader('ETH-C Vault 30640');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test.describe('Open exisiting position pages - Aave v3 Arbitrum', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/arbitrum/aave/v3/multiply/RETH-ETH/540#overview');
await app.position.openPage('/arbitrum/aave/v3/multiply/RETH-ETH/540#overview');

await app.position.shouldHaveHeader('RETH/ETH yield multiple #540');
await app.position.overview.shouldHaveNetValue({
Expand All @@ -25,7 +25,7 @@ test.describe('Open exisiting position pages - Aave v3 Arbitrum', async () => {
description: '11993',
});

await app.page.goto('/arbitrum/aave/v3/borrow/eth-dai/1#overview');
await app.position.openPage('/arbitrum/aave/v3/borrow/eth-dai/1#overview');

await app.position.shouldHaveHeader('ETH/DAI Multiply #1');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down Expand Up @@ -60,7 +60,7 @@ test.describe('Open exisiting position pages - Aave v3 Arbitrum', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/arbitrum/aave/v3/multiply/DAI-WBTC/2#overview');
await app.position.openPage('/arbitrum/aave/v3/multiply/DAI-WBTC/2#overview');

await app.position.shouldHaveHeader('DAI/WBTC Multiply #2');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down
6 changes: 3 additions & 3 deletions tests/noWallet/openExistingPositionPages/AaveV3/base.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test.describe('Open exisiting position pages - Aave v3 Base', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/base/aave/v3/earn/CBETH-ETH/376#overview');
await app.position.openPage('/base/aave/v3/earn/CBETH-ETH/376#overview');

await app.position.shouldHaveHeader('CBETH/ETH yield multiple #376');
await app.position.overview.shouldHaveNetValue({
Expand All @@ -20,7 +20,7 @@ test.describe('Open exisiting position pages - Aave v3 Base', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/base/aave/v3/borrow/ETH-USDBC/441#overview');
await app.position.openPage('/base/aave/v3/borrow/ETH-USDBC/441#overview');

await app.position.shouldHaveHeader('ETH/USDBC Borrow #441');
await app.position.overview.shouldHaveLiquidationPrice({
Expand All @@ -36,7 +36,7 @@ test.describe('Open exisiting position pages - Aave v3 Base', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/base/aave/v3/multiply/ETH-USDC/435#overview');
await app.position.openPage('/base/aave/v3/multiply/ETH-USDC/435#overview');

await app.position.shouldHaveHeader('ETH/USDC Multiply #435');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test.describe('Open exisiting position pages - Aave v3 Ethereum', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/aave/v3/earn/WSTETH-ETH/193#overview');
await app.position.openPage('/ethereum/aave/v3/earn/WSTETH-ETH/193#overview');

await app.position.shouldHaveHeader('WSTETH/ETH yield multiple #193');
await app.position.overview.shouldHaveNetValue({
Expand All @@ -20,7 +20,7 @@ test.describe('Open exisiting position pages - Aave v3 Ethereum', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/aave/v3/borrow/CBETH-ETH/1277#overview');
await app.position.openPage('/ethereum/aave/v3/borrow/CBETH-ETH/1277#overview');

await app.position.shouldHaveHeader('CBETH/ETH Borrow #1277');
await app.position.overview.shouldHaveLiquidationPrice({
Expand All @@ -36,7 +36,7 @@ test.describe('Open exisiting position pages - Aave v3 Ethereum', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/aave/v3/multiply/ETH-USDC/1218#overview');
await app.position.openPage('/ethereum/aave/v3/multiply/ETH-USDC/1218#overview');

await app.position.shouldHaveHeader('ETH/USDC Multiply #1218');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test.describe('Open exisiting position pages - Aave v3 Optimism', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/optimism/aave/v3/multiply/USDC.E-SUSD/396#overview');
await app.position.openPage('/optimism/aave/v3/multiply/USDC.E-SUSD/396#overview');

await app.position.shouldHaveHeader('USDC.E/SUSD Multiply #396');
await app.position.overview.shouldHaveNetValue({
Expand All @@ -25,7 +25,7 @@ test.describe('Open exisiting position pages - Aave v3 Optimism', async () => {
description: '11994',
});

await app.page.goto('/optimism/aave/v3/borrow/dai-wbtc/4#overview');
await app.position.openPage('/optimism/aave/v3/borrow/dai-wbtc/4#overview');

await app.position.shouldHaveHeader('DAI/WBTC Borrow #4');
await app.position.overview.shouldHaveLiquidationPrice({
Expand All @@ -51,7 +51,7 @@ test.describe('Open exisiting position pages - Aave v3 Optimism', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/optimism/aave/v3/multiply/WBTC-USDC.E/19#overview');
await app.position.openPage('/optimism/aave/v3/multiply/WBTC-USDC.E/19#overview');

await app.position.shouldHaveHeader('WBTC/USDC.E Multiply #19');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down
8 changes: 5 additions & 3 deletions tests/noWallet/openExistingPositionPages/maker.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ test.describe('Open exisiting position pages - Maker', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/earn/dsr/0x10649c79428d718621821cf6299e91920284743f#overview');
await app.position.openPage('/earn/dsr/0x10649c79428d718621821cf6299e91920284743f#overview', {
tab: 'Overview',
});

await app.position.shouldHaveHeader('Dai Savings Rate');
await app.position.overview.shouldHaveNetValue({
Expand All @@ -23,7 +25,7 @@ test.describe('Open exisiting position pages - Maker', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/maker/30640#overview');
await app.position.openPage('/ethereum/maker/30640#overview', { tab: 'Overview' });

await app.position.shouldHaveHeader('ETH-C Vault 30640');
await app.position.overview.shouldHaveLiquidationPrice({
Expand All @@ -37,7 +39,7 @@ test.describe('Open exisiting position pages - Maker', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/maker/30639#overview');
await app.position.openPage('/ethereum/maker/30639#overview', { tab: 'Overview' });

await app.position.shouldHaveHeader('ETH-C Vault 30639');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down
6 changes: 3 additions & 3 deletions tests/noWallet/openExistingPositionPages/spark.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test.describe('Open exisiting position pages - Spark', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/spark/earn/WSTETH-ETH/1417#overview');
await app.position.openPage('/ethereum/spark/earn/WSTETH-ETH/1417#overview');

await app.position.shouldHaveHeader('WSTETH/ETH yield multiple #1417');
await app.position.overview.shouldHaveNetValue({
Expand All @@ -20,7 +20,7 @@ test.describe('Open exisiting position pages - Spark', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/spark/borrow/ETH-DAI/2397#overview');
await app.position.openPage('/ethereum/spark/borrow/ETH-DAI/2397#overview');

await app.position.shouldHaveHeader('ETH/DAI Borrow #2397');
await app.position.overview.shouldHaveLiquidationPrice({
Expand All @@ -35,7 +35,7 @@ test.describe('Open exisiting position pages - Spark', async () => {
}) => {
test.setTimeout(longTestTimeout);

await app.page.goto('/ethereum/spark/multiply/SDAI-ETH/1448#overview');
await app.position.openPage('/ethereum/spark/multiply/SDAI-ETH/1448#overview');

await app.position.shouldHaveHeader('SDAI/ETH Multiply #1448');
await app.position.overview.shouldHaveLiquidationPrice({
Expand Down

0 comments on commit 939f1cd

Please sign in to comment.