Skip to content

Commit

Permalink
Fix stablecoins in wallet assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
yivlad committed Dec 21, 2024
1 parent 9cc4211 commit 70f9f34
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/app/src/pages/Savings.PageObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,16 @@ export class SavingsPageObject extends BasePageObject {

async expectStablecoinsInWalletAssetBalance(assetName: string, value: string): Promise<void> {
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()
}

Expand Down

0 comments on commit 70f9f34

Please sign in to comment.