2018-09-25 16:28:26 +00:00
|
|
|
import { run } from '@ember/runloop';
|
|
|
|
import { registerAsyncHelper } from '@ember/test';
|
2018-04-03 14:16:57 +00:00
|
|
|
|
2018-09-25 16:28:26 +00:00
|
|
|
export function pollCluster(owner) {
|
|
|
|
const clusterRoute = owner.lookup('route:vault/cluster');
|
|
|
|
return run(() => {
|
2018-04-03 14:16:57 +00:00
|
|
|
return clusterRoute.controller.model.reload();
|
|
|
|
});
|
2018-09-25 16:28:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
registerAsyncHelper('pollCluster', function(app) {
|
|
|
|
pollCluster(app.__container__);
|
2018-04-03 14:16:57 +00:00
|
|
|
});
|