Skip to content

Commit

Permalink
fix chain helper test
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkunz committed Nov 11, 2024
1 parent 0222bd5 commit 931adb2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/e2e/trading-view/chain-index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
});
});

0 comments on commit 931adb2

Please sign in to comment.