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

DEV: Test available serializer fields for each class

Dieser Commit ist enthalten in:
jumagura 2023-05-09 01:21:47 -04:00
Ursprung 0c08b5c044
Commit d0459575e0

Datei anzeigen

@ -98,4 +98,41 @@ acceptance("Admin | Custom Fields Unsuscribed", function (needs) {
"There is one disabled option for type"
);
});
test("change custom fields for unsubscribed plan", async (assert) => {
await visit("/admin/wizards/custom-fields");
await click(".admin-wizard-controls .btn-icon-text");
const dropdown1 = selectKit(
'.admin-wizard-container details:has(summary[name="Filter by: Select a class"])'
);
await dropdown1.expand();
await click('.select-kit-collection li[data-value="topic"]');
const serializerDropdown = selectKit(
".admin-wizard-container details.multi-select"
);
await serializerDropdown.expand();
let enabledOptions1 = findAll(
".admin-wizard-container details.multi-select ul li"
);
assert.equal(
enabledOptions1.length,
2,
"There are two enabled options in the serializer dropdown for Topic"
);
await serializerDropdown.collapse();
const dropdown2 = selectKit(
'.admin-wizard-container details:has(summary[name="Filter by: Topic"])'
);
await dropdown2.expand();
await click('.select-kit-collection li[data-value="post"]');
await serializerDropdown.expand();
let enabledOptions2 = findAll(
".admin-wizard-container details.multi-select ul li"
);
assert.equal(
enabledOptions2.length,
1,
"There is one enabled option in the serializer dropdown for Post"
);
});
});