mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 13:51:09 +08:00
UX: Improve poll builder UI (#12549)
* Improve poll validation * Redesign poll builder * Group all advanced settings under a new section
This commit is contained in:
@ -1,12 +1,10 @@
|
||||
import {
|
||||
acceptance,
|
||||
exists,
|
||||
queryAll,
|
||||
updateCurrentUser,
|
||||
} from "discourse/tests/helpers/qunit-helpers";
|
||||
import { clearPopupMenuOptionsCallback } from "discourse/controllers/composer";
|
||||
import { displayPollBuilderButton } from "discourse/plugins/poll/helpers/display-poll-builder-button";
|
||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||
|
||||
acceptance("Poll Builder - polls are enabled", function (needs) {
|
||||
needs.user();
|
||||
@ -48,22 +46,4 @@ acceptance("Poll Builder - polls are enabled", function (needs) {
|
||||
"it shows the builder button"
|
||||
);
|
||||
});
|
||||
|
||||
test("poll preview", async function (assert) {
|
||||
await displayPollBuilderButton();
|
||||
|
||||
const popupMenu = selectKit(".toolbar-popup-menu-options");
|
||||
await popupMenu.selectRowByValue("showPollBuilder");
|
||||
|
||||
await fillIn(".poll-textarea textarea", "First option\nSecond option");
|
||||
|
||||
assert.equal(
|
||||
queryAll(".d-editor-preview li:first-child").text(),
|
||||
"First option"
|
||||
);
|
||||
assert.equal(
|
||||
queryAll(".d-editor-preview li:last-child").text(),
|
||||
"Second option"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user