-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #577 from OasisDEX/daily-improvements-18-oct-3
Daily improvements 18 oct 3
- Loading branch information
Showing
10 changed files
with
308 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
tests/noWallet/aaveV3/optimism/aaveV3BorrowOptimism.spec.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
tests/noWallet/openExistingPositionPages/AaveV3/base.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import { test } from '#noWalletFixtures'; | ||
import { longTestTimeout } from 'utils/config'; | ||
|
||
test.describe('Open exisiting position pages - Aave v3 Base', async () => { | ||
test('It should open an existing Aave V3 Base Earn yield loop CBETH/ETH position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/base/aave/v3/earn/CBETH-ETH/376#overview'); | ||
|
||
await app.position.shouldHaveHeader('CBETH/ETH yield multiple #376'); | ||
await app.position.overview.shouldHaveNetValue({ | ||
value: '[0-9].[0-9]{2}', | ||
}); | ||
}); | ||
|
||
test('It should open an existing Aave V3 Base Borrow ETH/USDBC position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/base/aave/v3/borrow/ETH-USDBC/441#overview'); | ||
|
||
await app.position.shouldHaveHeader('ETH/USDBC Borrow #441'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '0.00', | ||
token: 'ETH/USDBC', | ||
}); | ||
await app.position.overview.shouldHaveLoanToValue('0.00'); | ||
}); | ||
|
||
test('It should open an existing Aave V3 Base Multiply ETH/USDC position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/base/aave/v3/multiply/ETH-USDC/435#overview'); | ||
|
||
await app.position.shouldHaveHeader('ETH/USDC Multiply #435'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '([0-9],)[0-9]{2,3}.[0-9]{2}', | ||
token: 'ETH/USDC', | ||
}); | ||
await app.position.overview.shouldHaveLoanToValue('[0-9]{2}.[0-9]{2}'); | ||
}); | ||
}); |
66 changes: 66 additions & 0 deletions
66
tests/noWallet/openExistingPositionPages/AaveV3/ethereum.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { test } from '#noWalletFixtures'; | ||
import { longTestTimeout } from 'utils/config'; | ||
|
||
test.describe('Open exisiting position pages - Aave v3 Ethereum', async () => { | ||
test('It should open an existing Aave V3 Ethereum Earn yield multiple WSTETH/ETH position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/ethereum/aave/v3/earn/WSTETH-ETH/193#overview'); | ||
|
||
await app.position.shouldHaveHeader('WSTETH/ETH yield multiple #193'); | ||
await app.position.overview.shouldHaveNetValue({ | ||
value: '0.00', | ||
}); | ||
}); | ||
|
||
test('It should open an existing Aave V3 Ethereum Borrow CBETH/ETH position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/ethereum/aave/v3/borrow/CBETH-ETH/1277#overview'); | ||
|
||
await app.position.shouldHaveHeader('CBETH/ETH Borrow #1277'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '0.[0-9]{4}', | ||
token: 'CBETH/ETH', | ||
}); | ||
await app.position.overview.shouldHaveLoanToValue('[0-9]{1,2}.[0-9]{2}'); | ||
}); | ||
|
||
test('It should open an existing Aave V3 Ethereum Multiply ETH/USDC position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/ethereum/aave/v3/multiply/ETH-USDC/1218#overview'); | ||
|
||
await app.position.shouldHaveHeader('ETH/USDC Multiply #1218'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '([1-3],)?[0-9]{3}.[0-9]{2}', | ||
token: 'ETH/USDC', | ||
}); | ||
await app.position.overview.shouldHaveLoanToValue('[1-8][0-9].[0-9]{2}'); | ||
await app.position.overview.shouldHaveNetValue({ value: '\\$[0-9]{1,2}.[0-9]{2}' }); | ||
await app.position.overview.shouldHaveBuyingPower('\\$[0-9]{2,3}.[0-9]{2}'); | ||
await app.position.overview.shouldHaveBuyingPowerGreaterThanZero(); | ||
await app.position.overview.shouldHaveExposure({ | ||
amount: '0.[0-9]{4}', | ||
token: 'ETH', | ||
}); | ||
await app.position.overview.shouldHaveExposureGreaterThanZero('ETH'); | ||
await app.position.overview.shouldHaveDebt({ | ||
amount: '[0-9]{1,2}.[0-9]{2}', | ||
token: 'USDC', | ||
}); | ||
await app.position.overview.shouldHaveBorrowRate('[0-9].[0-9]{2}'); | ||
|
||
await app.position.setup.shouldHaveLiquidationPrice({ | ||
amount: '([1-3],)?[0-9]{2,3}.[0-9]{2}', | ||
pair: 'ETH/USDC', | ||
}); | ||
await app.position.setup.shouldHaveLoanToValue('[0-9]{1,2}.[0-9]{1,2}'); | ||
}); | ||
}); |
62 changes: 62 additions & 0 deletions
62
tests/noWallet/openExistingPositionPages/AaveV3/optimism.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { test } from '#noWalletFixtures'; | ||
import { longTestTimeout } from 'utils/config'; | ||
|
||
test.describe('Open exisiting position pages - Aave v3 Optimism', async () => { | ||
test('It should open an existing Aave V3 Optimism Earn yield loop USDC.E/SUSD position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/optimism/aave/v3/multiply/USDC.E-SUSD/396#overview'); | ||
|
||
await app.position.shouldHaveHeader('USDC.E/SUSD Multiply #396'); | ||
await app.position.overview.shouldHaveNetValue({ | ||
value: '[0-9].[0-9]{2}', | ||
}); | ||
}); | ||
|
||
test('It should open an existing Aave V3 Optimism Borrow DAI/WBTC position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
test.info().annotations.push({ | ||
type: 'Test case', | ||
description: '11994', | ||
}); | ||
|
||
await app.page.goto('/optimism/aave/v3/borrow/dai-wbtc/4#overview'); | ||
|
||
await app.position.shouldHaveHeader('DAI/WBTC Borrow #4'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '<0.001', | ||
token: 'WBTC/DAI', | ||
}); | ||
await app.position.overview.shouldHaveLoanToValue('>110.00'); | ||
await app.position.overview.shouldHaveCollateralDeposited({ | ||
amount: '<0.001', | ||
token: 'DAI', | ||
}); | ||
await app.position.overview.shouldHaveDebt({ | ||
amount: '<0.001', | ||
token: 'WBTC', | ||
}); | ||
await app.position.overview.shouldHaveBorrowRate('[0-9]{1,2}.[0-9]{2}'); | ||
await app.position.overview.shouldHaveNetValue({ value: '-0.[0-9]{1,2}' }); | ||
}); | ||
|
||
test('It should open an existing Aave V3 Multiply Optimism WBTC/USDC.E position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/optimism/aave/v3/multiply/WBTC-USDC.E/19#overview'); | ||
|
||
await app.position.shouldHaveHeader('WBTC/USDC.E Multiply #19'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '[0-9]{1,2},[0-9]{3}.[0-9]{2}', | ||
token: 'WBTC/USDC.E', | ||
}); | ||
await app.position.overview.shouldHaveLoanToValue('[0-9]{1,2}.[0-9]{2}'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import { test } from '#noWalletFixtures'; | ||
import { longTestTimeout } from 'utils/config'; | ||
|
||
test.describe('Open exisiting position pages - Maker', async () => { | ||
test('It should open an existing Maker Earn DSR position page @regression', async ({ app }) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/earn/dsr/0x10649c79428d718621821cf6299e91920284743f#overview'); | ||
|
||
await app.position.shouldHaveHeader('Dai Savings Rate'); | ||
await app.position.overview.shouldHaveNetValue({ | ||
value: '[0-9]{1,2}.[0-9]{2}', | ||
token: 'DAI', | ||
sdr: { savingsToken: 'DAI' }, | ||
}); | ||
}); | ||
|
||
test('It should open an existing Maker Borrow ETH-C/DAI position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/ethereum/maker/30640#overview'); | ||
|
||
await app.position.shouldHaveHeader('ETH-C Vault 30640'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '0.00', | ||
}); | ||
}); | ||
|
||
test('It should open an existing Maker Multiply ETH-C/DAI position page @regression', async ({ | ||
app, | ||
}) => { | ||
test.setTimeout(longTestTimeout); | ||
|
||
await app.page.goto('/ethereum/maker/30639#overview'); | ||
|
||
await app.position.shouldHaveHeader('ETH-C Vault 30639'); | ||
await app.position.overview.shouldHaveLiquidationPrice({ | ||
price: '0.00', | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.