DEV: reduces memory footprint of tests - step 1 (#7591)

DEV: reduces memory footprint of tests - step 1 (#7591)

diff --git a/app/assets/javascripts/admin/controllers/admin-backups-logs.js.es6 b/app/assets/javascripts/admin/controllers/admin-backups-logs.js.es6
index ee2fd2f..40bad8a 100644
--- a/app/assets/javascripts/admin/controllers/admin-backups-logs.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-backups-logs.js.es6
@@ -1,5 +1,10 @@
 export default Ember.Controller.extend({
-  logs: [],
   adminBackups: Ember.inject.controller(),
-  status: Ember.computed.alias("adminBackups.model")
+  status: Ember.computed.alias("adminBackups.model"),
+
+  init() {
+    this._super(...arguments);
+
+    this.logs = [];
+  }
 });
diff --git a/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6 b/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6
index 6fe215c..7bf7659 100644
--- a/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-customize-email-templates.js.es6
@@ -1,6 +1,10 @@
 export default Ember.Controller.extend({
-  titleSorting: ["title"],
   emailTemplates: null,
+  sortedTemplates: Ember.computed.sort("emailTemplates", "titleSorting"),
 
-  sortedTemplates: Ember.computed.sort("emailTemplates", "titleSorting")
+  init() {
+    this._super(...arguments);
+
+    this.titleSorting = ["title"];
+  }
 });
diff --git a/app/assets/javascripts/admin/controllers/admin-emojis.js.es6 b/app/assets/javascripts/admin/controllers/admin-emojis.js.es6
index 4d7d8d2..d110904 100644
--- a/app/assets/javascripts/admin/controllers/admin-emojis.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-emojis.js.es6
@@ -1,7 +1,12 @@
 import { ajax } from "discourse/lib/ajax";
 export default Ember.Controller.extend({
   sortedEmojis: Ember.computed.sort("model", "emojiSorting"),
-  emojiSorting: ["name"],
+
+  init() {
+    this._super(...arguments);
+
+    this.emojiSorting = ["name"];
+  },
 
   actions: {
     emojiUploaded(emoji) {
diff --git a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6 b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6
index f13ac51..b17b5a2 100644
--- a/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-logs-staff-action-logs.js.es6
@@ -6,10 +6,14 @@ import computed from "ember-addons/ember-computed-decorators";
 export default Ember.Controller.extend({
   loading: false,
   filters: null,
-  userHistoryActions: [],
-
   filtersExists: Ember.computed.gt("filterCount", 0),
 
+  init() {
+    this._super(...arguments);
+
+    this.userHistoryActions = [];
+  },
+
   filterActionIdChanged: function() {
     const filterActionId = this.filterActionId;
     if (filterActionId) {
diff --git a/app/assets/javascripts/admin/controllers/admin-search-logs-index.js.es6 b/app/assets/javascripts/admin/controllers/admin-search-logs-index.js.es6
index ccc44c5..5c26cb0 100644
--- a/app/assets/javascripts/admin/controllers/admin-search-logs-index.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-search-logs-index.js.es6
@@ -5,12 +5,19 @@ export default Ember.Controller.extend({
   period: DEFAULT_PERIOD,
   searchType: "all",
 
-  searchTypeOptions: [
-    {
-      id: "all",
-      name: I18n.t("admin.logs.search_logs.types.all_search_types")
-    },
-    { id: "header", name: I18n.t("admin.logs.search_logs.types.header") },
-    { id: "full_page", name: I18n.t("admin.logs.search_logs.types.full_page") }
-  ]
+  init() {
+    this._super(...arguments);
+
+    this.searchTypeOptions = [
+      {
+        id: "all",
+        name: I18n.t("admin.logs.search_logs.types.all_search_types")
+      },
+      { id: "header", name: I18n.t("admin.logs.search_logs.types.header") },
+      {
+        id: "full_page",
+        name: I18n.t("admin.logs.search_logs.types.full_page")
+      }
+    ];
+  }
 });
diff --git a/app/assets/javascripts/admin/controllers/admin-search-logs-term.js.es6 b/app/assets/javascripts/admin/controllers/admin-search-logs-term.js.es6
index 9b8a5f7..229aa67 100644
--- a/app/assets/javascripts/admin/controllers/admin-search-logs-term.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-search-logs-term.js.es6
@@ -6,16 +6,23 @@ export default Ember.Controller.extend({
   period: DEFAULT_PERIOD,
   searchType: "all",
 
-  searchTypeOptions: [
-    {
-      id: "all",
-      name: I18n.t("admin.logs.search_logs.types.all_search_types")
-    },
-    { id: "header", name: I18n.t("admin.logs.search_logs.types.header") },
-    { id: "full_page", name: I18n.t("admin.logs.search_logs.types.full_page") },
-    {
-      id: "click_through_only",
-      name: I18n.t("admin.logs.search_logs.types.click_through_only")
-    }
-  ]
+  init() {
+    this._super(...arguments);
+
+    this.searchTypeOptions = [
+      {
+        id: "all",
+        name: I18n.t("admin.logs.search_logs.types.all_search_types")
+      },
+      { id: "header", name: I18n.t("admin.logs.search_logs.types.header") },
+      {
+        id: "full_page",
+        name: I18n.t("admin.logs.search_logs.types.full_page")
+      },
+      {
+        id: "click_through_only",
+        name: I18n.t("admin.logs.search_logs.types.click_through_only")
+      }
+    ];
+  }
 });
diff --git a/app/assets/javascripts/admin/controllers/admin-user-badges.js.es6 b/app/assets/javascripts/admin/controllers/admin-user-badges.js.es6
index 6b44749..d419cf9 100644
--- a/app/assets/javascripts/admin/controllers/admin-user-badges.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-user-badges.js.es6
@@ -7,9 +7,13 @@ export default Ember.Controller.extend(GrantBadgeController, {
   user: Ember.computed.alias("adminUser.model"),
   userBadges: Ember.computed.alias("model"),
   allBadges: Ember.computed.alias("badges"),
-
   sortedBadges: Ember.computed.sort("model", "badgeSortOrder"),
-  badgeSortOrder: ["granted_at:desc"],
+
+  init() {
+    this._super(...arguments);
+
+    this.badgeSortOrder = ["granted_at:desc"];
+  },
 
   @computed("model", "model.[]", "model.expandedBadges.[]")
   groupedBadges() {
diff --git a/app/assets/javascripts/admin/controllers/admin-user-fields.js.es6 b/app/assets/javascripts/admin/controllers/admin-user-fields.js.es6
index 012b91c..7d2a6b3 100644
--- a/app/assets/javascripts/admin/controllers/admin-user-fields.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-user-fields.js.es6
@@ -5,10 +5,14 @@ const MAX_FIELDS = 20;
 export default Ember.Controller.extend({
   fieldTypes: null,
   createDisabled: Ember.computed.gte("model.length", MAX_FIELDS),
-
-  fieldSortOrder: ["position"],
   sortedFields: Ember.computed.sort("model", "fieldSortOrder"),
 
+  init() {
+    this._super(...arguments);
+
+    this.fieldSortOrder = ["position"];
+  },
+
   actions: {
     createField() {
       const f = this.store.createRecord("user-field", {
diff --git a/app/assets/javascripts/admin/controllers/admin-web-hooks-show-events.js.es6 b/app/assets/javascripts/admin/controllers/admin-web-hooks-show-events.js.es6
index d8c233d..388fab3 100644
--- a/app/assets/javascripts/admin/controllers/admin-web-hooks-show-events.js.es6
+++ b/app/assets/javascripts/admin/controllers/admin-web-hooks-show-events.js.es6
@@ -4,9 +4,14 @@ import computed from "ember-addons/ember-computed-decorators";
 
 export default Ember.Controller.extend({
   pingDisabled: false,
-  incomingEventIds: [],
   incomingCount: Ember.computed.alias("incomingEventIds.length"),
 
+  init() {
+    this._super(...arguments);
+
+    this.incomingEventIds = [];
+  },
+
   @computed("incomingCount")
   hasIncoming(incomingCount) {
     return incomingCount > 0;
diff --git a/app/assets/javascripts/admin/controllers/modals/admin-install-theme.js.es6 b/app/assets/javascripts/admin/controllers/modals/admin-install-theme.js.es6
index 562bf40..15688a1 100644
--- a/app/assets/javascripts/admin/controllers/modals/admin-install-theme.js.es6

[... diff too long, it was truncated ...]

GitHub sha: 6decdfce