From a0c6f1b2b48bbd24f066851e43cad2c5a33c8cb5 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 20 Jul 2020 14:39:42 -0400 Subject: [PATCH] FIX: `category-drop` tests were broken and overwriting CPs --- .../select-kit/category-drop-test.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/test/javascripts/components/select-kit/category-drop-test.js b/test/javascripts/components/select-kit/category-drop-test.js index 38c32aa85c7..4bf28b93c59 100644 --- a/test/javascripts/components/select-kit/category-drop-test.js +++ b/test/javascripts/components/select-kit/category-drop-test.js @@ -86,7 +86,7 @@ componentTest("[not staff - TL0] displayCategoryDescription", { beforeEach() { set(this.currentUser, "staff", false); - set(this.currentUser, "trustLevel", 0); + set(this.currentUser, "trust_level", 0); initCategories(this); }, @@ -106,9 +106,9 @@ componentTest("[not staff - TL1] displayCategoryDescription", { template: template(), beforeEach() { - set(this.currentUser, "staff", false); - set(this.currentUser, "trustLevel", 1); - + set(this.currentUser, "moderator", false); + set(this.currentUser, "admin", false); + set(this.currentUser, "trust_level", 1); initCategories(this); }, @@ -117,8 +117,8 @@ componentTest("[not staff - TL1] displayCategoryDescription", { const row = this.subject.rowByValue(this.category.id); assert.ok( - exists(row.el().find(".category-desc")), - "it doesn't show category description for TL0+" + !exists(row.el().find(".category-desc")), + "it doesn't shows category description for TL0+" ); } }); @@ -127,8 +127,8 @@ componentTest("[staff - TL0] displayCategoryDescription", { template: template(), beforeEach() { - set(this.currentUser, "staff", true); - set(this.currentUser, "trustLevel", 0); + set(this.currentUser, "moderator", true); + set(this.currentUser, "trust_level", 0); initCategories(this); }, @@ -138,7 +138,7 @@ componentTest("[staff - TL0] displayCategoryDescription", { const row = this.subject.rowByValue(this.category.id); assert.ok( - exists(row.el().find(".category-desc")), + !exists(row.el().find(".category-desc")), "it doesn't show category description for staff" ); }