From 70f9f34c21783218de029c52fb8e4b71b5eb21c1 Mon Sep 17 00:00:00 2001 From: yivlad Date: Sat, 21 Dec 2024 21:39:13 +0100 Subject: [PATCH] Fix stablecoins in wallet assertion --- packages/app/src/pages/Savings.PageObject.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/app/src/pages/Savings.PageObject.ts b/packages/app/src/pages/Savings.PageObject.ts index aad8491bf..fa5f27059 100644 --- a/packages/app/src/pages/Savings.PageObject.ts +++ b/packages/app/src/pages/Savings.PageObject.ts @@ -158,7 +158,16 @@ export class SavingsPageObject extends BasePageObject { async expectStablecoinsInWalletAssetBalance(assetName: string, value: string): Promise { const panel = this.locateStablecoinsInWalletPanel() - const row = panel.getByRole('row').filter({ has: this.page.getByRole('cell', { name: assetName, exact: true }) }) + const row = (() => { + if (assetName === 'DAI') { + return panel + .getByRole('row') + .filter({ has: this.page.getByTestId(testIds.savings.stablecoinsInWallet.upgradeDaiToUsdsCell) }) + } + + return panel.getByRole('row').filter({ has: this.page.getByRole('cell', { name: assetName, exact: true }) }) + })() + await expect(row.getByRole('cell', { name: value })).toBeVisible() }