Skip to content

Commit ddeeefc

Browse files
Testing: N4A Button testing
1 parent 7f1c5f6 commit ddeeefc

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/n4a-calculator.spec.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,30 @@ import { expect, test } from '@playwright/test';
22
// import { handleConsentPopup, waitFor } from './util';
33

44
// Unit test for the accuracy of the calculations
5+
test.describe('Numerical test for N4A calculator page', () => {
6+
test.beforeEach(async ({ page }) => {
7+
await page.goto('/test-product');
8+
await page.waitForLoadState('load');
9+
});
10+
11+
test('estimageNCUUsage calculations are accurate', async ({page}) => {
12+
await page.getByTestId("button-ncu-usage-details").click();
13+
await page.getByTestId("button-total-cost-details").click();
14+
});
15+
});
516

617
// UI test to click buttons to test functionality
18+
test.describe('Button functionality test for N4A calculator page', () => {
19+
test.beforeEach(async ({ page }) => {
20+
await page.goto('/test-product');
21+
await page.waitForLoadState('load');
22+
});
23+
24+
test('estimateNCUUsage buttons are functional', async ({page}) => {
25+
await page.getByTestId("button-ncu-usage-details").click();
26+
await page.getByTestId("button-total-cost-details").click();
27+
});
28+
});
729

830
// UI test to make sure the page renders correctly. IE. Calculator with #s on it, regions, etc are populated
931
test.describe('Smoke test for calculation page', () => {

0 commit comments

Comments
 (0)