FIX: Select+below will ask server for post ids on megatopics.

This commit is contained in:
Guo Xiang Tan
2018-06-28 14:54:54 +08:00
parent c722b07057
commit 711371e8c8
6 changed files with 155 additions and 12 deletions

View File

@ -264,3 +264,26 @@ QUnit.test("selecting posts", async assert => {
"it should hide the multi select menu"
);
});
QUnit.test("select below", async assert => {
await visit("/t/internationalization-localization/280");
await click(".toggle-admin-menu");
await click(".topic-admin-multi-select .btn");
await click("#post_3 .select-below");
assert.ok(
find(".selected-posts")
.html()
.includes(I18n.t("topic.multi_select.description", { count: 18 })),
"it should select the right number of posts"
);
await click("#post_2 .select-below");
assert.ok(
find(".selected-posts")
.html()
.includes(I18n.t("topic.multi_select.description", { count: 19 })),
"it should select the right number of posts"
);
});