chore: 🤖 deprecate window object service (#1652)

* chore: 🤖 deprecate window object service

Deprecate `browser-object` service in favor of `ember-browser-services`

✅ Closes: ICU-7152

* refactor: 💡 cluster-url test fail

commit with cluster-url test failing

✅ Closes: ICU-7152

* refactor: 💡 refactor test to reflect changes

Refactor test to reflect `browser/window` service in `cluster-url` route

✅ Closes: ICU-7152

* refactor: 💡 refactor cluster url test

change logic of mockIPC to a function call

✅ Closes: ICU-7152
This commit is contained in:
Devon Anderson authored and GitHub committed 2023-03-07 16:55:24 -05:00
1 parent 0a76111944
commit 3ba53dfc2e
8 files changed
+27 -104

No files matched your search

+1 -12
View File
@@ -5,7 +5,6 @@
import Route from '@ember/routing/route';
import { inject as service } from '@ember/service';
import { getOwner } from '@ember/application';
import { action } from '@ember/object';
import { loading } from 'ember-loading';
import config from '../config/environment';
@@ -19,6 +18,7 @@ export default class ClusterUrlRoute extends Route {
@service intl;
@service flashMessages;
@service router;
@service('browser/window') window;
// =attributes
@@ -29,17 +29,6 @@ export default class ClusterUrlRoute extends Route {
return this.store.adapterFor('application');
}
/**
* Looks up the window object indirectly.
* @type {Window}
*/
get window() {
// The Ember way of accessing globals...
const document = getOwner(this).lookup('service:-document').documentElement;
// defaultView === window, but without using globals directly
return document.parentNode.defaultView;
}
// =methods
/**