Skip to content

Commit 0ef457d

Browse files
committed
tests(e2e): update data to fix retrieve stats card test (anuraghazra#3643)
* tests(e2e): update data to fix retrieve stats card test * dev
1 parent 465aa57 commit 0ef457d

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

tests/e2e/e2e.test.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,20 @@ import { expect, describe, beforeAll, test } from "@jest/globals";
1414

1515
const REPO = "curly-fiesta";
1616
const USER = "catelinemnemosyne";
17+
const STATS_CARD_USER = "e2eninja";
1718
const GIST_ID = "372cef55fd897b31909fdeb3a7262758";
1819

1920
const STATS_DATA = {
20-
name: "Cateline Mnemosyne",
21-
totalPRs: 2,
21+
name: "E2ENinja",
22+
totalPRs: 1,
2223
totalReviews: 0,
23-
totalCommits: 16,
24+
totalCommits: 3,
2425
totalIssues: 1,
2526
totalStars: 1,
26-
contributedTo: 1,
27+
contributedTo: 0,
2728
rank: {
2829
level: "C",
29-
percentile: 98.25108541551654,
30+
percentile: 98.73972605284538,
3031
},
3132
};
3233

@@ -116,7 +117,7 @@ describe("Fetch Cards", () => {
116117

117118
// Check if the Vercel preview instance stats card function is up and running.
118119
await expect(
119-
axios.get(`${VERCEL_PREVIEW_URL}/api?username=${USER}`),
120+
axios.get(`${VERCEL_PREVIEW_URL}/api?username=${STATS_CARD_USER}`),
120121
).resolves.not.toThrow();
121122

122123
// Get local stats card.
@@ -126,7 +127,7 @@ describe("Fetch Cards", () => {
126127

127128
// Get the Vercel preview stats card response.
128129
const serverStatsSvg = await axios.get(
129-
`${VERCEL_PREVIEW_URL}/api?username=${USER}&include_all_commits=true&${CACHE_BURST_STRING}`,
130+
`${VERCEL_PREVIEW_URL}/api?username=${STATS_CARD_USER}&include_all_commits=true&${CACHE_BURST_STRING}`,
130131
);
131132

132133
// Check if stats card from deployment matches the stats card from local.

0 commit comments

Comments
 (0)