Skip to content

Commit

Permalink
Merge pull request #156 from OasisDEX/ajna-slipage-update
Browse files Browse the repository at this point in the history
Updating test data after slipagge update for Ajna and Morpho
  • Loading branch information
juan-langa authored Feb 8, 2024
2 parents 36bb0e8 + fc46aad commit 026148c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 62 deletions.
2 changes: 1 addition & 1 deletion tests/withWallet/aaveV3/base/aaveV3EarnBase.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ test.describe('Aave V3 Earn - Base - Wallet connected', async () => {
console.log('+++ Position ID: ', positionId);

await app.position.setup.goToPosition();
await app.position.manage.shouldBeVisible('Manage ');
await app.position.manage.shouldBeVisible('Manage Earn position');
});

test('It should adjust risk of an existent Aave V3 Earn Base position - Down @regression', async () => {
Expand Down
57 changes: 0 additions & 57 deletions tests/withWallet/aaveV3/base/aaveV3MultiplyBase.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,63 +210,6 @@ test.describe('Aave v3 Multiply - Base - Wallet connected', async () => {
await app.position.manage.shouldBeVisible('Manage ');
});

test.skip('It should set Auto-Buy on an Aave v3 Multiply Base position @regression', async () => {
test.info().annotations.push({
type: 'Test case',
description: '12463',
});

test.setTimeout(extremelyLongTestTimeout);

// ==================================================
// ==================================================

await test.step('Test setup', async () => {
({ context } = await metamaskSetUp({ network: 'base' }));
let page = await context.newPage();
app = new App(page);

({ forkId, walletAddress } = await setup({ app, network: 'base' }));
});

await tenderly.changeAccountOwner({
account: '0xf5922d700883214f689efe190a978ac51c50e6b1',
newOwner: walletAddress,
forkId,
});

await app.page.goto('/base/aave/v3/17#overview');
// ==================================================
// ==================================================

await app.position.openTab('Optimization');
await app.position.optimization.setupAutoBuy();

//
await app.pause();
//
await app.position.optimization.adjustAutoBuyTrigger({ value: 0.05 });
//
// await app.pause();
//
await app.position.optimization.setNoThreshold();
//
await app.pause();
//
await app.position.optimization.addAutoBuy();

// await app.pause();

// Automation setup randomly fails - Retry until it's set.
await expect(async () => {
await app.position.setup.confirmOrRetry();
await test.step('Metamask: ConfirmPermissionToSpend', async () => {
await metamask.confirmPermissionToSpend();
});
await app.position.setup.finishedShouldBeVisible();
}).toPass({ timeout: longTestTimeout });
});

test.skip('It should list an opened Aave v3 Multiply Base position in portfolio', async () => {
test.info().annotations.push({
type: 'Test case',
Expand Down
8 changes: 4 additions & 4 deletions tests/withWallet/ajna/base/ajnaMultiplyBase.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ test.describe('Ajna Base Multiply - Wallet connected', async () => {
current: '1.00',
future: '1(.[0-9]{1,2})?',
});
await app.position.setup.orderInformation.shouldHaveSlippageLimit('0.50');
await app.position.setup.orderInformation.shouldHaveSlippageLimit('0.05');
await app.position.setup.orderInformation.shouldHaveDebt({
token: 'ETH',
current: '0.00',
Expand Down Expand Up @@ -162,7 +162,7 @@ test.describe('Ajna Base Multiply - Wallet connected', async () => {
await app.page.goto('/base/ajna/multiply/ETH-USDC');
await app.position.setup.acknowlegeAjnaInfo();

await app.position.setup.deposit({ token: 'ETH', amount: '20' });
await app.position.setup.deposit({ token: 'ETH', amount: '15' });
await app.position.setup.createSmartDeFiAccount();

// Smart DeFi Acount creation randomly fails - Retry until it's created.
Expand Down Expand Up @@ -206,7 +206,7 @@ test.describe('Ajna Base Multiply - Wallet connected', async () => {
const initialLiqPrice = await app.position.manage.getLiquidationPrice();
const initialLoanToValue = await app.position.manage.getLoanToValue();

await app.position.setup.moveSlider({ protocol: 'Ajna', value: 0.6 });
await app.position.setup.moveSlider({ protocol: 'Ajna', value: 0.3 });

await app.position.manage.confirm();

Expand Down Expand Up @@ -243,7 +243,7 @@ test.describe('Ajna Base Multiply - Wallet connected', async () => {
const initialLiqPrice = await app.position.manage.getLiquidationPrice();
const initialLoanToValue = await app.position.manage.getLoanToValue();

await app.position.setup.moveSlider({ protocol: 'Ajna', value: 0.5 });
await app.position.setup.moveSlider({ protocol: 'Ajna', value: 0.15 });

await app.position.manage.confirm();

Expand Down

0 comments on commit 026148c

Please sign in to comment.