FIX: Toggling categories was requiring two clicks (#134)
This commit is contained in:
parent
d4ecda50ff
commit
c2f27d1e3b
|
@ -292,7 +292,7 @@ export default Controller.extend({
|
|||
@action
|
||||
updateSelectedCategories(category) {
|
||||
const filterCategories =
|
||||
category.id === this.filterCategories ? null : category.id;
|
||||
category.id === parseInt(this.filterCategories, 10) ? null : category.id;
|
||||
this.setProperties({
|
||||
filterCategories,
|
||||
selectedTopic: null,
|
||||
|
|
|
@ -63,6 +63,13 @@ acceptance("Docs", function (needs) {
|
|||
|
||||
await click(".docs-item.docs-category");
|
||||
assert.equal(count(".docs-category.selected"), 1);
|
||||
|
||||
await click(".docs-item.docs-category");
|
||||
assert.equal(
|
||||
count(".docs-category.selected"),
|
||||
0,
|
||||
"clicking again deselects"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue