Skip to content

Commit

Permalink
e2e test for deleted unavailable mod
Browse files Browse the repository at this point in the history
  • Loading branch information
fungairino committed Sep 20, 2024
1 parent f233dd5 commit cb201de
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 0 additions & 2 deletions end-to-end-tests/pageObjects/pageEditor/pageEditorPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,6 @@ export class PageEditorPage extends BasePageObject {
const createModModal = new CreateModModal(this.getByRole("dialog"));
const modId = await createModModal.createMod(modName, modUuid);

this.savedPackageModIds.push(modId);

return { modName, modId };
}

Expand Down
14 changes: 14 additions & 0 deletions end-to-end-tests/tests/modLifecycle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,18 @@ test("create, run, package, and update mod", async ({
"Created through Playwright Automation",
);
});

await test.step("Delete the mod in the Workshop", async () => {
const workshopPage = new WorkshopPage(newPage!, extensionId);
await workshopPage.goto();
await workshopPage.deletePackagedModByModId(modId);

const modsPage = new ModsPage(newPage!, extensionId);
await modsPage.goto();

await modsPage.viewActiveMods();
const modTableItem = modsPage.modTableItemById(modId);
await expect(modTableItem.getByText("Active")).toBeVisible();
await expect(modTableItem.getByText("No longer Available")).toBeVisible();
});
});

0 comments on commit cb201de

Please sign in to comment.