-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add general UI validation for Sub-doc
- Loading branch information
1 parent
1d60104
commit 772df2c
Showing
7 changed files
with
109 additions
and
5 deletions.
There are no files selected for viewing
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
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
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
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
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
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,39 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test.describe("Medicaid SPA - Sub Doc", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto("/"); | ||
await page.getByTestId('Dashboard-d').click(); | ||
await page.locator('a[href*="details/Medicaid%20SPA/CO-22-2020"]').click(); | ||
}); | ||
|
||
test.describe("UI - Validation", () => { | ||
test.describe.skip("Status", () => { | ||
test("should display Status items", () => {}); | ||
}); | ||
test.describe("form actions", () => { | ||
test("should display the details page", async ({ page }) => { | ||
// elements before to be validated | ||
|
||
await expect(page.locator('a[href*="upload-subsequent-documents/Medicaid SPA/CO-22-2020?origin=details"]')).toBeVisible(); | ||
await expect(page.locator('a[href*="upload-subsequent-documents/Medicaid SPA/CO-22-2020?origin=details"]')).toContainText('Upload Subsequent Document'); | ||
|
||
// elements after to be validated | ||
}); | ||
}); | ||
test.describe.skip("package details", () => {}); | ||
test.describe.skip("package activity", () => {}); | ||
}); | ||
|
||
test.describe('Naviation - Validation', () => { | ||
test('navigate to withdraw package page', () => { | ||
// see below | ||
}); | ||
|
||
test('navigate to sub doc page', async ({ page }) => { | ||
await page.locator('a[href*="/actions/upload-subsequent-documents/Medicaid SPA/CO-22-2020?origin=details"]').click(); | ||
|
||
await expect(page.getByTestId("detail-section")).toBeVisible(); | ||
}); | ||
}); | ||
}); |
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,60 @@ | ||
import {test, expect} from "@playwright/test"; | ||
|
||
|
||
test.beforeEach(async ({ page }) => { | ||
await page.goto("/"); | ||
await page.getByTestId("Dashboard-d").click(); | ||
await page.locator('a[href*="details/Medicaid%20SPA/CO-22-2020"]').click(); | ||
await page.locator('a[href*="/actions/upload-subsequent-documents/Medicaid SPA/CO-22-2020?origin=details"]').click(); | ||
}); | ||
|
||
test.describe("UI - Validation", () => { | ||
test.describe("Breadcrumbs", () => { | ||
test("should displays breadcrumb elements", async({ page }) => { | ||
// need a better selector | ||
await expect(page.locator("#root > div > main > div:nth-child(2) > nav")).toBeVisible(); | ||
await expect(page.locator("#root > div > main > div:nth-child(2) > nav")).toHaveText("DashboardCO-22-2020New Subsequent Documentation"); | ||
}); | ||
}); | ||
|
||
test.describe("Form Elements", () => { | ||
test("Detail Section", async({ page }) => { | ||
await expect(page.getByTestId("detail-section")).toBeVisible(); | ||
|
||
await expect(page.getByTestId("detail-section-title")).toBeVisible(); | ||
await expect(page.getByTestId("detail-section-title")).toHaveText("Medicaid SPA Subsequent Documents Details"); | ||
|
||
await expect(page.getByTestId("detail-section-child")).toBeVisible(); | ||
// await expect(page.getByTestId("detail-section-child")).toHaveText(); needs more detailed selectors to validate text | ||
}); | ||
|
||
test("Document Section", async({ page }) => { | ||
await expect(page.getByTestId("attachment-section")).toBeVisible(); | ||
|
||
await expect(page.getByTestId("attachment-section-title")).toBeVisible(); | ||
await expect(page.getByTestId("attachment-section-title")).toHaveText("Subsequent Medicaid SPA Documents *"); | ||
|
||
await expect(page.getByTestId("attachment-section-child")).toBeVisible(); | ||
await expect(page.getByTestId("attachments-instructions")).toBeVisible(); | ||
await expect(page.getByTestId("attachments-instructions")).toHaveText("Maximum file size of 80 MB per attachment. You can add multiple files per attachment type. Read the description for each of the attachment types on the FAQ Page."); | ||
await expect(page.getByTestId("accepted-files")).toBeVisible(); | ||
await expect(page.getByTestId("accepted-files")).toHaveText("We accept the following file formats: .doc, .docx, .pdf, .jpg, .xlsx, and more. See the full list."); | ||
|
||
await expect(page.getByTestId("cmsForm179-label")).toBeVisible(); | ||
await expect(page.getByTestId("cmsForm179-label")).toHaveText("CMS Form 179"); | ||
|
||
// TODO: Extend to all labels | ||
}); | ||
|
||
test("Reason Section", async({ page }) => { | ||
await expect(page.getByTestId("additional-info")).toBeVisible(); | ||
|
||
await expect(page.getByTestId("additional-info-title")).toBeVisible(); | ||
await expect(page.getByTestId("additional-info-title")).toHaveText("Reason for subsequent documents *"); | ||
|
||
await expect(page.getByTestId("additional-info-child")).toBeVisible(); | ||
}); | ||
}); | ||
}); | ||
|
||
test.describe.skip("Navigation", () => {}); |