Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright tests spa #845

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions test/e2e/tests/home/appendixKamendment.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { test } from "@playwright/test";
//import { HomePage, LoginPage } from "pages";

test.describe.skip("Form Submission", async () => {
// comment this out until we need it
// test.beforeAll();
test("Create and submit an Appendix K Amendment Waiver", () => {});

test.beforeAll(async () => {

});
test("Create and submit an Appendix K Amendment Waiver", () => { });
});
41 changes: 37 additions & 4 deletions test/e2e/tests/home/chipspa.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
import { test } from "@playwright/test";
//import { HomePage, LoginPage } from "pages";

test.describe.skip("Form Submission", async () => {
// comment this out until we need it
// test.beforeAll();
test("Create and submit a CHIP SPA", () => {});
test.describe("Form Submission", async () => {

test("Create and submit a CHIP SPA", async ({ page }) => {

/* Dashboard */
// Select New Submission on the Dashboard page.
// Select State Plan Amendment (SPA) on the Submission Type page.
// Select CHIP SPA on the SPA Type page.
// Select All Other CHIP SPA Submissions for CHIP SPA Type.
// This should take the user to the CHIP SPA Details page.
await page.goto("https://mako-val.cms.gov/dashboard");
await page.getByRole("button", { name: "New Submission" }).click();
await page.getByText("State Plan Amendment (SPA)").click();
await page.getByText("CHIP SPA").click();
await page.getByText("All Other CHIP SPA Submissions").click();

/* CHIP SPA Details */
// Enter the SPA ID in the following formats: SS-YY-NNNN, SS-YY-NNNN-XXXX where SS is the state and YY is the current year.
// Enter the Proposed Effective Date of CHIP SPA. Default date is the date of SPA creation.
await page.getByRole("textbox", { name: "SPA ID" }).fill("MD-24-NNNN");
await page.getByRole("button", { name: "Proposed Effective Date of CHIP SPA" }).click();

/* Attachments */
// Generate a sample Current State Plan file and attach it to the Current State Plan field.
// Generate a sample Amended State Plan file and attach it to the Amended State Plan field.
// Generate a sample Cover Letter file and attach it to the Cover Letter field.
await page.getByText("choose from folder").click();
await page.getByText("choose from folder").click();
await page.getByText("choose from folder").click();

/* Submission */
// Click Submit. The user should then be returned to the Dashboard page.
// Verify the submission of the SPA by searching for the newly created SPA using the Dashboard.
// Confirm that a search of the newly-created SPA opens a Package Details page of the CHIP SPA.
await page.getByRole("button", { name: "Submit" }).click();
});
});
41 changes: 37 additions & 4 deletions test/e2e/tests/home/medicaidspa.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,40 @@
import { test } from "@playwright/test";
//import { HomePage, LoginPage } from "pages";

test.describe.skip("Form Submission", async () => {
// comment this out until we need it
// test.beforeAll();
test("Create and submit a Medicaid SPA", () => {});
test.describe("Form Submission", async () => {

test("Create and submit a Medicaid SPA", async ({ page }) => {

/* Dashboard */
// Select New Submission on the Dashboard page.
// Select State Plan Amendment (SPA) on the Submission Type page.
// Select Medicaid SPA on the SPA Type page.
// Select All Other Medicaid SPA Submissions for Medicaid SPA Type.
// This should take the user to the Medicaid SPA Details page.
// Navigate to the Dashboard and click on "New Submission" Button. Convert to Page object in the future.
await page.goto("https://mako-dev.cms.gov");
await page.getByText("New Submission").click();
await page.getByRole('heading', { name: "State Plan Amendment (SPA)" }).click();
await page.getByRole('heading', { name: "Medicaid SPA" }).click();
await page.getByRole('heading', { name: "All Other Medicaid SPA Submissions" }).click();

/* Medicaid SPA Details */
// Enter the SPA ID in the following formats: SS-YY-NNNN, SS-YY-NNNN-XXXX where SS is the state and YY is the current year.
// Enter the Proposed Effective Date of Medicaid SPA. Default date is the date of SPA creation.
await page.getByRole("textbox", { name: "SPA ID" }).fill("MD-24-NNNN");
await page.getByRole("button", { name: "Proposed Effective Date of Medicaid SPA" }).click();

/* Attachments */
// Generate a sample CMS Form 179 file and attach it to the CMS Form 179 field.
// Generate a sample SPA Pages file and attach it to the SPA Pages field.
await page.getByText("choose from folder").click();;
await page.getByText("choose from folder").click();

/* Submission */
// Click Submit. The user should then be returned to the Dashboard page.
// Verify the submission of the SPA by searching for the newly created SPA using the Dashboard.
// Confirm that a search of the newly-created SPA opens a Package Details page of the Medicaid SPA.
await page.getByRole("button", { name: "Submit" }).click();

});
});
Loading