Test method for site categories random order fix

This commit is contained in:
Vinoth Kannan 2018-07-31 01:36:37 +05:30
parent c1e62808ed
commit b852275ced

View File

@ -148,6 +148,13 @@ widgetTest("top categories - anonymous", {
const maximum =
count <= maxCategoriesToDisplay ? count : maxCategoriesToDisplay;
assert.equal(find(".category-link").length, maximum);
assert.equal(
find(".category-link .category-name").text(),
categoriesByCount
.slice(0, maxCategoriesToDisplay)
.map(c => c.name)
.join("")
);
}
});