diff --git a/srcEarnProtocol/pages/landingPage/index.ts b/srcEarnProtocol/pages/landingPage/index.ts index c58d8fa1..1407f29e 100644 --- a/srcEarnProtocol/pages/landingPage/index.ts +++ b/srcEarnProtocol/pages/landingPage/index.ts @@ -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( diff --git a/testsEarnProtocol/noWallet/landingPage.spec.ts b/testsEarnProtocol/noWallet/landingPage.spec.ts index a65387aa..d8e8f910 100644 --- a/testsEarnProtocol/noWallet/landingPage.spec.ts +++ b/testsEarnProtocol/noWallet/landingPage.spec.ts @@ -2,6 +2,10 @@ 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(); }); @@ -9,7 +13,6 @@ test.describe('Landin page', async () => { (['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 diff --git a/testsEarnProtocol/withRealWallet/earnPage.spec.ts b/testsEarnProtocol/withRealWallet/earnPage.spec.ts index 8d8e369c..3d01708b 100644 --- a/testsEarnProtocol/withRealWallet/earnPage.spec.ts +++ b/testsEarnProtocol/withRealWallet/earnPage.spec.ts @@ -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 diff --git a/utils/config.ts b/utils/config.ts index cdfcbea6..a909cc52 100644 --- a/utils/config.ts +++ b/utils/config.ts @@ -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;