generated from cfpb/open-source-project-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[e2e] [Unauthenticated Landing] Paperwork Reduction Act (#956)
closes #941 ## Changes - e2e: tests if a user can navigate from the unauthenticated landing page to the Paperwork Reduction Act ## How to test - Run `npx playwright test --ui` - Run the test under `paperworkReductionAct.spec.ts`
- Loading branch information
1 parent
260fcb6
commit 916f49d
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
e2e/pages/shared-lending-platform/unauthenticated-homepage/paperworkReductionAct.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { expect, test } from '@playwright/test'; | ||
import { expectedPaperworkReductionActUrl } from '../../../utils/testFixture.utils'; | ||
|
||
test('Unauthenticated homepage: Paperwork Reduction Act', async ({ page }) => { | ||
test.slow(); | ||
|
||
await test.step('Verify on the Paperwork Reduction Act and link exists', async () => { | ||
await page.goto('/'); | ||
await expect(page.locator('#sidebar')).toContainText( | ||
'Paperwork Reduction Act', | ||
); | ||
await expect( | ||
page.getByRole('link', { name: 'View Paperwork Reduction Act' }), | ||
).toBeVisible(); | ||
}); | ||
|
||
await test.step('Navigates to the Paperwork Reduction Act summary', async () => { | ||
await page | ||
.getByRole('link', { name: 'View Paperwork Reduction Act' }) | ||
.click(); | ||
await expect(page).toHaveURL(expectedPaperworkReductionActUrl); | ||
await expect(page.getByText('/Home')).toBeVisible(); | ||
await expect(page.getByRole('heading')).toContainText( | ||
'Paperwork Reduction Act statement', | ||
); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters