Skip to content

Commit 4492b78

Browse files
VIA-245 AS Add snapshot test for Eligibility API Error response
1 parent 53f5b42 commit 4492b78

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

e2e/snapshot/eligibility.snapshot.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,26 @@ test.describe("E2E", () => {
5757
});
5858
});
5959
});
60+
61+
test.describe("Error", () => {
62+
test.beforeAll(async ({ browser }, testInfo) => {
63+
testInfo.setTimeout(60000);
64+
page = await login(browser, users.Eligibility_Error_400.email);
65+
66+
await page.mouse.move(0, 0);
67+
});
68+
69+
test("Eligibility Error 400 Only", async () => {
70+
const screenshotFileName = "eligibility-error-400.png";
71+
const customScreenshotPath = pathForCustomScreenshots(fileName, screenshotFileName, projectName);
72+
await page.goto(RSV_PAGE_URL);
73+
await page.screenshot({
74+
path: customScreenshotPath,
75+
fullPage: true,
76+
});
77+
await expect.soft(page).toHaveScreenshot(screenshotFileName, {
78+
fullPage: true,
79+
});
80+
});
81+
});
6082
});

test-data/test-users.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@
1010
},
1111
"Actionable_No_InfoText_Action": {
1212
"email": "[email protected]"
13+
},
14+
"Eligibility_Error_400": {
15+
"email": "[email protected]"
1316
}
1417
}

0 commit comments

Comments
 (0)