feat: add e2e tests for insights charts (#23777)

* feat: add e2e tests for insights ChartCard components

- Test that all ChartCard components render with expected titles
- Test graceful handling of TRPC call failures
- Test ChartCard rendering for organization users
- Wait for page load and TRPC calls before checking chart presence
- Use text-based selectors to find ChartCard titles in h2 elements
- Remove page.waitForTimeout() calls to comply with ESLint rules

Co-Authored-By: [email protected] <[email protected]>

* clean up e2e tests

* fix titles

* still render charts if no data

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: sean-brydon <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-09-15 11:00:00 +02:00
1 parent 34b62f7516
commit 0332118724
4 files changed
+38 -6

No files matched your search

@@ -27,11 +27,9 @@ export const HighestRatedMembersTable = () => {
if (!isSuccess || !data) return null;
return data && data.length > 0 ? (
return (
<ChartCard title={t("highest_rated")}>
<UserStatsTable data={data} />
</ChartCard>
) : (
<></>
);
};
@@ -27,11 +27,9 @@ export const LowestRatedMembersTable = () => {
if (!isSuccess || !data) return null;
return data && data.length > 0 ? (
return (
<ChartCard title={t("lowest_rated")}>
<UserStatsTable data={data} />
</ChartCard>
) : (
<></>
);
};