diff --git a/frontend/src/tests/routes/app/tokens/page.spec.ts b/frontend/src/tests/routes/app/tokens/page.spec.ts index 03e49d8b67..e0d6dcdff8 100644 --- a/frontend/src/tests/routes/app/tokens/page.spec.ts +++ b/frontend/src/tests/routes/app/tokens/page.spec.ts @@ -793,16 +793,19 @@ describe("Tokens route", () => { it("should not display goto dashboard for not failed tokens", async () => { const po = await renderPage(); const tokensPagePo = po.getTokensPagePo(); - const rowsPos = await tokensPagePo.getTokensTable().getRows(); + const ckBTCTokenRow = await tokensPagePo + .getTokensTable() + .getRowByName("ckBTC"); + const notFailedTokenRow = await tokensPagePo + .getTokensTable() + .getRowByName("ZTOKEN1"); - expect(rowsPos.length).toBeGreaterThan(0); - for (const rowPo of rowsPos) { - if ((await rowPo.getProjectName()) !== failedImportedTokenIdText) { - expect(await rowPo.getGoToDashboardButton().isPresent()).toEqual( - false - ); - } - } + expect( + await ckBTCTokenRow.getGoToDashboardButton().isPresent() + ).toEqual(false); + expect( + await notFailedTokenRow.getGoToDashboardButton().isPresent() + ).toEqual(false); }); it("should have view on dashboard action button", async () => {