REFACTOR: Move app-events:main to service:app-events (#8152)
AppEvents was always a service object in disguise, so we should move it to the correct place in the application. Doing this allows other service objects to inject it easily without container access. In the future we should also deprecate `this.appEvents` without an explicit injection too.
This commit is contained in:
@@ -704,7 +704,7 @@ testCase("replace-text event by default", async function(assert) {
|
||||
this.set("value", "red green blue");
|
||||
|
||||
await this.container
|
||||
.lookup("app-events:main")
|
||||
.lookup("service:app-events")
|
||||
.trigger("composer:replace-text", "green", "yellow");
|
||||
|
||||
assert.equal(this.value, "red green blue");
|
||||
@@ -714,7 +714,7 @@ composerTestCase("replace-text event for composer", async function(assert) {
|
||||
this.set("value", "red green blue");
|
||||
|
||||
await this.container
|
||||
.lookup("app-events:main")
|
||||
.lookup("service:app-events")
|
||||
.trigger("composer:replace-text", "green", "yellow");
|
||||
|
||||
assert.equal(this.value, "red yellow blue");
|
||||
@@ -800,7 +800,7 @@ composerTestCase("replace-text event for composer", async function(assert) {
|
||||
setTextareaSelection(textarea, start, start + len);
|
||||
|
||||
this.container
|
||||
.lookup("app-events:main")
|
||||
.lookup("service:app-events")
|
||||
.trigger("composer:replace-text", "green", "yellow", { forceFocus: true });
|
||||
|
||||
Ember.run.next(() => {
|
||||
|
||||
Reference in New Issue
Block a user