0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

DEV: Add admin manager destroy test

Dieser Commit ist enthalten in:
jumagura 2023-05-11 04:00:46 -04:00
Ursprung 887057d0d2
Commit c83e514de9

Datei anzeigen

@ -23,6 +23,15 @@ acceptance("Admin | Manager", function (needs) {
server.get("/admin/wizards/wizard", () => {
return helper.response(getWizard);
});
server.delete("/admin/wizards/manager/destroy", () => {
return helper.response({
success: "OK",
destroyed: [
{ id: "this_is_testing_wizard", name: "This is testing wizard" },
],
failures: [],
});
});
});
test("viewing manager fields content", async (assert) => {
await visit("/admin/wizards/manager");
@ -68,10 +77,10 @@ acceptance("Admin | Manager", function (needs) {
!destroyButton.hasAttribute("disabled"),
"the destroy button is enabled when destroy checkbox is clicked"
);
await click(destroyCheck);
assert.ok(
destroyButton.hasAttribute("disabled"),
"the destroy button is disabled when destroy checkbox is unchecked"
await click("#destroy-button");
assert.notOk(
find('table tr[data-wizard-id="this-is-testing-wizard"]'),
"the wizard row is removed after destroy button is clicked"
);
});
});