1
0
Fork 0

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