Skip to content

Commit

Permalink
CMDCT-3860: Playwright test for resubmit WP (#827)
Browse files Browse the repository at this point in the history
  • Loading branch information
jessabean authored Dec 18, 2024
1 parent bb1c252 commit 4e5c987
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const DashboardTable = ({
</Td>
{/* Admin: Submission count */}
{isAdmin && (
<Td>
<Td data-testid="dashboard-submission-count">
{!report.submissionCount || report.submissionCount === 0
? 1
: report.submissionCount}
Expand Down
14 changes: 14 additions & 0 deletions tests/e2e/wp/create.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,18 @@ test.describe("Creating a new Work Plan", () => {
await modal.getByRole("button", { name: "Return to dashboard" }).click();
await expect(unlockButton).toBeDisabled();
});

test("State user can resubmit a work plan", async () => {
await wpDashboard.goto();
await wpDashboard.firstReport.getByRole("button", { name: "Edit" }).click();
await wpGeneralInformation.isReady();
await wpReviewAndSubmit.goto();
await expect(wpReviewAndSubmit.submitButton).toBeEnabled();
await wpReviewAndSubmit.submitButton.click();
await wpReviewAndSubmit.confirmSubmit();
await adminWpDashboard.goto();
await expect(
adminWpDashboard.page.getByTestId("dashboard-submission-count")
).toContainText("2");
});
});

0 comments on commit 4e5c987

Please sign in to comment.