Skip to content

Commit

Permalink
Merge pull request #707 from OasisDEX/daily-improvements-16-jan-2
Browse files Browse the repository at this point in the history
Daily improvements - January - 16th
  • Loading branch information
juan-langa authored Jan 16, 2025
2 parents e877f39 + 2edf773 commit 180adb2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
9 changes: 9 additions & 0 deletions srcEarnProtocol/pages/landingPage/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ export class LandingPage {
).toBeVisible();
}

@step
async openPage() {
await this.page.goto('https://oasisapp.dev');
await expect(
this.page.getByText('Automated Exposure to DeFi'),
'"Automated Exposure..." should be visible'
).toBeVisible();
}

@step
async shouldShowVaultCard() {
await expect(
Expand Down
5 changes: 4 additions & 1 deletion testsEarnProtocol/noWallet/landingPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import { expect, test } from '#earnProtocolFixtures';
import { expectDefaultTimeout } from 'utils/config';

test.describe('Landin page', async () => {
test.beforeEach(async ({ app }) => {
await app.landingPage.openPage();
});

test('It should show vault card', async ({ app }) => {
await app.landingPage.shouldShowVaultCard();
});

(['Right', 'Left'] as const).forEach((direction) => {
test(`It should show vault card to the ${direction}`, async ({ app }) => {
// To avoid flakiness
await app.landingPage.shouldBeVisible();
await app.page.waitForTimeout(2_000);

// Get vault info for current active vault in carousel
Expand Down
2 changes: 1 addition & 1 deletion testsEarnProtocol/withRealWallet/earnPage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ test.describe('With real wallet - Earn page', async () => {
await app.vaultPage.sidebar.depositOrWithdraw('1');
await app.vaultPage.sidebar.depositOrWithdrawAmountShouldBe({
tokenOrCurrency: '$',
amount: '1.00',
amount: '[0-1].[0-9]{4}',
});

// WBTC
Expand Down
3 changes: 2 additions & 1 deletion utils/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

export const baseUrl = process.env.BASE_URL ?? 'https://staging.summer.fi';

export const earnProtocolBaseUrl = process.env.BASE_URL_EARN_PROTOCOL ?? 'https://oasisapp.dev';
export const earnProtocolBaseUrl =
process.env.BASE_URL_EARN_PROTOCOL ?? 'https://oasisapp.dev/earn';

export const expectDefaultTimeout: number = 5_000;

Expand Down

0 comments on commit 180adb2

Please sign in to comment.