DEV: Ember linting - disallow Ember.* variable usage (#8782)

This commit is contained in:
Mark VanLandingham
2020-02-05 10:14:42 -06:00
committed by GitHub
parent 88779d849f
commit 499b57a9ed
31 changed files with 97 additions and 49 deletions

View File

@ -5,6 +5,7 @@ import {
NO_CATEGORIES_ID,
ALL_CATEGORIES_ID
} from "select-kit/components/category-drop";
import { set } from "@ember/object";
testSelectKitModule("category-drop");
@ -82,8 +83,8 @@ componentTest("[not staff - TL0] displayCategoryDescription", {
template: template(),
beforeEach() {
Ember.set(this.currentUser, "staff", false);
Ember.set(this.currentUser, "trustLevel", 0);
set(this.currentUser, "staff", false);
set(this.currentUser, "trustLevel", 0);
initCategories(this);
},
@ -103,8 +104,8 @@ componentTest("[not staff - TL1] displayCategoryDescription", {
template: template(),
beforeEach() {
Ember.set(this.currentUser, "staff", false);
Ember.set(this.currentUser, "trustLevel", 1);
set(this.currentUser, "staff", false);
set(this.currentUser, "trustLevel", 1);
initCategories(this);
},
@ -124,8 +125,8 @@ componentTest("[staff - TL0] displayCategoryDescription", {
template: template(),
beforeEach() {
Ember.set(this.currentUser, "staff", true);
Ember.set(this.currentUser, "trustLevel", 0);
set(this.currentUser, "staff", true);
set(this.currentUser, "trustLevel", 0);
initCategories(this);
},

View File

@ -1,11 +1,12 @@
import componentTest from "helpers/component-test";
import { testSelectKitModule } from "./select-kit-test-helper";
import Site from "discourse/models/site";
import { set } from "@ember/object";
testSelectKitModule("tag-drop", {
beforeEach() {
const site = Site.current();
Ember.set(site, "top_tags", ["jeff", "neil", "arpit", "régis"]);
set(site, "top_tags", ["jeff", "neil", "arpit", "régis"]);
const response = object => {
return [200, { "Content-Type": "application/json" }, object];