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

Separate archive and unarchive tests #12015

Merged
merged 1 commit into from
Jan 22, 2025
Merged
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
21 changes: 17 additions & 4 deletions tests/cypress/e2e/mcpar/dashboard.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const adminSelectorArray = [
];

describe("Admin Archiving", () => {
it("Admin users can archive/unarchive reports", () => {
it("Admin users can archive reports", () => {
cy.authenticate("adminUser");

fillFormField(adminSelectorArray);
Expand All @@ -82,13 +82,26 @@ describe("Admin Archiving", () => {
}).should("be.visible");

cy.get('button:contains("Archive")').last().click();
cy.wait(500);
cy.get('button:contains("Unarchive")').should("be.visible");
});

it("Admin users can unarchive reports", () => {
cy.authenticate("adminUser");

fillFormField(adminSelectorArray);
cy.contains("Go to Report Dashboard").click();

// cannot create reports
cy.contains("Add / copy a MCPAR").should("not.exist");

cy.contains(`Edited Program - ${currentDate}`, {
matchCase: true,
}).should("be.visible");

cy.get('button:contains("Unarchive")').last().click();
cy.wait(500);
cy.get('button:contains("Archive")').should("be.visible");

cy.get('button:contains("Archive")').last().click();
cy.get('button:contains("Unarchive")').should("be.visible");
});
});

Expand Down
Loading