From 931adb25d169f709d4244261cd7de55dcc7044bc Mon Sep 17 00:00:00 2001 From: Ken Kunz Date: Sun, 10 Nov 2024 20:12:25 -0600 Subject: [PATCH] fix chain helper test --- tests/e2e/trading-view/chain-index.test.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/trading-view/chain-index.test.ts b/tests/e2e/trading-view/chain-index.test.ts index 0b2a4b8a0..79e647a80 100644 --- a/tests/e2e/trading-view/chain-index.test.ts +++ b/tests/e2e/trading-view/chain-index.test.ts @@ -21,8 +21,10 @@ test.describe('chain index page', () => { test('tile data (from API) should match local chain helper', async ({ page }) => { for (const chain of chains) { const tile = page.getByTestId(`chain-${chain.id}-${chain.slug}`); - const title = tile.getByRole('heading', { name: chain.name, exact: true }); - await expect(title).toBeVisible(); + if ((await tile.count()) > 0) { + const title = tile.getByRole('heading', { name: chain.name, exact: true }); + await expect(title).toBeVisible(); + } } }); });