From 29a8704fcc70c2366261b251f019e9d0669917fc Mon Sep 17 00:00:00 2001 From: Alexandr Date: Thu, 25 Jan 2024 11:09:28 +0200 Subject: [PATCH 1/2] tests: refactor stats card e2e test to avoid future error due to yearly data update --- tests/e2e/e2e.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/e2e.test.js b/tests/e2e/e2e.test.js index bfff8bd6cb6a0..53a19cce877b7 100644 --- a/tests/e2e/e2e.test.js +++ b/tests/e2e/e2e.test.js @@ -120,11 +120,13 @@ describe("Fetch Cards", () => { ).resolves.not.toThrow(); // Get local stats card. - const localStatsCardSVG = renderStatsCard(STATS_DATA); + const localStatsCardSVG = renderStatsCard(STATS_DATA, { + include_all_commits: true, + }); // Get the Vercel preview stats card response. const serverStatsSvg = await axios.get( - `${VERCEL_PREVIEW_URL}/api?username=${USER}&${CACHE_BURST_STRING}`, + `${VERCEL_PREVIEW_URL}/api?username=${USER}&include_all_commits=true&${CACHE_BURST_STRING}`, ); // Check if stats card from deployment matches the stats card from local. From e5c142d8019222382f9ba767eee40bda9260a92d Mon Sep 17 00:00:00 2001 From: Alexandr Date: Thu, 25 Jan 2024 11:14:11 +0200 Subject: [PATCH 2/2] dev --- tests/e2e/e2e.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/e2e.test.js b/tests/e2e/e2e.test.js index 53a19cce877b7..10a8e8d306dda 100644 --- a/tests/e2e/e2e.test.js +++ b/tests/e2e/e2e.test.js @@ -20,13 +20,13 @@ const STATS_DATA = { name: "Cateline Mnemosyne", totalPRs: 2, totalReviews: 0, - totalCommits: 1, + totalCommits: 15, totalIssues: 1, totalStars: 1, contributedTo: 1, rank: { level: "C", - percentile: 98.38875766503551, + percentile: 98.2625144160878, }, };