diff --git a/src/modals/connectWallet.ts b/src/modals/connectWallet.ts index 4a29e7ae..b9e35fc6 100644 --- a/src/modals/connectWallet.ts +++ b/src/modals/connectWallet.ts @@ -13,6 +13,6 @@ export class ConnectWallet { await expect( this.page.getByText('Available Wallets'), '"Available Wallets" should be visible' - ).toBeVisible({ timeout: 15_000 }); + ).toBeVisible({ timeout: 20_000 }); } } diff --git a/src/pages/position/orderInformation.ts b/src/pages/position/orderInformation.ts index 4ee27bc9..0ceb41e7 100644 --- a/src/pages/position/orderInformation.ts +++ b/src/pages/position/orderInformation.ts @@ -29,9 +29,7 @@ export class OrderInformation { ); await expect( this.orderInformationLocator.locator('li:has-text("Buying") div:nth-child(2)') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -40,9 +38,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Flashloan Amount")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -51,9 +47,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Flashloan Provider Liquidity")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -61,9 +55,7 @@ export class OrderInformation { const regExp = new RegExp(`${amount} \\(${percentage}%\\)`); await expect( this.orderInformationLocator.locator('li:has-text("Price (impact)")') - ).toContainText('%)', { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -71,9 +63,7 @@ export class OrderInformation { const regExp = new RegExp(`${amount}%`); await expect( this.orderInformationLocator.locator('li:has-text("Slippage Limit")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -81,10 +71,7 @@ export class OrderInformation { const regExp = new RegExp(`${current}x${future}x`); await expect(this.orderInformationLocator.locator('li:has-text("Multiply")')).toContainText( - regExp, - { - timeout: positionTimeout, - } + regExp ); } @@ -93,10 +80,7 @@ export class OrderInformation { const regExp = new RegExp(`${current}x${future}x`); await expect(this.orderInformationLocator.locator('li:has-text("Multiple")')).toContainText( - regExp, - { - timeout: positionTimeout, - } + regExp ); } @@ -114,9 +98,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Outstanding debt")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -133,18 +115,14 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Total collateral")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step async shouldHaveLTV({ current, future }: { current: string; future: string }) { const regExp = new RegExp(`${current}% ${future}%`); - await expect(this.orderInformationLocator.locator('li:has-text("LTV")')).toContainText(regExp, { - timeout: positionTimeout, - }); + await expect(this.orderInformationLocator.locator('li:has-text("LTV")')).toContainText(regExp); } @step @@ -153,9 +131,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Transaction fee")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -172,9 +148,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Amount to Lend")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -182,10 +156,7 @@ export class OrderInformation { const regExp = new RegExp(`${current}%${future}%`); await expect(this.orderInformationLocator.locator('li:has-text("Net APY")')).toContainText( - regExp, - { - timeout: positionTimeout, - } + regExp ); } @@ -203,9 +174,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Lending Price")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -213,10 +182,7 @@ export class OrderInformation { const regExp = new RegExp(`${current}%${future}%`); await expect(this.orderInformationLocator.locator('li:has-text("Max LTV")')).toContainText( - regExp, - { - timeout: positionTimeout, - } + regExp ); } @@ -225,10 +191,7 @@ export class OrderInformation { const regExp = new RegExp(`${amount} ${token}`); await expect(this.orderInformationLocator.locator('li:has-text("Deposit fee")')).toContainText( - regExp, - { - timeout: positionTimeout, - } + regExp ); } @@ -236,9 +199,7 @@ export class OrderInformation { async shouldHaveTotalDeposit({ amount, token }: { amount: string; token: string }) { await expect( this.orderInformationLocator.locator(`li:has-text("Total ${token} deposit")`) - ).toContainText(amount, { - timeout: positionTimeout, - }); + ).toContainText(amount); } @step @@ -247,9 +208,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Estimated transaction cost")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -257,9 +216,7 @@ export class OrderInformation { const regExp = new RegExp(amount); await expect( this.orderInformationLocator.locator('li:has-text("Total SDAI convert")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -276,9 +233,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator(`li:has-text("Total ${token} exposure")`) - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step @@ -287,9 +242,7 @@ export class OrderInformation { await expect( this.orderInformationLocator.locator('li:has-text("Collateral Ratio")') - ).toContainText(regExp, { - timeout: positionTimeout, - }); + ).toContainText(regExp); } @step diff --git a/src/pages/position/overview.ts b/src/pages/position/overview.ts index 72e18bbb..8425d8b7 100644 --- a/src/pages/position/overview.ts +++ b/src/pages/position/overview.ts @@ -100,14 +100,11 @@ export class Overview { ).toHaveText(regExp, { timeout: positionTimeout }); } - /** - @param price - It must be regExp representing the the whole amount - */ - @step - async shouldHaveLoanToValueAfterPill(percentage: RegExp) { + async shouldHaveLoanToValueAfterPill(percentage: string) { + const regExp = new RegExp(percentage); await expect( this.page.getByText('Loan to Value').locator('..').getByText('After') - ).toContainText(percentage, { timeout: positionTimeout }); + ).toContainText(regExp); } @step @@ -123,9 +120,6 @@ export class Overview { ).not.toHaveText('0.00%'); } - /** - @param cost - It must be regExp representing the the whole amount - */ @step async shouldHaveBorrowCost(cost: string) { const regExp = new RegExp(`${cost}%`); @@ -134,14 +128,12 @@ export class Overview { ).toHaveText(regExp, { timeout: positionTimeout }); } - /** - @param cost - It must be regExp representing the the whole amount - */ @step - async shouldHaveBorrowCostAfterPill(cost: RegExp) { + async shouldHaveBorrowCostAfterPill(cost: string) { + const regExp = new RegExp(cost); await expect( this.page.getByText('Cost to Borrow').locator('..').getByText('After') - ).toContainText(cost, { timeout: positionTimeout }); + ).toContainText(regExp); } /** @@ -190,8 +182,7 @@ export class Overview { let regExp = new RegExp(`${amount} ${token}`); await expect(this.page.locator('li:has-text("exposure")').getByText('After')).toContainText( - regExp, - { timeout: positionTimeout } + regExp ); } @@ -220,8 +211,7 @@ export class Overview { let regexObj = new RegExp(`${amount} ${token}`); await expect(this.page.locator('li:has-text(" Debt")').getByText('After')).toContainText( - regexObj, - { timeout: positionTimeout } + regexObj ); } @@ -239,8 +229,7 @@ export class Overview { let regexObj = new RegExp(`${amount}x`); await expect(this.page.locator('li:has-text("Multiple")').getByText('After')).toContainText( - regexObj, - { timeout: positionTimeout } + regexObj ); } @@ -280,7 +269,7 @@ export class Overview { ? this.page.getByText('Buying Power').locator('..') : this.page.locator('li:has-text("Buying Power")'); - await expect(locator.getByText('After')).toContainText(regexObj, { timeout: positionTimeout }); + await expect(locator.getByText('After')).toContainText(regexObj); } @step diff --git a/tests/noWallet/aaveV2/aaveV2Earn.spec.ts b/tests/noWallet/aaveV2/aaveV2Earn.spec.ts new file mode 100644 index 00000000..be8b41e6 --- /dev/null +++ b/tests/noWallet/aaveV2/aaveV2Earn.spec.ts @@ -0,0 +1,68 @@ +import { test } from '#noWalletFixtures'; +import { longTestTimeout } from 'utils/config'; + +test.describe('Aave v2 Earn', async () => { + test('It should allow to simulate an Aave V2 Earn position before opening it - No wallet connected @regression', async ({ + app, + }) => { + test.info().annotations.push({ + type: 'Test case', + description: '12577', + }); + + test.setTimeout(longTestTimeout); + + await app.page.goto('/ethereum/aave/v2/earn/stETHeth#simulate'); + + // Depositing collateral too quickly after loading page returns wrong simulation results + await app.position.setup.waitForComponentToBeStable(); + await app.position.setup.deposit({ token: 'ETH', amount: '33.12345' }); + + await app.position.overview.shouldHaveTokenAmount({ amount: '33.12', token: 'ETH' }); + await app.position.overview.shouldHavePrev30daysNetValue({ + token: 'ETH', + amount: '33.[0-9]{2}', + }); + await app.position.setup.shouldHaveCurrentPrice({ + amount: '[0-9](.[0-9]{2,4})?', + pair: 'STETH/ETH', + }); + await app.position.setup.shouldHaveLiquidationPrice({ + amount: '[0-3].[0-9]{3,4}', + pair: 'STETH/ETH', + }); + await app.position.setup.orderInformation.shouldHaveBuyingAmount({ + tokenAmount: '[0-9]{2,3}.[0-9]{5}', + token: 'STETH', + dollarsAmount: '[0-9]{2,3},[0-9]{3}.[0-9]{2}', + }); + await app.position.setup.orderInformation.shouldHaveFlashloanAmount({ + token: 'DAI', + amount: '[0-9]{2,3},[0-9]{3}.[0-9]{4}', + }); + await app.position.setup.orderInformation.shouldHavePriceImpact({ + amount: '[0-9].[0-9]{4}', + percentage: '0.[0-9]{2}', + }); + await app.position.setup.orderInformation.shouldHaveSlippageLimit('0.[0-9]{2}'); + await app.position.setup.orderInformation.shouldHaveMultiply({ + current: '1', + future: '[1-9](.[0-9]{1,2})?', + }); + await app.position.setup.orderInformation.shouldHaveOutstandingDebt({ + token: 'ETH', + current: '0.00000', + future: '[0-9]{2,3}.[0-9]{5}', + }); + await app.position.setup.orderInformation.shouldHaveTotalCollateral({ + token: 'STETH', + current: '0.00000', + future: '[0-9]{2,3}.[0-9]{5}', + }); + await app.position.setup.orderInformation.shouldHaveLTV({ + current: '0.00', + future: '[0-9]{2,3}.[0-9]{2}', + }); + await app.position.setup.orderInformation.shouldHaveTransactionFee({ fee: '0' }); + }); +}); diff --git a/tests/noWallet/aaveV2/aaveV2Multiply.spec.ts b/tests/noWallet/aaveV2/aaveV2Multiply.spec.ts new file mode 100644 index 00000000..0d0444fe --- /dev/null +++ b/tests/noWallet/aaveV2/aaveV2Multiply.spec.ts @@ -0,0 +1,75 @@ +import { test } from '#noWalletFixtures'; +import { longTestTimeout } from 'utils/config'; + +test.describe('Aave v2 Multiply', async () => { + test('It should allow to simulate an Aave V2 Multiply position before opening it - No wallet connected @regression', async ({ + app, + }) => { + test.info().annotations.push({ + type: 'Test case', + description: '12576', + }); + + test.setTimeout(longTestTimeout); + + await app.page.goto('/ethereum/aave/v2/multiply/stETHusdc#simulate'); + + // Depositing collateral too quickly after loading page returns wrong simulation results + await app.position.overview.waitForComponentToBeStable(); + await app.position.setup.deposit({ token: 'STETH', amount: '16.12345' }); + + await app.position.overview.shouldHaveLiquidationPriceAfterPill('[0-9]{3}.[0-9]{2}'); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-4][0-9].[0-9]{2}%'); + await app.position.overview.shouldHaveBorrowCostAfterPill('[0-9].[0-9]{2}%'); + await app.position.overview.shouldHaveNetValueAfterPill('[1-9][0-9],[0-9]{3}.[0-9]{2}'); + await app.position.overview.shouldHaveExposureAfterPill({ + amount: '[1-4][0-9].[0-9]{5}', + token: 'STETH', + }); + await app.position.overview.shouldHaveDebtAfterPill({ + amount: '[0-9]{1,2},[0-9]{3}.[0-9]{4}', + token: 'USDC', + }); + await app.position.overview.shouldHaveMultipleAfterPill('1(.[0-9]{1,2})?'); + await app.position.overview.shouldHaveBuyingPowerAfterPill({ + amount: '[1-9][0-9],[0-9]{3}(.[0-9]{1,2})?', + }); + + await app.position.setup.shouldHaveLiquidationPrice({ + amount: '[0-9]{3}(.[0-9]{1,2})? USDC', + }); + await app.position.setup.shouldHaveLoanToValue('[1-4][0-9].[0-9]'); + await app.position.setup.orderInformation.shouldHaveBuyingAmount({ + tokenAmount: '[0-9].[0-9]{5}', + token: 'STETH', + dollarsAmount: '[0-9]{1,2},[0-9]{3}.[0-9]{2}', + }); + await app.position.setup.orderInformation.shouldHavePriceImpact({ + amount: '[1-3],[0-9]{3}.[0-9]{2}', + percentage: '0.[0-9]{2}', + }); + await app.position.setup.orderInformation.shouldHaveSlippageLimit('0.[0-9]{2}'); + await app.position.setup.orderInformation.shouldHaveMultiply({ + current: '1', + future: '[1-2](.[0-9]{1,2})?', + }); + await app.position.setup.orderInformation.shouldHaveOutstandingDebt({ + token: 'USDC', + current: '0.00', + future: '[0-9]{1,2},[0-9]{3}.[0-9]{2}', + }); + await app.position.setup.orderInformation.shouldHaveTotalCollateral({ + token: 'STETH', + current: '0.00000', + future: '[2-3][0-9].[0-9]{5}', + }); + await app.position.setup.orderInformation.shouldHaveLTV({ + current: '0.00', + future: '[1-3][0-9].[0-9]{2}', + }); + await app.position.setup.orderInformation.shouldHaveTransactionFee({ + fee: '[0-9]{1,2}.[0-9]{2}', + token: 'USDC', + }); + }); +}); diff --git a/tests/noWallet/aaveV3/arbitrum/aaveV3BorrowArbitrum.spec.ts b/tests/noWallet/aaveV3/arbitrum/aaveV3BorrowArbitrum.spec.ts index aaf26624..f79d1ddf 100644 --- a/tests/noWallet/aaveV3/arbitrum/aaveV3BorrowArbitrum.spec.ts +++ b/tests/noWallet/aaveV3/arbitrum/aaveV3BorrowArbitrum.spec.ts @@ -24,7 +24,7 @@ test.describe('Aave v3 Borrow Arbitrum', async () => { - x2 digits decimal part --> -x.xx% */ - await app.position.overview.shouldHaveBorrowCostAfterPill(/^-[0-9]\.[0-9]{2}/); + await app.position.overview.shouldHaveBorrowCostAfterPill('-[0-9].[0-9]{2}'); /* Asserting that Net Value After pill will be a number: - x5 digits whole-number part, with a ',' separator for thousands- > 8x,xxx - x2 digits decimal part @@ -60,7 +60,7 @@ test.describe('Aave v3 Borrow Arbitrum', async () => { - x2 digits decimal part --> xx.xx% */ - await app.position.overview.shouldHaveLoanToValueAfterPill(/[1-4][0-9]\.[0-9]{2}%/); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-4][0-9].[0-9]{2}%'); /* Asserting that Net Value After pill will be a number: - x5 digits whole-number part, with a ',' separator for thousands- > 7x,xxx - x2 digits decimal part diff --git a/tests/noWallet/aaveV3/arbitrum/aaveV3MultiplyArbitrum.spec.ts b/tests/noWallet/aaveV3/arbitrum/aaveV3MultiplyArbitrum.spec.ts index 02c4b670..76a29be7 100644 --- a/tests/noWallet/aaveV3/arbitrum/aaveV3MultiplyArbitrum.spec.ts +++ b/tests/noWallet/aaveV3/arbitrum/aaveV3MultiplyArbitrum.spec.ts @@ -29,14 +29,14 @@ test.describe('Aave v3 Multiply Arbitrum', async () => { - x2 digits decimal part --> [1/2/3/4]x.xx%% */ - await app.position.overview.shouldHaveLoanToValueAfterPill(/[1-4][0-9]\.[0-9]{2}%/); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-4][0-9].[0-9]{2}%'); /* Asserting that Borrow Cost After pill will be a percentage: - negative - x1 digit whole-number part - x2 digits decimal part --> x.xx% */ - await app.position.overview.shouldHaveBorrowCostAfterPill(/^-[0-9]{1,2}\.[0-9]{2}/); + await app.position.overview.shouldHaveBorrowCostAfterPill('-[0-9]{1,2}.[0-9]{2}'); /* Asserting that Net Value After pill will be a number: - x4 digits whole-number part, with a ',' separator for thousands -> [2-8]x,xxx - x2 digits decimal part diff --git a/tests/noWallet/aaveV3/base/aaveV3BorrowBase.spec.ts b/tests/noWallet/aaveV3/base/aaveV3BorrowBase.spec.ts index 2ba05b42..5e3d2e66 100644 --- a/tests/noWallet/aaveV3/base/aaveV3BorrowBase.spec.ts +++ b/tests/noWallet/aaveV3/base/aaveV3BorrowBase.spec.ts @@ -24,7 +24,7 @@ test.describe('Aave v3 Borrow Base', async () => { - x2 digits decimal part --> -x.xx% */ - await app.position.overview.shouldHaveBorrowCostAfterPill(/^-[0-9]\.[0-9]{2}/); + await app.position.overview.shouldHaveBorrowCostAfterPill('-[0-9].[0-9]{2}'); /* Asserting that Net Value After pill will be a number: - x5 digits whole-number part, with a ',' separator for thousands- > xx,xxx - x2 digits decimal part @@ -60,7 +60,7 @@ test.describe('Aave v3 Borrow Base', async () => { - x2 digits decimal part --> xx.xx% */ - await app.position.overview.shouldHaveLoanToValueAfterPill(/[1-9][0-9]\.[0-9]{2}%/); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-9][0-9].[0-9]{2}%'); /* Asserting that Net Value After pill will be a number: - x5 digits whole-number part, with a ',' separator for thousands- > 7x,xxx - x2 digits decimal part diff --git a/tests/noWallet/aaveV3/base/aaveV3EarnBase.spec.ts b/tests/noWallet/aaveV3/base/aaveV3EarnBase.spec.ts index c752909f..ceda0f27 100644 --- a/tests/noWallet/aaveV3/base/aaveV3EarnBase.spec.ts +++ b/tests/noWallet/aaveV3/base/aaveV3EarnBase.spec.ts @@ -29,13 +29,13 @@ test.describe('Aave v3 Earn Base', async () => { - x2 digits decimal part --> [1/2/3/4/5]x.xx%% */ - await app.position.overview.shouldHaveLoanToValueAfterPill(/[1-5][0-9]\.[0-9]{2}%/); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-5][0-9].[0-9]{2}%'); /* Asserting that Borrow Cost After pill will be a percentage: - x1 digit whole-number part - x2 digits decimal part --> x.xx% */ - await app.position.overview.shouldHaveBorrowCostAfterPill(/[0-9]\.[0-9]{2}/); + await app.position.overview.shouldHaveBorrowCostAfterPill('[0-9].[0-9]{2}'); /* Asserting that Net Value After pill will be a number: - x2 digits whole-number part -> xx - x2 digits decimal part diff --git a/tests/noWallet/aaveV3/base/aaveV3MultiplyBase.spec.ts b/tests/noWallet/aaveV3/base/aaveV3MultiplyBase.spec.ts index 71f078a6..f8f2956f 100644 --- a/tests/noWallet/aaveV3/base/aaveV3MultiplyBase.spec.ts +++ b/tests/noWallet/aaveV3/base/aaveV3MultiplyBase.spec.ts @@ -29,13 +29,13 @@ test.describe('Aave v3 Multiply Base', async () => { - x2 digits decimal part --> [1/2/3/4]x.xx%% */ - await app.position.overview.shouldHaveLoanToValueAfterPill(/[1-5][0-9]\.[0-9]{2}%/); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-5][0-9].[0-9]{2}%'); /* Asserting that Borrow Cost After pill will be a percentage: - x1 digit whole-number part - x2 digits decimal part --> x.xx% */ - await app.position.overview.shouldHaveBorrowCostAfterPill(/[0-9]\.[0-9]{2}/); + await app.position.overview.shouldHaveBorrowCostAfterPill('[0-9].[0-9]{2}'); /* Asserting that Net Value After pill will be a number: - x4 digits whole-number part, with a ',' separator for thousands -> [2-8]x,xxx - x2 digits decimal part diff --git a/tests/noWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts b/tests/noWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts index 2212ecc4..764f68e7 100644 --- a/tests/noWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts +++ b/tests/noWallet/aaveV3/ethereum/aaveV3BorrowEthereum.spec.ts @@ -24,7 +24,7 @@ test.describe('Aave v3 Borrow Ethereum', async () => { - x2 digits decimal part --> -x.xx% */ - await app.position.overview.shouldHaveBorrowCostAfterPill(/^-[0-9]\.[0-9]{2}/); + await app.position.overview.shouldHaveBorrowCostAfterPill('-[0-9].[0-9]{2}'); /* Asserting that Net Value After pill will be a number: - x5 digits whole-number part, with a ',' separator for thousands- > 8x,xxx - x2 digits decimal part @@ -60,7 +60,7 @@ test.describe('Aave v3 Borrow Ethereum', async () => { - x2 digits decimal part --> xx.xx% */ - await app.position.overview.shouldHaveLoanToValueAfterPill(/[1-9][0-9]\.[0-9]{2}%/); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-9][0-9].[0-9]{2}%'); /* Asserting that Net Value After pill will be a number: - x5 digits whole-number part, with a ',' separator for thousands- > 7x,xxx - x2 digits decimal part diff --git a/tests/noWallet/aaveV3/ethereum/aaveV3MultiplyEthereum.spec.ts b/tests/noWallet/aaveV3/ethereum/aaveV3MultiplyEthereum.spec.ts index 8be7b02e..f1de75f9 100644 --- a/tests/noWallet/aaveV3/ethereum/aaveV3MultiplyEthereum.spec.ts +++ b/tests/noWallet/aaveV3/ethereum/aaveV3MultiplyEthereum.spec.ts @@ -29,14 +29,14 @@ test.describe('Aave v3 Multiply Ethereum', async () => { - x2 digits decimal part --> [1/2/3/4]x.xx%% */ - await app.position.overview.shouldHaveLoanToValueAfterPill(/[1-4][0-9]\.[0-9]{2}%/); + await app.position.overview.shouldHaveLoanToValueAfterPill('[1-4][0-9].[0-9]{2}%'); /* Asserting that Borrow Cost After pill will be a percentage: - positive - x1 digit whole-number part - x2 digits decimal part --> x.xx% */ - await app.position.overview.shouldHaveBorrowCostAfterPill(/^[0-9]\.[0-9]{2}/); + await app.position.overview.shouldHaveBorrowCostAfterPill('[0-9].[0-9]{2}'); /* Asserting that Net Value After pill will be a number: - x5 digits whole-number part, with a ',' separator for thousands -> [4/5/67/8]x,xxx - x2 digits decimal part diff --git a/tests/noWallet/maker/general.spec.ts b/tests/noWallet/maker/general.spec.ts index 143d3b92..9f30507d 100644 --- a/tests/noWallet/maker/general.spec.ts +++ b/tests/noWallet/maker/general.spec.ts @@ -13,7 +13,7 @@ test.describe('Maker', async () => { }) => { test.info().annotations.push({ type: 'Test case', - description: 'xxxxx', + description: '12335', }); await app.page.goto(url);