Skip to content

Commit

Permalink
Merge pull request #460 from OasisDEX/daily-improvements-26-august
Browse files Browse the repository at this point in the history
Daily improvements - 26 August
  • Loading branch information
juan-langa authored Aug 26, 2024
2 parents 79929e5 + 54d479f commit 6f77e64
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/pages/position/manage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ export class Manage {
async shouldUpdateEarnRays() {
const initialRaysToEarn = await this.page.getByText('Rays Instantly').innerText();
await expect(this.page.getByText('Rays Instantly')).not.toContainText(initialRaysToEarn, {
timeout: expectDefaultTimeout * 2,
timeout: expectDefaultTimeout * 3,
});
}

@step
async shouldEarnRays(raysCount: string) {
const regExp = new RegExp(`Earn ${raysCount}`);
await expect(this.page.getByText('Rays Instantly')).toContainText(regExp, {
timeout: expectDefaultTimeout * 2,
timeout: expectDefaultTimeout * 3,
});
}

Expand Down
2 changes: 1 addition & 1 deletion tests/noWallet/portfolio/stagingVsProd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ test.describe('Staging vs Production - Wallet not connected', async () => {
'0x39Cc77F88C7CFE2139066a7e987746e2Cd3bAd38',
'0xb0a5f41a36de795bb102dc41f4c61c6956144282',
'0xdd9e07372dc5368c9c0633222b0f1c4335500ef7',
'0xee2826453a4fd5afeb7ceffeef3ffa2320081268',
// '0xee2826453a4fd5afeb7ceffeef3ffa2320081268',
'0x554fe9292cd2e2b9469e19e814842c060312ff00',
'0x8e83fab54c595ee085111ae498c8bbca8c8b2c92',
].forEach((walletAddress) =>
Expand Down
15 changes: 8 additions & 7 deletions tests/withWallet/rays/positionPages.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,19 @@ test.describe('Rays - Wallet connected - Position page', async () => {
await app.position.manage.shouldEarnRays('0.00[0-9]{2}');
});

test('It should show Rays to be earned - Adjust risk DOWN @regression', async () => {
test('It should show Rays to be earned - Adjust risk DOWN', async () => {
test.info().annotations.push({
type: 'Test case',
description: 'xxx',
});

await app.page.reload();

await app.position.setup.moveSlider({ protocol: 'Ajna', value: 0.1 });
await app.position.manage.shouldUpdateEarnRays();
await app.position.manage.shouldEarnRays('0.000[0-9]');
});

test('It should show Rays to be increased - Deposit extra collateral @regression', async () => {
test('It should show Rays to be increased - Deposit extra collateral', async () => {
test.info().annotations.push({
type: 'Test case',
description: 'xxx',
Expand All @@ -79,7 +80,7 @@ test.describe('Rays - Wallet connected - Position page', async () => {
await app.position.manage.shouldIncreaseRays('[1-5],[0-9]{3}.[0-9]{2}');
});

test('It should show Rays to be reduced - Withdraw collateral @regression', async () => {
test('It should show Rays to be reduced - Withdraw collateral', async () => {
test.info().annotations.push({
type: 'Test case',
description: 'xxx',
Expand All @@ -91,7 +92,7 @@ test.describe('Rays - Wallet connected - Position page', async () => {
await app.position.manage.shouldReduceRays({ raysCount: '0.00[0-9]{2}' });
});

test('It should show Rays to be increased - Pay back debt @regression', async () => {
test('It should show Rays to be increased - Pay back debt', async () => {
test.info().annotations.push({
type: 'Test case',
description: 'xxx',
Expand All @@ -103,7 +104,7 @@ test.describe('Rays - Wallet connected - Position page', async () => {
await app.position.manage.shouldIncreaseRays('0.00[0-9]{2}');
});

test('It should show Rays to be reduced - Borrow more @regression', async () => {
test('It should show Rays to be reduced - Borrow more', async () => {
test.info().annotations.push({
type: 'Test case',
description: 'xxx',
Expand All @@ -115,7 +116,7 @@ test.describe('Rays - Wallet connected - Position page', async () => {
await app.position.manage.shouldReduceRays({ raysCount: '0.00[0-9]{2}' });
});

test('It should show Rays to be earned - Close position @regression', async () => {
test('It should show Rays to be earned - Close position', async () => {
test.info().annotations.push({
type: 'Test case',
description: 'xxx',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ test.describe('Spark Multiply - Swap to Aave V3', async () => {
{ colToken: 'LINK', debtToken: 'ETH' },
{ colToken: 'LINK', debtToken: 'USDC' },
{ colToken: 'LINK', debtToken: 'USDT' },
{ colToken: 'MKR', debtToken: 'DAI' },
{ colToken: 'RETH', debtToken: 'DAI' },
{ colToken: 'RETH', debtToken: 'USDC' },
{ colToken: 'RETH', debtToken: 'USDT' },
{ colToken: 'SDAI', debtToken: 'ETH' },
// { colToken: 'MKR', debtToken: 'DAI' }, -- Aave MKR very clos to supply cap
] as const
).forEach((targetPool) =>
test(`It should swap a Spark Multiply position (ETH/DAI) to Aave V3 Multiply (${targetPool.colToken}/${targetPool.debtToken})`, async () => {
Expand Down

0 comments on commit 6f77e64

Please sign in to comment.