From e2904bd99457d888ef39c281bb46d74c2bf3b8aa Mon Sep 17 00:00:00 2001 From: Stefan Penner Date: Mon, 23 Aug 2021 12:52:22 -0600 Subject: [PATCH] [FIX] This fixes ember-canary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ember-canary requires `template` + `environment` be provided to the view. This seems like a reasonable change, but does require “low level” libraries such as `@ember/test-helpers` to make some changes. (Ember PR https://github.com/emberjs/ember.js/pull/19680) --- .../@ember/test-helpers/setup-rendering-context.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/addon-test-support/@ember/test-helpers/setup-rendering-context.ts b/addon-test-support/@ember/test-helpers/setup-rendering-context.ts index 87c557603..82fcf7f80 100644 --- a/addon-test-support/@ember/test-helpers/setup-rendering-context.ts +++ b/addon-test-support/@ember/test-helpers/setup-rendering-context.ts @@ -263,7 +263,14 @@ export default function setupRenderingContext( let OutletView = owner.factoryFor ? owner.factoryFor('view:-outlet') : owner._lookupFactory!('view:-outlet'); - let toplevelView = OutletView.create(); + + let environment = owner.lookup('-environment:main'); + let template = owner.lookup('template:-outlet'); + + let toplevelView = OutletView.create({ + template, + environment, + }); owner.register('-top-level-view:main', { create() {