FEATURE: Configure poll 'public' default via site setting (#24348)

Followup to 7e37e3e82409ffa59b9720c132e1bba7b02874a3
This commit is contained in:
David Taylor
2023-11-13 18:54:21 +00:00
committed by GitHub
parent 797da5870b
commit f395130429
4 changed files with 26 additions and 1 deletions

View File

@ -211,4 +211,22 @@ module("Poll | Component | poll-ui-builder", function (hooks) {
);
await resultVisibility.collapse();
});
test("default public value can be controlled with site setting", async function (assert) {
this.siteSettings.poll_default_public = false;
const results = await setupBuilder(this);
await fillIn(".poll-option-value input", "a");
await click(".poll-option-add");
await fillIn(".poll-option-value:nth-of-type(2) input", "b");
await click(".insert-poll");
assert.strictEqual(
results[results.length - 1],
"[poll type=regular results=always public=false chartType=bar]\n* a\n* b\n[/poll]\n",
"can be set to private boolean"
);
});
});