diff --git a/packages/@ember/-internals/extension-support/tests/container_debug_adapter_test.js b/packages/@ember/-internals/extension-support/tests/container_debug_adapter_test.js
index 8043421051b..ca727c19f7b 100644
--- a/packages/@ember/-internals/extension-support/tests/container_debug_adapter_test.js
+++ b/packages/@ember/-internals/extension-support/tests/container_debug_adapter_test.js
@@ -12,6 +12,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor() {
setDebugFunction('debug', () => {});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
super();
this.adapter = this.application.__deprecatedInstance__.lookup('container-debug-adapter:main');
}
diff --git a/packages/@ember/-internals/extension-support/tests/data_adapter_test.js b/packages/@ember/-internals/extension-support/tests/data_adapter_test.js
index 9dabc566616..7f8cc8975f7 100644
--- a/packages/@ember/-internals/extension-support/tests/data_adapter_test.js
+++ b/packages/@ember/-internals/extension-support/tests/data_adapter_test.js
@@ -29,6 +29,11 @@ const DataAdapter = EmberDataAdapter.extend({
moduleFor(
'Data Adapter',
class extends ApplicationTestCase {
+ constructor() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ super();
+ }
+
teardown() {
super.teardown();
adapter = undefined;
diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/actions-test.js b/packages/@ember/-internals/glimmer/tests/integration/application/actions-test.js
index a0d3df9d997..df8dcf08509 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/application/actions-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/application/actions-test.js
@@ -12,6 +12,7 @@ moduleFor(
'Application test: actions',
class extends ApplicationTestCase {
constructor() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
setDebugFunction('debug', noop);
super(...arguments);
}
@@ -23,7 +24,7 @@ moduleFor(
['@test actions in top level template application template target application controller'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:application',
@@ -47,7 +48,7 @@ moduleFor(
}
['@test actions in nested outlet template target their controller'](assert) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:application',
diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts b/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts
index 0b7adb9c781..e2c6f38b71e 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts
+++ b/packages/@ember/-internals/glimmer/tests/integration/application/debug-render-tree-test.ts
@@ -57,6 +57,7 @@ if (ENV._DEBUG_RENDER_TREE) {
constructor() {
super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this._TEMPLATE_ONLY_GLIMMER_COMPONENTS = ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS;
ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = true;
}
diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/engine-test.js b/packages/@ember/-internals/glimmer/tests/integration/application/engine-test.js
index b0e8c891186..9f179ef1984 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/application/engine-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/application/engine-test.js
@@ -275,6 +275,7 @@ moduleFor(
expectDeprecation(
'Using {{attrs}} to reference named arguments has been deprecated. {{attrs.wat}} should be updated to {{@wat}}. (L1:C2) '
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.setupEngineWithAttrs([]);
@@ -284,7 +285,7 @@ moduleFor(
}
['@test sharing a template between engine and application has separate refinements']() {
- this.assert.expect(2);
+ this.assert.expect(3);
let sharedTemplate = compile(strip`
{{this.contextType}}
@@ -296,6 +297,7 @@ moduleFor(
expectDeprecation(
/The `[^`]+` property(?: path)? was used in a template for the `[^`]+` component without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{[^}]+}}/
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add('template:application', sharedTemplate);
this.add(
@@ -342,11 +344,12 @@ moduleFor(
}
['@test sharing a layout between engine and application has separate refinements']() {
- this.assert.expect(2);
+ this.assert.expect(3);
expectDeprecation(
/The `[^`]+` property(?: path)? was used in a template for the `[^`]+` component without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{[^}]+}}/
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let sharedLayout = compile(strip`
{{ambiguous-curlies}}
@@ -406,10 +409,12 @@ moduleFor(
['@test visit() with `shouldRender: true` returns a promise that resolves when application and engine templates have rendered'](
assert
) {
- assert.expect(2);
+ assert.expect(3);
let hooks = [];
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine(hooks);
return this.visit('/blog', { shouldRender: true }).then(() => {
@@ -450,10 +455,12 @@ moduleFor(
['@test visit() with `shouldRender: true` returns a promise that resolves when application and routeless engine templates have rendered'](
assert
) {
- assert.expect(2);
+ assert.expect(3);
let hooks = [];
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutelessEngine(hooks);
return this.visit('/', { shouldRender: true }).then(() => {
@@ -468,11 +475,12 @@ moduleFor(
}
['@test visit() with partials in routable engine'](assert) {
- assert.expect(3);
+ assert.expect(4);
expectDeprecation(
`The use of \`{{partial}}\` is deprecated, please refactor the "foo" partial to a component`
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let hooks = [];
@@ -490,11 +498,12 @@ moduleFor(
}
['@test visit() with partials in non-routable engine'](assert) {
- assert.expect(3);
+ assert.expect(4);
expectDeprecation(
`The use of \`{{partial}}\` is deprecated, please refactor the "foo" partial to a component`
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let hooks = [];
@@ -512,7 +521,9 @@ moduleFor(
}
['@test deactivate should be called on Engine Routes before destruction'](assert) {
- assert.expect(3);
+ assert.expect(4);
+
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.setupAppAndRoutableEngine();
@@ -543,6 +554,8 @@ moduleFor(
}
['@test engine should lookup and use correct controller']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
return this.visit('/blog?lang=English').then(() => {
@@ -551,10 +564,12 @@ moduleFor(
}
['@test error substate route works for the application route of an Engine'](assert) {
- assert.expect(2);
+ assert.expect(3);
let errorEntered = RSVP.defer();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register(
@@ -590,10 +605,12 @@ moduleFor(
}
['@test error route works for the application route of an Engine'](assert) {
- assert.expect(2);
+ assert.expect(3);
let errorEntered = RSVP.defer();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register(
@@ -629,10 +646,12 @@ moduleFor(
}
['@test error substate route works for a child route of an Engine'](assert) {
- assert.expect(2);
+ assert.expect(3);
let errorEntered = RSVP.defer();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register(
@@ -668,10 +687,12 @@ moduleFor(
}
['@test error route works for a child route of an Engine'](assert) {
- assert.expect(2);
+ assert.expect(3);
let errorEntered = RSVP.defer();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register(
@@ -707,12 +728,14 @@ moduleFor(
}
['@test loading substate route works for the application route of an Engine'](assert) {
- assert.expect(3);
+ assert.expect(4);
let done = assert.async();
let loadingEntered = RSVP.defer();
let resolveLoading = RSVP.defer();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register(
@@ -754,12 +777,14 @@ moduleFor(
}
['@test loading route works for the application route of an Engine'](assert) {
- assert.expect(3);
+ assert.expect(4);
let done = assert.async();
let loadingEntered = RSVP.defer();
let resolveLoading = RSVP.defer();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register(
@@ -801,10 +826,12 @@ moduleFor(
}
['@test loading substate route works for a child route of an Engine'](assert) {
- assert.expect(3);
+ assert.expect(4);
let resolveLoading;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register('template:post', compile('{{outlet}}'));
@@ -839,12 +866,14 @@ moduleFor(
}
['@test loading route works for a child route of an Engine'](assert) {
- assert.expect(3);
+ assert.expect(4);
let done = assert.async();
let loadingEntered = RSVP.defer();
let resolveLoading = RSVP.defer();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register('template:post', compile('{{outlet}}'));
@@ -888,10 +917,12 @@ moduleFor(
}
["@test query params don't have stickiness by default between model"](assert) {
- assert.expect(1);
+ assert.expect(2);
let tmpl = 'Category 1337';
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register('template:category', compile(tmpl));
@@ -907,10 +938,12 @@ moduleFor(
}
'@test query params only transitions work properly'(assert) {
- assert.expect(1);
+ assert.expect(2);
let tmpl = 'News';
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register('template:category', compile(tmpl));
@@ -928,9 +961,10 @@ moduleFor(
async ['@test query params in customized controllerName have stickiness by default between model'](
assert
) {
- assert.expect(2);
+ assert.expect(3);
let tmpl =
'Author 1337Author 1';
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.setupAppAndRoutableEngine();
this.additionalEngineRegistrations(function () {
this.register('template:author', compile(tmpl));
@@ -949,7 +983,7 @@ moduleFor(
}
['@test visit() routable engine which errors on init'](assert) {
- assert.expect(1);
+ assert.expect(2);
let hooks = [];
@@ -964,6 +998,8 @@ moduleFor(
);
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.setupAppAndRoutableEngine(hooks);
return this.visit('/', { shouldRender: true })
diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/helper-registration-test.js b/packages/@ember/-internals/glimmer/tests/integration/application/helper-registration-test.js
index deb0e45f838..8efc2a11ebf 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/application/helper-registration-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/application/helper-registration-test.js
@@ -7,6 +7,8 @@ moduleFor(
'Application Lifecycle - Helper Registration',
class extends ApplicationTestCase {
['@test Unbound dashed helpers registered on the container can be late-invoked'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('application', `
{{x-borf}} {{x-borf 'YES'}}
`);
let myHelper = helper((params) => params[0] || 'BORF');
@@ -22,6 +24,8 @@ moduleFor(
}
['@test Bound helpers registered on the container can be late-invoked'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'application',
`
{{x-reverse}} {{x-reverse this.foo}}
`
@@ -51,6 +55,8 @@ moduleFor(
}
['@test Undashed helpers registered on the container can be invoked'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'application',
`
{{omg}}|{{yorp 'boo'}}|{{yorp 'ya'}}
`
@@ -76,6 +82,8 @@ moduleFor(
}
['@test Helpers can receive injections'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('application', `
{{full-name}}
`);
let serviceCalled = false;
diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js b/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js
index 8b617405363..8e243da1c2d 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/application/hot-reload-test.js
@@ -100,6 +100,8 @@ moduleFor(
}
['@test hot reloading template-only components']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'application',
strip`
@@ -170,6 +172,8 @@ moduleFor(
}
['@test hot reloading class-based components']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'application',
strip`
diff --git a/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js b/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js
index 687cfdc252e..e7d75914e27 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/application/rendering-test.js
@@ -24,6 +24,8 @@ moduleFor(
['@test it can render the application template with a wrapper']() {
ENV._APPLICATION_TEMPLATE_WRAPPER = true;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('application', 'Hello world!');
return this.visit('/').then(() => {
@@ -34,6 +36,8 @@ moduleFor(
['@test it can render the application template without a wrapper']() {
ENV._APPLICATION_TEMPLATE_WRAPPER = false;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('application', 'Hello world!');
return this.visit('/').then(() => {
@@ -51,6 +55,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'application',
strip`
@@ -83,6 +89,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'application',
strip`
@@ -109,6 +117,7 @@ moduleFor(
expectDeprecation(
/The `[^`]+` property(?: path)? was used in a template for the `[^`]+` component without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{[^}]+}}/
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'route:application',
@@ -145,6 +154,7 @@ moduleFor(
expectDeprecation(
/The `[^`]+` property(?: path)? was used in a template for the `[^`]+` component without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{[^}]+}}/
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('color', { path: '/:color' });
@@ -206,6 +216,7 @@ moduleFor(
expectDeprecation(
/The `[^`]+` property(?: path)? was used in a template for the `[^`]+` component without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{[^}]+}}/
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
class Model {
@tracked color;
@@ -274,6 +285,7 @@ moduleFor(
expectDeprecation(
/The `[^`]+` property(?: path)? was used in a template for the `[^`]+` component without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{[^}]+}}/
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('color', { path: '/:color' });
@@ -335,6 +347,7 @@ moduleFor(
expectDeprecation(
/The `[^`]+` property(?: path)? was used in a template for the `[^`]+` component without using `this`. This fallback behavior has been deprecated, all properties must be looked up on `this` when used in the template: {{[^}]+}}/
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('color', { path: '/:color' });
@@ -417,6 +430,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'lists.colors.favorite',
strip`
@@ -444,6 +459,8 @@ moduleFor(
this.route('colors');
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate(
'application',
strip`
@@ -517,6 +534,8 @@ moduleFor(
});
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('a', 'A{{outlet}}');
this.addTemplate('b', 'B{{outlet}}');
this.addTemplate('b.c', 'C');
@@ -553,6 +572,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('color', 'color: {{@model}}');
return this.visit('/colors/red')
@@ -587,6 +608,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('a', '{{this.value}}');
this.addTemplate('b', '{{this.value}}');
@@ -630,6 +653,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('color', 'model color: {{@model.color}}, controller color: {{this.color}}');
return this.visit('/colors/red')
@@ -681,6 +706,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('common', '{{this.prefix}} {{@model}}');
return this.visit('/a')
@@ -700,6 +727,8 @@ moduleFor(
// I wish there was a way to assert that the OutletComponentManager did not
// receive a didCreateElement.
['@test a child outlet is always a fragment']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('application', '{{outlet}}');
this.addTemplate('index', '{{#if true}}1{{/if}}
2
');
return this.visit('/').then(() => {
@@ -723,6 +752,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('a', 'Hello from A!');
return this.visit('/').then(() => {
@@ -749,6 +780,8 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('routeWithError', 'Hi {{@model.name}} ');
let expectedBacktrackingMessage = backtrackingMessageFor('name', 'Person \\(Ben\\)', {
@@ -776,6 +809,8 @@ moduleFor(
this.route('second');
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
this.addTemplate('first', 'first');
this.addTemplate('second', '{{{undefined}}}second');
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-angle-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-angle-test.js
index ab8467d9007..eb16ed2238a 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-angle-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-angle-test.js
@@ -23,6 +23,7 @@ moduleFor(
bar: 'yes',
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
}
async ['@test it populates href with fully supplied query param values']() {
@@ -71,7 +72,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor(...args) {
super(...args);
-
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let indexProperties = {
foo: '123',
bar: 'abc',
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js
index 605a8c51c7e..fcf93fb5fac 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/query-params-curly-test.js
@@ -27,6 +27,7 @@ moduleFor(
}
async ['@test populates href with fully supplied query param values']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`{{#link-to route='index' query=(hash foo='456' bar='NAW')}}Index{{/link-to}}`
@@ -42,6 +43,7 @@ moduleFor(
}
async ['@test it populates href with fully supplied query param values, but without @route param']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`{{#link-to query=(hash foo='2' bar='NAW')}}QueryParams{{/link-to}}`
@@ -57,6 +59,7 @@ moduleFor(
}
async ['@test populates href with partially supplied query param values, but omits if value is default value']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`{{#link-to route='index' query=(hash foo='123')}}Index{{/link-to}}`
@@ -82,11 +85,11 @@ moduleFor(
'index',
`{{#let (query-params foo='456' alon='BUKAI') as |qp|}}{{#link-to 'index' qp}}Index{{/link-to}}{{/let}}`
);
- }, /Invoking the `` component with positional arguments is deprecated/);
+ }, /(Invoking the `` component with positional arguments is deprecated|Usage of `renderTemplate` is deprecated)/);
await expectDeprecationAsync(
() => this.visit('/'),
- /The `query-params` helper is deprecated/
+ /(The `query-params` helper is deprecated|Usage of `renderTemplate` is deprecated)/
);
this.assertComponentElement(this.firstChild, {
@@ -103,7 +106,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor(...args) {
super(...args);
-
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let indexProperties = {
foo: '123',
bar: 'abc',
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-angle-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-angle-test.js
index 3932e4c573a..d048f35ad03 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-angle-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-angle-test.js
@@ -13,7 +13,12 @@ import { LinkComponent } from '@ember/-internals/glimmer';
moduleFor(
' component (rendering tests)',
class extends ApplicationTestCase {
- async [`@test it throws a useful error if you invoke it wrong`](assert) {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
+ async [`@test throws a useful error if you invoke it wrong`](assert) {
this.addTemplate('application', `Index`);
return assert.rejectsAssertion(
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-curly-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-curly-test.js
index 7115e81ec21..21ec0fa2de0 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-curly-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/rendering-curly-test.js
@@ -16,6 +16,7 @@ moduleFor(
}
async ['@test it should be able to be inserted in DOM when the router is not present']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', `{{#link-to route='index'}}Go to Index{{/link-to}}`);
await this.visit('/');
@@ -26,6 +27,7 @@ moduleFor(
async ['@test it re-renders when title changes']() {
let controller;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', `{{#link-to route='index'}}{{this.title}}{{/link-to}}`);
this.add(
@@ -52,6 +54,7 @@ moduleFor(
async ['@test it re-computes active class when params change'](assert) {
let controller;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', '{{#link-to route=this.routeName}}foo{{/link-to}}');
this.add(
@@ -80,6 +83,7 @@ moduleFor(
}
async ['@test [DEPRECATED] escaped inline form (double curlies) escapes link title']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
expectDeprecation(() => {
this.addTemplate('application', `{{link-to this.title 'index'}}`);
}, /Invoking the `` component with positional arguments is deprecated/);
@@ -99,6 +103,7 @@ moduleFor(
async ['@test [DEPRECATED] unescaped inline form (triple curlies) does not escape link title'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
expectDeprecation(() => {
this.addTemplate('application', `{{{link-to this.title 'index'}}}`);
}, /Invoking the `` component with positional arguments is deprecated/);
@@ -117,6 +122,7 @@ moduleFor(
}
async ['@test able to safely extend the built-in component and use the normal path']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addComponent('custom-link-to', {
ComponentClass: class extends LinkComponent {},
});
@@ -154,7 +160,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Invoking the `` component with positional arguments is deprecated/
+ /(Invoking the `` component with positional arguments is deprecated|Usage of `renderTemplate` is deprecated)/
);
this.assertText('Hello');
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test.js
index 65eec9a144e..21b75e72bad 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test.js
@@ -63,6 +63,7 @@ moduleFor(
}
async ['@test it navigates into the named route'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
@@ -100,7 +101,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@tagName` argument to is deprecated\./,
+ /(Passing the `@tagName` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
assert.strictEqual(this.$('#about-link').attr('href'), null, 'there is no href attribute');
@@ -131,7 +132,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- 'Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead.',
+ /(Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -165,6 +166,7 @@ moduleFor(
}
async [`@test it applies a 'disabled' class when disabled`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -215,6 +217,7 @@ moduleFor(
}
async [`@test it doesn't apply a 'disabled' class when not disabled`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('index', `About`);
await this.visit('/');
@@ -226,6 +229,7 @@ moduleFor(
}
async [`@test it supports a custom disabledClass`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -296,6 +300,7 @@ moduleFor(
}
async [`@test it supports a custom disabledClass set via bound param`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`About`
@@ -351,7 +356,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- 'Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead.',
+ /(Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -365,6 +370,7 @@ moduleFor(
}
async [`@test it does not respond to clicks when disabled`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`About`
@@ -378,6 +384,7 @@ moduleFor(
}
async [`@test it responds to clicks according to its disabled bound param`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`About`
@@ -415,6 +422,7 @@ moduleFor(
}
async [`@test it supports a custom activeClass`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -450,6 +458,7 @@ moduleFor(
}
async [`@test it supports a custom activeClass from a bound param`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -555,6 +564,7 @@ moduleFor(
}
async ['@test Using inside a routable engine link within the engine'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'engine:routable',
class RoutableEngine extends Engine {
@@ -736,6 +746,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor() {
super();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.updateCount = 0;
this.replaceCount = 0;
@@ -909,6 +920,7 @@ if (EMBER_IMPROVED_INSTRUMENTATION) {
}
beforeEach() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/');
}
@@ -976,6 +988,7 @@ moduleFor(
'The component - nested routes and link-to arguments',
class extends ApplicationTestCase {
async ['@test it supports leaving off .index for nested routes'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about', function () {
this.route('item');
@@ -992,6 +1005,7 @@ moduleFor(
}
async [`@test it supports custom, nested, current-when`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1018,6 +1032,7 @@ moduleFor(
async [`@test it does not disregard current-when when it is given explicitly for a route`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1044,6 +1059,7 @@ moduleFor(
}
async ['@test it does not disregard current-when when it is set via a bound param'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1077,6 +1093,7 @@ moduleFor(
}
async ['@test it supports multiple current-when routes'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1125,6 +1142,7 @@ moduleFor(
}
async ['@test it supports boolean values for current-when'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1174,6 +1192,7 @@ moduleFor(
}
async ['@test it defaults to bubbling'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'about',
`
@@ -1260,13 +1279,13 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/about'),
- 'Passing the `@bubbles` argument to is deprecated. Use the {{on}} modifier to attach a custom event handler to control event propagation.',
+ /(Passing the `@bubbles` argument to is deprecated\. Use the {{on}} modifier to attach a custom event handler to control event propagation|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
await expectDeprecationAsync(
() => this.click('#about-contact'),
- 'Passing the `@bubbles` argument to is deprecated. Use the {{on}} modifier to attach a custom event handler to control event propagation.',
+ /(Passing the `@bubbles` argument to is deprecated\. Use the {{on}} modifier to attach a custom event handler to control event propagation|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1325,13 +1344,13 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/about'),
- /Passing the `@bubbles` argument to is deprecated\./,
+ /(Passing the `@bubbles` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
await expectDeprecationAsync(
() => this.click('#about-contact'),
- /Passing the `@bubbles` argument to is deprecated\./,
+ /(Passing the `@bubbles` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1342,6 +1361,7 @@ moduleFor(
async [`@feature(EMBER_MODERNIZED_BUILT_IN_COMPONENTS) The propagation of the click event can be stopped`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'about',
`
@@ -1387,6 +1407,7 @@ moduleFor(
}
async [`@test it moves into the named route with context`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
this.route('item', { path: '/item/:id' });
@@ -1468,6 +1489,7 @@ moduleFor(
}
async [`@test it binds some anchor html tag common attributes`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -1487,6 +1509,7 @@ moduleFor(
}
async [`@test it supports 'target' attribute`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -1502,6 +1525,7 @@ moduleFor(
}
async [`@test it supports 'target' attribute specified as a bound param`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -1535,6 +1559,7 @@ moduleFor(
}
async [`@test it calls preventDefault`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1549,6 +1574,7 @@ moduleFor(
async [`@test [DEPRECATED] it does not call preventDefault if '@preventDefault={{false}}]' is passed as an option`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1560,7 +1586,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1569,7 +1595,7 @@ moduleFor(
() =>
expectDeprecation(
() => this.$('#about-link').trigger('click'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
),
assert
@@ -1579,6 +1605,7 @@ moduleFor(
async [`@test [DEPRECATED] it does not call preventDefault if '@preventDefault={{this.boundThing}}' is passed as an option`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1604,7 +1631,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1613,7 +1640,7 @@ moduleFor(
() =>
expectDeprecation(
() => this.$('#about-link').trigger('click'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
),
assert
@@ -1623,7 +1650,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1632,7 +1659,7 @@ moduleFor(
() =>
expectDeprecation(
() => this.$('#about-link').trigger('click'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
),
assert
@@ -1640,6 +1667,7 @@ moduleFor(
}
async [`@test it does not call preventDefault if 'target' attribute is provided`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -1654,6 +1682,7 @@ moduleFor(
}
async [`@test it should preventDefault when 'target = _self'`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -1668,6 +1697,7 @@ moduleFor(
}
async [`@test it should not transition if target is not equal to _self or empty`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -1698,6 +1728,7 @@ moduleFor(
}
async [`@test it accepts string/numeric arguments`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('filter', { path: '/filters/:filter' });
this.route('post', { path: '/post/:post_id' });
@@ -1737,6 +1768,7 @@ moduleFor(
async [`@test [GH#4201] Shorthand for route.index shouldn't throw errors about context arguments`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('lobby', function () {
this.route('index', { path: ':lobby_id' });
@@ -1772,6 +1804,7 @@ moduleFor(
}
async [`@test Quoteless route param performs property lookup`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1837,7 +1870,10 @@ moduleFor(
}
);
- await this.visit('/');
+ await expectDeprecationAsync(
+ () => this.visit('/'),
+ 'Usage of `renderTemplate` is deprecated.'
+ );
runTask(() => controller.set('post', post));
@@ -1865,6 +1901,7 @@ moduleFor(
}
async [`@test it is active when a route is active`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about', function () {
this.route('item');
@@ -1894,6 +1931,7 @@ moduleFor(
}
async [`@test it works in an #each'd array of string route names`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('foo');
this.route('bar');
@@ -1959,6 +1997,7 @@ moduleFor(
}
async [`@test it throws a useful error if you invoke it wrong`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
if (!DEBUG) {
assert.expect(0);
return;
@@ -1977,7 +2016,8 @@ moduleFor(
}
async [`@test it does not throw an error if its route has exited`](assert) {
- assert.expect(0);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(1);
this.router.map(function () {
this.route('post', { path: 'post/:post_id' });
@@ -2029,6 +2069,7 @@ moduleFor(
}
async [`@test its active property respects changing parent route context`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('things', { path: '/things/:name' }, function () {
this.route('other');
@@ -2057,6 +2098,7 @@ moduleFor(
async [`@test it populates href with default query param values even without query-params object`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'controller:index',
class extends Controller {
@@ -2075,6 +2117,7 @@ moduleFor(
async [`@test it populates href with default query param values with empty query-params object`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'controller:index',
class extends Controller {
@@ -2094,6 +2137,7 @@ moduleFor(
}
async [`@test it updates when route changes with only query-params and a block`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -2126,6 +2170,7 @@ moduleFor(
}
async ['@test [GH#17018] passing model to with `hash` helper works']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('post', { path: '/posts/:post_id' });
});
@@ -2191,7 +2236,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Invoking the `` component with positional arguments is deprecated/
+ /(Invoking the `` component with positional arguments is deprecated|Usage of `renderTemplate` is deprecated)/
);
let link = this.$('#dynamic-link');
@@ -2209,6 +2254,7 @@ moduleFor(
async [`@test [GH#13256]: to a parent root model hook which performs a 'transitionTo' has correct active class`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('parent', function () {
this.route('child');
@@ -2243,6 +2289,7 @@ moduleFor(
async [`@test with null/undefined dynamic parameters are put in a loading state`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let warningMessage =
'This link is in an inactive loading state because at least one of its models currently has a null/undefined value, or the provided route name is invalid.';
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-curly-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-curly-test.js
index 138a66f7068..d7337dce67d 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-curly-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-curly-test.js
@@ -63,6 +63,7 @@ moduleFor(
}
async ['@test it navigates into the named route'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
assert.equal(this.$('h3.home').length, 1, 'The home template was rendered');
@@ -100,7 +101,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@tagName` argument to is deprecated\./,
+ /(Passing the `@tagName` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -136,7 +137,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- 'Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead.',
+ /(Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -170,6 +171,7 @@ moduleFor(
}
async [`@test it applies a 'disabled' class when disabled`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -220,6 +222,7 @@ moduleFor(
}
async [`@test it doesn't apply a 'disabled' class when not disabled`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
{{#link-to route="about"}}About{{/link-to}}
`
@@ -234,6 +237,7 @@ moduleFor(
}
async [`@test it supports a custom disabledClass`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -304,6 +308,7 @@ moduleFor(
}
async [`@test it supports a custom disabledClass set via bound param`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
`
@@ -363,7 +368,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- 'Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead.',
+ /(Passing the `@disabledWhen` argument to is deprecated. Use the `@disabled` argument instead|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -377,6 +382,7 @@ moduleFor(
}
async [`@test it does not respond to clicks when disabled`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
`
@@ -390,6 +396,7 @@ moduleFor(
}
async [`@test it responds to clicks according to its disabled bound param`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
`
@@ -427,6 +434,7 @@ moduleFor(
}
async [`@test it supports a custom activeClass`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -462,6 +470,7 @@ moduleFor(
}
async [`@test it supports a custom activeClass from a bound param`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -569,7 +578,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@class` argument to is deprecated\./,
+ /(Passing the `@class` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -621,6 +630,7 @@ moduleFor(
}
async ['@test Using {{link-to}} inside a routable engine link within the engine'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'engine:routable',
class RoutableEngine extends Engine {
@@ -862,6 +872,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor() {
super();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.updateCount = 0;
this.replaceCount = 0;
@@ -1011,6 +1022,7 @@ if (EMBER_IMPROVED_INSTRUMENTATION) {
class extends ApplicationTestCase {
constructor() {
super();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
@@ -1102,6 +1114,7 @@ moduleFor(
'The {{link-to}} component - nested routes and link-to arguments',
class extends ApplicationTestCase {
async ['@test it supports leaving off .index for nested routes'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about', function () {
this.route('item');
@@ -1121,6 +1134,7 @@ moduleFor(
}
async [`@test it supports custom, nested, current-when`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1147,6 +1161,7 @@ moduleFor(
async [`@test it does not disregard current-when when it is given explicitly for a route`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1173,6 +1188,7 @@ moduleFor(
}
async ['@test it does not disregard current-when when it is set via a bound param'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1206,6 +1222,7 @@ moduleFor(
}
async ['@test it supports multiple current-when routes'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1254,6 +1271,7 @@ moduleFor(
}
async ['@test it supports boolean values for current-when'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('index', { path: '/' }, function () {
this.route('about');
@@ -1303,6 +1321,7 @@ moduleFor(
}
async ['@test it defaults to bubbling'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'about',
`
@@ -1389,13 +1408,13 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/about'),
- /Passing the `@bubbles` argument to is deprecated\./,
+ /(Passing the `@bubbles` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
await expectDeprecationAsync(
() => this.click('#about-contact > a'),
- /Passing the `@bubbles` argument to is deprecated\./,
+ /(Passing the `@bubbles` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1454,13 +1473,13 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/about'),
- /Passing the `@bubbles` argument to is deprecated\./,
+ /(Passing the `@bubbles` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
await expectDeprecationAsync(
() => this.click('#about-contact > a'),
- /Passing the `@bubbles` argument to is deprecated\./,
+ /(Passing the `@bubbles` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1469,6 +1488,7 @@ moduleFor(
}
async [`@test it moves into the named route with context`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
this.route('item', { path: '/item/:id' });
@@ -1564,7 +1584,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@(id|title|rel|tabindex)` argument to is deprecated\./,
+ /(Passing the `@(id|title|rel|tabindex)` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1586,7 +1606,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@target` argument to is deprecated\./,
+ /(Passing the `@target` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1619,7 +1639,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@target` argument to is deprecated\./,
+ /(Passing the `@target` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1636,6 +1656,7 @@ moduleFor(
}
async [`@test it calls preventDefault`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1653,6 +1674,7 @@ moduleFor(
async [`@test [DEPRECATED] it does not call preventDefault if 'preventDefault=false' is passed as an option`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1664,7 +1686,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1673,7 +1695,7 @@ moduleFor(
() =>
expectDeprecation(
() => this.$('#about-link > a').trigger('click'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
),
assert
@@ -1683,6 +1705,7 @@ moduleFor(
async [`@test [DEPRECATED] it does not call preventDefault if 'preventDefault=this.boundThing' is passed as an option`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1708,7 +1731,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1717,7 +1740,7 @@ moduleFor(
() =>
expectDeprecation(
() => this.$('#about-link > a').trigger('click'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
),
assert
@@ -1727,7 +1750,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@preventDefault` argument to is deprecated\./,
+ /(Passing the `@preventDefault` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1756,7 +1779,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@target` argument to is deprecated\./,
+ /(Passing the `@target` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1774,7 +1797,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@target` argument to is deprecated\./,
+ /(Passing the `@target` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1801,7 +1824,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@target` argument to is deprecated\./,
+ /(Passing the `@target` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
@@ -1820,6 +1843,7 @@ moduleFor(
}
async [`@test it accepts string/numeric arguments`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('filter', { path: '/filters/:filter' });
this.route('post', { path: '/post/:post_id' });
@@ -1862,6 +1886,7 @@ moduleFor(
async [`@test [GH#4201] Shorthand for route.index shouldn't throw errors about context arguments`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('lobby', function () {
this.route('index', { path: ':lobby_id' });
@@ -1897,6 +1922,7 @@ moduleFor(
}
async [`@test Quoteless route param performs property lookup`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -1938,6 +1964,7 @@ moduleFor(
}
async [`@test it refreshes href element when one of params changes`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('post', { path: '/posts/:post_id' });
});
@@ -1990,6 +2017,7 @@ moduleFor(
}
async [`@test it is active when a route is active`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about', function () {
this.route('item');
@@ -2019,6 +2047,7 @@ moduleFor(
}
async [`@test it works in an #each'd array of string route names`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('foo');
this.route('bar');
@@ -2086,6 +2115,7 @@ moduleFor(
async [`@test [DEPRECATED] The non-block form {{link-to}} component moves into the named route`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('contact');
});
@@ -2132,6 +2162,7 @@ moduleFor(
async [`@test [DEPRECATED] The non-block form {{link-to}} component updates the link text when it is a binding`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('contact');
});
@@ -2223,6 +2254,7 @@ moduleFor(
async [`@test [DEPRECATED] The non-block form {{link-to}} component moves into the named route with context`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('item', { path: '/item/:id' });
});
@@ -2280,6 +2312,7 @@ moduleFor(
}
async [`@test [DEPRECATED] The non-block form {{link-to}} performs property lookup`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -2323,6 +2356,7 @@ moduleFor(
}
async [`@test [DEPRECATED] The non-block form {{link-to}} protects against XSS`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
expectDeprecation(() => {
this.addTemplate('application', `
{{link-to this.display 'index'}}
`);
}, /Invoking the `` component with positional arguments is deprecated/);
@@ -2352,6 +2386,7 @@ moduleFor(
}
async [`@test it throws a useful error if you invoke it wrong`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
if (!DEBUG) {
assert.expect(0);
return;
@@ -2370,7 +2405,8 @@ moduleFor(
}
async [`@test it does not throw an error if its route has exited`](assert) {
- assert.expect(0);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(1);
this.router.map(function () {
this.route('post', { path: 'post/:post_id' });
@@ -2422,6 +2458,7 @@ moduleFor(
}
async [`@test its active property respects changing parent route context`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('things', { path: '/things/:name' }, function () {
this.route('other');
@@ -2450,6 +2487,7 @@ moduleFor(
async [`@test it populates href with default query param values even without query-params object`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'controller:index',
class extends Controller {
@@ -2471,6 +2509,7 @@ moduleFor(
async [`@test it populates href with default query param values with empty query-params object`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'controller:index',
class extends Controller {
@@ -2490,6 +2529,7 @@ moduleFor(
}
async [`@test it updates when route changes with only query-params and a block`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -2528,6 +2568,7 @@ moduleFor(
async [`@test [DEPRECATED] it updates when route changes with only query-params but without a block`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('about');
});
@@ -2566,6 +2607,7 @@ moduleFor(
}
async ['@test [GH#17018] passing model to {{link-to}} with `hash` helper works']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('post', { path: '/posts/:post_id' });
});
@@ -2631,7 +2673,7 @@ moduleFor(
await expectDeprecationAsync(
() => this.visit('/'),
- /Invoking the `` component with positional arguments is deprecated/
+ /(Invoking the `` component with positional arguments is deprecated|Usage of `renderTemplate` is deprecated)/
);
let link = this.$('#dynamic-link > a');
@@ -2649,6 +2691,7 @@ moduleFor(
async [`@test [GH#13256]: {{link-to}} to a parent root model hook which performs a 'transitionTo' has correct active class`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('parent', function () {
this.route('child');
@@ -2689,6 +2732,7 @@ moduleFor(
let warningMessage =
'This link is in an inactive loading state because at least one of its models currently has a null/undefined value, or the provided route name is invalid.';
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('thing', { path: '/thing/:thing_id' });
this.route('about');
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-angle-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-angle-test.js
index 03395293b97..1f36166a889 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-angle-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-angle-test.js
@@ -20,6 +20,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor(...args) {
super(...args);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.aboutDefer = RSVP.defer();
this.otherDefer = RSVP.defer();
@@ -157,6 +158,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor(...args) {
super(...args);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.aboutDefer = RSVP.defer();
this.otherDefer = RSVP.defer();
@@ -206,7 +208,7 @@ moduleFor(
async beforeEach() {
return expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@tagName` argument to is deprecated\./,
+ /(Passing the `@tagName` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
}
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-curly-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-curly-test.js
index 8724c4ee335..6a787e3c3a5 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-curly-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/link-to/transitioning-classes-curly-test.js
@@ -20,6 +20,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor(...args) {
super(...args);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.aboutDefer = RSVP.defer();
this.otherDefer = RSVP.defer();
@@ -157,6 +158,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor(...args) {
super(...args);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.aboutDefer = RSVP.defer();
this.otherDefer = RSVP.defer();
@@ -206,7 +208,7 @@ moduleFor(
async beforeEach() {
return expectDeprecationAsync(
() => this.visit('/'),
- /Passing the `@tagName` argument to is deprecated\./,
+ /(Passing the `@tagName` argument to is deprecated\.|Usage of `renderTemplate` is deprecated)/,
EMBER_MODERNIZED_BUILT_IN_COMPONENTS
);
}
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js
index 888c33cd088..0d7a5787310 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/strict-mode-test.js
@@ -266,6 +266,7 @@ if (EMBER_STRICT_MODE) {
'Strict Mode - LinkTo',
class extends ApplicationTestCase {
'@test Can use LinkTo'() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let Foo = defineComponent({ LinkTo }, 'Index');
this.addComponent('foo', { ComponentClass: Foo });
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/target-action-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/target-action-test.js
index e6f1a7ba792..d06ed759967 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/target-action-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/target-action-test.js
@@ -344,7 +344,8 @@ moduleFor(
["@test sendAction should trigger an action on the parent component's controller if it exists"](
assert
) {
- assert.expect(20);
+ assert.expect(21);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let component;
@@ -482,7 +483,9 @@ moduleFor(
["@test sendAction should not trigger an action in an outlet's controller if a parent component handles it"](
assert
) {
- assert.expect(2);
+ assert.expect(3);
+
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let component;
diff --git a/packages/@ember/-internals/glimmer/tests/integration/components/utils-test.js b/packages/@ember/-internals/glimmer/tests/integration/components/utils-test.js
index af536c1d7b7..3dd81fb7446 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/components/utils-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/components/utils-test.js
@@ -136,6 +136,7 @@ moduleFor(
}
['@test getRootViews']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/')
.then(() => {
this.assertRootViews(['root-1', 'root-2', 'root-3', 'root-4', 'root-5']);
@@ -175,6 +176,7 @@ moduleFor(
}
['@test getChildViews']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/')
.then(() => {
this.assertChildViews('root-2', ['inner-1', 'inner-2']);
@@ -224,6 +226,7 @@ moduleFor(
}
['@test getChildViews does not return duplicates']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
this.assertChildViews('root-2', ['inner-1', 'inner-2']);
diff --git a/packages/@ember/-internals/glimmer/tests/integration/mount-test.js b/packages/@ember/-internals/glimmer/tests/integration/mount-test.js
index fd223eaccd6..201fe62b108 100644
--- a/packages/@ember/-internals/glimmer/tests/integration/mount-test.js
+++ b/packages/@ember/-internals/glimmer/tests/integration/mount-test.js
@@ -72,6 +72,7 @@ moduleFor(
['@test it boots an engine, instantiates its application controller, and renders its application template'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.engineRegistrations['template:application'] = compile(
'
Chat here, {{this.username}}
',
{
@@ -113,6 +114,7 @@ moduleFor(
}
async ['@test it emits a useful backtracking re-render assertion message'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('route-with-mount');
});
@@ -158,6 +160,7 @@ moduleFor(
}
['@test it renders with a bound engine name']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('bound-engine-name');
});
@@ -239,6 +242,7 @@ moduleFor(
}
['@test it declares the event dispatcher as a singleton']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('engine-event-dispatcher-singleton');
});
@@ -334,6 +338,7 @@ moduleFor(
}
['@test it renders with static parameters']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('engine-params-static');
});
@@ -345,6 +350,7 @@ moduleFor(
}
['@test it renders with bound parameters']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('engine-params-bound');
});
@@ -394,6 +400,7 @@ moduleFor(
}
['@test it renders contextual components passed as parameter values']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('engine-params-contextual-component');
});
diff --git a/packages/@ember/-internals/routing/tests/system/controller_for_test.js b/packages/@ember/-internals/routing/tests/system/controller_for_test.js
index f2a3990ea1c..5935fa5ae38 100644
--- a/packages/@ember/-internals/routing/tests/system/controller_for_test.js
+++ b/packages/@ember/-internals/routing/tests/system/controller_for_test.js
@@ -22,6 +22,7 @@ moduleFor(
['@test controllerFor should lookup for registered controllers'](assert) {
this.add('controller:app', Controller.extend());
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
let appInstance = this.applicationInstance;
let appController = appInstance.lookup('controller:app');
@@ -45,6 +46,7 @@ moduleFor(
}
['@test generateController should return Controller'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
let controller = generateController(this.applicationInstance, 'home');
assert.ok(controller instanceof Controller, 'should return controller');
@@ -55,6 +57,7 @@ moduleFor(
let BasicController = Controller.extend();
this.add('controller:basic', BasicController);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
let controller = generateController(this.applicationInstance, 'home');
assert.ok(controller instanceof BasicController, 'should return controller');
@@ -65,6 +68,7 @@ moduleFor(
let BasicController = Controller.extend();
this.application.register('controller:basic', BasicController);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
let controller = generateController(this.applicationInstance, 'home');
diff --git a/packages/@ember/application/tests/application_instance_test.js b/packages/@ember/application/tests/application_instance_test.js
index db7e438f0c7..db6eea03fcc 100644
--- a/packages/@ember/application/tests/application_instance_test.js
+++ b/packages/@ember/application/tests/application_instance_test.js
@@ -21,6 +21,7 @@ moduleFor(
'ApplicationInstance',
class extends TestCase {
constructor() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
setDebugFunction('debug', noop);
super();
@@ -59,7 +60,7 @@ moduleFor(
}
['@test customEvents added to the application before setupEventDispatcher'](assert) {
- assert.expect(1);
+ assert.expect(2);
appInstance = run(() => ApplicationInstance.create({ application }));
appInstance.setupRegistry();
@@ -77,7 +78,7 @@ moduleFor(
}
['@test customEvents added to the application instance before setupEventDispatcher'](assert) {
- assert.expect(1);
+ assert.expect(2);
appInstance = run(() => ApplicationInstance.create({ application }));
appInstance.setupRegistry();
@@ -95,7 +96,7 @@ moduleFor(
}
['@test unregistering a factory clears all cached instances of that factory'](assert) {
- assert.expect(5);
+ assert.expect(6);
appInstance = run(() => ApplicationInstance.create({ application }));
@@ -157,7 +158,7 @@ moduleFor(
}
['@test can build and boot a registered engine'](assert) {
- assert.expect(10);
+ assert.expect(11);
let ChatEngine = Engine.extend({
Resolver: ModuleBasedTestResolver,
diff --git a/packages/@ember/application/tests/application_test.js b/packages/@ember/application/tests/application_test.js
index 713d8a78bae..33255416db8 100644
--- a/packages/@ember/application/tests/application_test.js
+++ b/packages/@ember/application/tests/application_test.js
@@ -36,6 +36,7 @@ moduleFor(
}
get applicationOptions() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return assign(super.applicationOptions, {
rootElement: '#one',
router: null,
@@ -192,12 +193,14 @@ moduleFor(
}
[`@test acts like a namespace`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.application = runTask(() => this.createApplication());
let Foo = (this.application.Foo = EmberObject.extend());
assert.equal(Foo.toString(), 'TestApp.Foo', 'Classes pick up their parent namespace');
}
[`@test can specify custom router`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let MyRouter = Router.extend();
runTask(() => {
this.createApplication();
@@ -211,6 +214,7 @@ moduleFor(
}
[`@test Minimal Application initialized with just an application template`]() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.setupFixture('');
runTask(() => this.createApplication());
this.assertInnerHTML('Hello World');
@@ -236,6 +240,7 @@ moduleFor(
}
[`@test initialized application goes to initial route`]() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => {
this.createApplication();
this.addTemplate('application', '{{outlet}}');
@@ -246,7 +251,8 @@ moduleFor(
}
[`@test ready hook is called before routing begins`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
runTask(() => {
function registerRoute(application, name, callback) {
@@ -272,6 +278,7 @@ moduleFor(
}
[`@test initialize application via initialize call`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication());
// This is not a public way to access the container; we just
// need to make some assertions about the created router
@@ -287,6 +294,7 @@ moduleFor(
[`@test initialize application with stateManager via initialize call from Router class`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => {
this.createApplication();
this.addTemplate('application', '
Hello!
');
@@ -299,6 +307,7 @@ moduleFor(
}
[`@test Application Controller backs the appplication template`]() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => {
this.createApplication();
this.addTemplate('application', '
{{this.greeting}}
');
@@ -313,6 +322,7 @@ moduleFor(
}
[`@test enable log of libraries with an ENV var`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
if (!DEBUG) {
assert.ok(true, 'Logging does not occur in production builds');
return;
@@ -340,6 +350,7 @@ moduleFor(
}
[`@test disable log of version of libraries with an ENV var`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let logged = false;
ENV.LOG_VERSION = false;
@@ -352,6 +363,7 @@ moduleFor(
}
[`@test can resolve custom router`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let CustomRouter = Router.extend();
runTask(() => {
@@ -366,6 +378,7 @@ moduleFor(
}
[`@test does not leak itself in onLoad._loaded`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
assert.equal(_loaded.application, undefined);
runTask(() => this.createApplication());
assert.equal(_loaded.application, this.application);
diff --git a/packages/@ember/application/tests/bootstrap-test.js b/packages/@ember/application/tests/bootstrap-test.js
index 7b23194b62e..ee88651d2dd 100644
--- a/packages/@ember/application/tests/bootstrap-test.js
+++ b/packages/@ember/application/tests/bootstrap-test.js
@@ -21,6 +21,7 @@ moduleFor(
}
['@test templates in script tags are extracted at application creation'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication());
assert.equal(document.getElementById('app').textContent, 'Hello World!');
}
diff --git a/packages/@ember/application/tests/dependency_injection/custom_resolver_test.js b/packages/@ember/application/tests/dependency_injection/custom_resolver_test.js
index 646dc6569b0..5e12ab2bd45 100644
--- a/packages/@ember/application/tests/dependency_injection/custom_resolver_test.js
+++ b/packages/@ember/application/tests/dependency_injection/custom_resolver_test.js
@@ -25,6 +25,7 @@ moduleFor(
}
[`@test a resolver can be supplied to application`]() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication());
this.assertText('Fallback');
}
diff --git a/packages/@ember/application/tests/dependency_injection/default_resolver_test.js b/packages/@ember/application/tests/dependency_injection/default_resolver_test.js
index 46b9a68ffa6..a9e859a5af8 100644
--- a/packages/@ember/application/tests/dependency_injection/default_resolver_test.js
+++ b/packages/@ember/application/tests/dependency_injection/default_resolver_test.js
@@ -14,6 +14,7 @@ moduleFor(
'Application Dependency Injection - Integration - globals resolver [DEPRECATED]',
class extends DefaultResolverApplicationTestCase {
beforeEach() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication());
return this.visit('/');
}
@@ -215,7 +216,7 @@ moduleFor(
[`@test no assertion for routes that extend from Route`](assert) {
assert.test.assertions = []; // clear assertions that occurred in beforeEach so they don't affect count
- assert.expect(0);
+ assert.expect(1);
this.application.FooRoute = Route.extend();
this.privateRegistry.resolve(`route:foo`);
}
@@ -229,7 +230,7 @@ moduleFor(
[`@test no assertion for service factories that extend from Service`](assert) {
assert.test.assertions = []; // clear assertions that occurred in beforeEach so they don't affect count
- assert.expect(0);
+ assert.expect(1);
this.application.FooService = Service.extend();
this.privateRegistry.resolve('service:foo');
}
@@ -242,7 +243,6 @@ moduleFor(
}
[`@test no assertion for component factories that extend from Component`]() {
- expectNoDeprecation();
this.application.FooView = Component.extend();
this.privateRegistry.resolve('component:foo');
}
@@ -273,6 +273,7 @@ moduleFor(
'Application Dependency Injection - Integration - default resolver w/ other namespace',
class extends DefaultResolverApplicationTestCase {
beforeEach() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.UserInterface = context.lookup.UserInterface = Namespace.create();
runTask(() => this.createApplication());
return this.visit('/');
@@ -311,6 +312,7 @@ moduleFor(
}
beforeEach() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication());
return this.visit('/');
}
@@ -328,7 +330,7 @@ moduleFor(
}
assert.test.assertions = []; // clear assertions that occurred in beforeEach so they don't affect count
- assert.expect(3);
+ assert.expect(4);
this.application.LOG_RESOLVER = true;
this.application.ScoobyDoo = EmberObject.extend();
@@ -350,7 +352,7 @@ moduleFor(
}
assert.test.assertions = []; // clear assertions that occurred in beforeEach so they don't affect count
- assert.expect(3);
+ assert.expect(4);
this.application.LOG_RESOLVER = true;
this.application.toString = () => 'App';
diff --git a/packages/@ember/application/tests/dependency_injection/normalization_test.js b/packages/@ember/application/tests/dependency_injection/normalization_test.js
index d6f726cbc22..76c6571cadc 100644
--- a/packages/@ember/application/tests/dependency_injection/normalization_test.js
+++ b/packages/@ember/application/tests/dependency_injection/normalization_test.js
@@ -12,6 +12,7 @@ moduleFor(
// Must use default resolver because test resolver does not normalize
run(() => {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
expectDeprecation(() => {
application = Application.create();
});
diff --git a/packages/@ember/application/tests/dependency_injection/to_string_test.js b/packages/@ember/application/tests/dependency_injection/to_string_test.js
index b1e27d3a6bb..113a4f6ba02 100644
--- a/packages/@ember/application/tests/dependency_injection/to_string_test.js
+++ b/packages/@ember/application/tests/dependency_injection/to_string_test.js
@@ -19,6 +19,7 @@ moduleFor(
}
beforeEach() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/');
}
@@ -44,6 +45,7 @@ moduleFor(
'Application Dependency Injection - Resolver#toString',
class extends ApplicationTestCase {
beforeEach() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/');
}
diff --git a/packages/@ember/application/tests/dependency_injection_test.js b/packages/@ember/application/tests/dependency_injection_test.js
index aecc515b091..429f459ff17 100644
--- a/packages/@ember/application/tests/dependency_injection_test.js
+++ b/packages/@ember/application/tests/dependency_injection_test.js
@@ -17,6 +17,7 @@ moduleFor(
constructor() {
super();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
application = run(EmberApplication, 'create', {
Resolver: ModuleBasedTestResolver,
});
diff --git a/packages/@ember/application/tests/initializers_test.js b/packages/@ember/application/tests/initializers_test.js
index b8288f433f6..89b0d314ac8 100644
--- a/packages/@ember/application/tests/initializers_test.js
+++ b/packages/@ember/application/tests/initializers_test.js
@@ -102,6 +102,7 @@ moduleFor(
},
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication({}, MyApplication));
}
@@ -157,6 +158,7 @@ moduleFor(
},
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication({}, MyApplication));
assert.deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);
@@ -214,6 +216,7 @@ moduleFor(
},
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication({}, MyApplication));
assert.deepEqual(order, ['first', 'second', 'third', 'fourth', 'fifth', 'sixth']);
@@ -263,6 +266,7 @@ moduleFor(
MyApplication.initializer(afterB);
MyApplication.initializer(c);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => this.createApplication({}, MyApplication));
assert.ok(order.indexOf(a.name) < order.indexOf(b.name), 'a < b');
@@ -272,6 +276,7 @@ moduleFor(
}
[`@test initializers set on Application subclasses are not shared between apps`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let firstInitializerRunCount = 0;
let secondInitializerRunCount = 0;
let FirstApp = Application.extend();
@@ -304,6 +309,7 @@ moduleFor(
}
[`@test initializers are concatenated`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let firstInitializerRunCount = 0;
let secondInitializerRunCount = 0;
let FirstApp = Application.extend();
@@ -374,7 +380,8 @@ moduleFor(
}
[`@test initializers are executed in their own context`](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
let MyApplication = Application.extend();
MyApplication.initializer({
diff --git a/packages/@ember/application/tests/instance_initializers_test.js b/packages/@ember/application/tests/instance_initializers_test.js
index 9c237b32359..d7df13151da 100644
--- a/packages/@ember/application/tests/instance_initializers_test.js
+++ b/packages/@ember/application/tests/instance_initializers_test.js
@@ -39,6 +39,7 @@ moduleFor(
}
[`@test initializers require proper 'name' and 'initialize' properties`]() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let MyApplication = Application.extend();
expectAssertion(() => {
@@ -53,6 +54,7 @@ moduleFor(
}
[`@test initializers are passed an app instance`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let MyApplication = Application.extend();
MyApplication.instanceInitializer({
@@ -69,6 +71,7 @@ moduleFor(
}
[`@test initializers can be registered in a specified order`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let order = [];
let MyApplication = Application.extend();
@@ -126,6 +129,7 @@ moduleFor(
}
[`@test initializers can be registered in a specified order as an array`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let order = [];
let MyApplication = Application.extend();
@@ -183,6 +187,7 @@ moduleFor(
}
[`@test initializers can have multiple dependencies`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let order = [];
let MyApplication = Application.extend();
let a = {
@@ -235,6 +240,7 @@ moduleFor(
}
[`@test initializers set on Application subclasses should not be shared between apps`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let firstInitializerRunCount = 0;
let secondInitializerRunCount = 0;
let FirstApp = Application.extend();
@@ -266,6 +272,7 @@ moduleFor(
}
[`@test initializers are concatenated`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let firstInitializerRunCount = 0;
let secondInitializerRunCount = 0;
let FirstApp = Application.extend();
@@ -310,7 +317,8 @@ moduleFor(
}
[`@test initializers are per-app`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
let FirstApp = Application.extend();
FirstApp.instanceInitializer({
@@ -339,7 +347,8 @@ moduleFor(
}
[`@test initializers are run before ready hook`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
let MyApplication = Application.extend({
ready() {
@@ -360,7 +369,8 @@ moduleFor(
}
[`@test initializers are executed in their own context`](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
let MyApplication = Application.extend();
@@ -376,7 +386,8 @@ moduleFor(
}
[`@test initializers get an instance on app reset`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
let MyApplication = Application.extend();
diff --git a/packages/@ember/application/tests/logging_test.js b/packages/@ember/application/tests/logging_test.js
index ef8ff83d0b4..b0b3d984b51 100644
--- a/packages/@ember/application/tests/logging_test.js
+++ b/packages/@ember/application/tests/logging_test.js
@@ -51,6 +51,7 @@ moduleFor(
return;
}
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/posts').then(() => {
assert.equal(Object.keys(this.logs).length, 4, 'expected logs');
});
@@ -62,6 +63,7 @@ moduleFor(
return;
}
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/posts').then(() => {
assert.equal(
this.logs['controller:application'],
@@ -81,6 +83,7 @@ moduleFor(
this.add('route:application', Route.extend());
this.add('route:posts', Route.extend());
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/posts').then(() => {
assert.ok(
!this.logs['controller:application'],
@@ -108,6 +111,7 @@ moduleFor(
}
[`@test do NOT log class generation if logging disabled`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/posts').then(() => {
assert.equal(Object.keys(this.logs).length, 0, 'expected logs');
});
@@ -132,6 +136,7 @@ moduleFor(
this.addTemplate('application', '{{outlet}}');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/')
.then(() => this.visit('/posts'))
.then(() => {
@@ -165,12 +170,14 @@ moduleFor(
}
[`@test do not log when template and view are missing when flag is not true`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/posts').then(() => {
assert.equal(Object.keys(this.logs).length, 0, 'expected no logs');
});
}
[`@test do not log which views are used with templates when flag is not true`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/posts').then(() => {
assert.equal(Object.keys(this.logs).length, 0, 'expected no logs');
});
diff --git a/packages/@ember/application/tests/readiness_test.js b/packages/@ember/application/tests/readiness_test.js
index ba66745404d..f2c2d3fb8de 100644
--- a/packages/@ember/application/tests/readiness_test.js
+++ b/packages/@ember/application/tests/readiness_test.js
@@ -52,6 +52,7 @@ moduleFor(
_document.readyState = 'interactive';
run(() => {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
application = Application.create({
router: false,
});
@@ -71,6 +72,7 @@ moduleFor(
_document.readyState = 'loading';
run(() => {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
application = Application.create({ router: false });
assert.equal(callbacks['DOMContentLoaded'].length, 1);
});
@@ -87,6 +89,7 @@ moduleFor(
_document.readyState = 'loading';
run(() => {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
application = Application.create({ router: false });
application.deferReadiness();
assert.equal(readyWasCalled, 0, "ready wasn't called yet");
diff --git a/packages/@ember/application/tests/reset_test.js b/packages/@ember/application/tests/reset_test.js
index b2f15524e49..22b51d00543 100644
--- a/packages/@ember/application/tests/reset_test.js
+++ b/packages/@ember/application/tests/reset_test.js
@@ -8,14 +8,19 @@ import { CoreObject } from '@ember/-internals/runtime';
moduleFor(
'Application - resetting',
class extends AutobootApplicationTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
['@test Brings its own run-loop if not provided'](assert) {
- assert.expect(0);
+ assert.expect(1);
run(() => this.createApplication());
this.application.reset();
}
['@test Does not bring its own run loop if one is already provided'](assert) {
- assert.expect(3);
+ assert.expect(4);
let didBecomeReady = false;
diff --git a/packages/@ember/application/tests/visit_test.js b/packages/@ember/application/tests/visit_test.js
index 7fe0babca5e..76ca77ebc7b 100644
--- a/packages/@ember/application/tests/visit_test.js
+++ b/packages/@ember/application/tests/visit_test.js
@@ -51,6 +51,7 @@ moduleFor(
};
ENV._APPLICATION_TEMPLATE_WRAPPER = false;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/', bootOptions).then(() => {
assert.equal(
rootElement.innerHTML,
@@ -61,8 +62,9 @@ moduleFor(
}
[`@test _renderMode: rehydration`](assert) {
- assert.expect(2);
+ assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let indexTemplate = '
Hi, Mom!
';
this.addTemplate('index', indexTemplate);
let rootElement = document.createElement('div');
@@ -172,6 +174,7 @@ moduleFor(
},
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
assert.ok(appBooted === 1, 'the app should be booted`');
assert.ok(instanceBooted === 1, 'an instances should be booted');
@@ -201,6 +204,7 @@ moduleFor(
assert.ok(appBooted === 1, 'the app should be booted');
assert.ok(instanceBooted === 0, 'no instances should be booted');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/');
})
.then(() => {
@@ -305,6 +309,7 @@ moduleFor(
* First call to `visit` is `this.application.visit` and returns the
* applicationInstance.
*/
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/a').then((instance) => {
assert.ok(
instance instanceof ApplicationInstance,
@@ -372,6 +377,7 @@ moduleFor(
this.route('c');
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/')
.then((instance) => {
assert.ok(
@@ -414,6 +420,7 @@ moduleFor(
this.assertEmptyFixture();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then((instance) => {
assert.ok(
instance instanceof ApplicationInstance,
@@ -447,8 +454,9 @@ moduleFor(
}
[`@test visit() renders a template when shouldRender is set to true`](assert) {
- assert.expect(3);
+ assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', '
Hello world
');
this.assertEmptyFixture();
@@ -502,7 +510,7 @@ moduleFor(
[`@test visit() does not setup the event_dispatcher:main if isInteractive is false (with Engines) GH#15615`](
assert
) {
- assert.expect(3);
+ assert.expect(4);
this.router.map(function () {
this.mount('blog');
@@ -539,6 +547,7 @@ moduleFor(
this.assertEmptyFixture();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/blog', { isInteractive: false }).then((instance) => {
assert.ok(
instance instanceof ApplicationInstance,
@@ -553,7 +562,7 @@ moduleFor(
}
[`@test visit() on engine resolves engine component`](assert) {
- assert.expect(2);
+ assert.expect(3);
this.router.map(function () {
this.mount('blog');
@@ -583,6 +592,7 @@ moduleFor(
this.assertEmptyFixture();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/blog', { shouldRender: true }).then(() => {
assert.strictEqual(
this.element.querySelector('p').textContent,
@@ -593,7 +603,7 @@ moduleFor(
}
[`@test visit() on engine resolves engine helper`](assert) {
- assert.expect(2);
+ assert.expect(3);
this.router.map(function () {
this.mount('blog');
@@ -622,6 +632,7 @@ moduleFor(
this.assertEmptyFixture();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/blog', { shouldRender: true }).then(() => {
assert.strictEqual(this.element.textContent, 'turnt up', 'Engine component is resolved');
});
@@ -633,6 +644,7 @@ moduleFor(
let xBarInitCalled = false;
let xBarDidInsertElementCalled = false;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('show', { path: '/:component_name' });
diff --git a/packages/@ember/controller/tests/controller_test.js b/packages/@ember/controller/tests/controller_test.js
index 3bf7a15441b..8da89bb1d1b 100644
--- a/packages/@ember/controller/tests/controller_test.js
+++ b/packages/@ember/controller/tests/controller_test.js
@@ -32,6 +32,7 @@ moduleFor(
this.addTemplate('index', '');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
this.assertText('1');
@@ -62,6 +63,7 @@ moduleFor(
this.addTemplate('index', '');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
runTask(() => this.$('button').click());
assert.equal(observerRunCount, 1, 'observer ran exactly once');
diff --git a/packages/ember-testing/tests/acceptance_test.js b/packages/ember-testing/tests/acceptance_test.js
index 6ed764cb5e0..5a0ac53a8a7 100644
--- a/packages/ember-testing/tests/acceptance_test.js
+++ b/packages/ember-testing/tests/acceptance_test.js
@@ -125,8 +125,9 @@ if (!jQueryDisabled) {
}
[`@test helpers can be chained with then`](assert) {
- assert.expect(6);
+ assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window
.visit('/posts')
.then(() => {
@@ -164,8 +165,9 @@ if (!jQueryDisabled) {
}
[`@test helpers can be chained to each other (legacy)`](assert) {
- assert.expect(7);
+ assert.expect(8);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window
.visit('/posts')
.click('a:first', '#comments-link')
@@ -192,8 +194,9 @@ if (!jQueryDisabled) {
}
[`@test helpers don't need to be chained`](assert) {
- assert.expect(5);
+ assert.expect(6);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts');
window.click('a:first', '#comments-link');
@@ -219,8 +222,9 @@ if (!jQueryDisabled) {
}
[`@test Nested async helpers`](assert) {
- assert.expect(5);
+ assert.expect(6);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts');
window.andThen(() => {
@@ -247,8 +251,9 @@ if (!jQueryDisabled) {
}
[`@test Multiple nested async helpers`](assert) {
- assert.expect(3);
+ assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts');
window.andThen(() => {
@@ -270,8 +275,9 @@ if (!jQueryDisabled) {
}
[`@test Helpers nested in thens`](assert) {
- assert.expect(5);
+ assert.expect(6);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts').then(() => {
window.click('a:first', '#comments-link');
});
@@ -311,7 +317,7 @@ if (!jQueryDisabled) {
}
[`@test Unhandled exceptions are logged via Ember.Test.adapter#exception`](assert) {
- assert.expect(2);
+ assert.expect(3);
console.error = () => {}; // eslint-disable-line no-console
let asyncHandled;
@@ -327,6 +333,7 @@ if (!jQueryDisabled) {
},
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts');
window.click('.invalid-element').catch((error) => {
@@ -343,7 +350,7 @@ if (!jQueryDisabled) {
[`@test Unhandled exceptions in 'andThen' are logged via Ember.Test.adapter#exception`](
assert
) {
- assert.expect(1);
+ assert.expect(2);
console.error = () => {}; // eslint-disable-line no-console
Test.adapter = QUnitAdapter.create({
@@ -356,6 +363,7 @@ if (!jQueryDisabled) {
},
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts');
window.andThen(() => {
@@ -364,8 +372,9 @@ if (!jQueryDisabled) {
}
[`@test should not start routing on the root URL when visiting another`](assert) {
- assert.expect(4);
+ assert.expect(5);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts');
window.andThen(() => {
@@ -381,8 +390,9 @@ if (!jQueryDisabled) {
}
[`@test only enters the index route once when visiting `](assert) {
- assert.expect(1);
+ assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/');
window.andThen(() => {
@@ -427,8 +437,9 @@ if (!jQueryDisabled) {
}
[`@test visiting a URL that causes another transition should yield the correct URL`](assert) {
- assert.expect(2);
+ assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/redirect');
window.andThen(() => {
@@ -439,8 +450,9 @@ if (!jQueryDisabled) {
[`@test visiting a URL and then visiting a second URL with a transition should yield the correct URL`](
assert
) {
- assert.expect(3);
+ assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/posts');
window.andThen(function () {
@@ -460,9 +472,10 @@ if (!jQueryDisabled) {
'ember-testing Acceptance - teardown',
class extends AutobootApplicationTestCase {
[`@test that the setup/teardown happens correctly`](assert) {
- assert.expect(2);
+ assert.expect(3);
runTask(() => {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.createApplication();
});
this.application.injectTestHelpers();
diff --git a/packages/ember-testing/tests/helper_registration_test.js b/packages/ember-testing/tests/helper_registration_test.js
index e265a50d7ed..5fb92fa4ba1 100644
--- a/packages/ember-testing/tests/helper_registration_test.js
+++ b/packages/ember-testing/tests/helper_registration_test.js
@@ -59,8 +59,9 @@ moduleFor(
}
['@test Helper is ran when called'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let done = assert.async();
- assert.expect(1);
+ assert.expect(2);
registerHelper();
setupApp();
diff --git a/packages/ember-testing/tests/helpers_test.js b/packages/ember-testing/tests/helpers_test.js
index f2902095bb5..a5920d11429 100644
--- a/packages/ember-testing/tests/helpers_test.js
+++ b/packages/ember-testing/tests/helpers_test.js
@@ -96,6 +96,7 @@ if (!jQueryDisabled) {
'ember-testing: Helper setup',
class extends HelpersTestCase {
[`@test Ember.Application#injectTestHelpers/#removeTestHelper`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => {
this.createApplication();
});
@@ -242,7 +243,8 @@ if (!jQueryDisabled) {
'ember-testing: Helper methods',
class extends HelpersApplicationTestCase {
[`@test 'wait' respects registerWaiters`](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
let counter = 0;
function waiter() {
@@ -282,7 +284,8 @@ if (!jQueryDisabled) {
}
[`@test 'visit' advances readiness.`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
assert.equal(
this.application._readinessDeferrals,
@@ -300,7 +303,8 @@ if (!jQueryDisabled) {
}
[`@test 'wait' helper can be passed a resolution value`](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
runTask(() => {
this.application.advanceReadiness();
@@ -331,7 +335,8 @@ if (!jQueryDisabled) {
}
[`@test 'click' triggers appropriate events in order`](assert) {
- assert.expect(5);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(6);
this.add(
'component:index-wrapper',
@@ -451,7 +456,8 @@ if (!jQueryDisabled) {
}
[`@test 'click' triggers native events with simulated X/Y coordinates`](assert) {
- assert.expect(15);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(16);
this.add(
'component:index-wrapper',
@@ -503,7 +509,8 @@ if (!jQueryDisabled) {
[`@test 'triggerEvent' with mouseenter triggers native events with simulated X/Y coordinates`](
assert
) {
- assert.expect(5);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(6);
let evt;
this.add(
@@ -541,7 +548,8 @@ if (!jQueryDisabled) {
}
[`@test 'wait' waits for outstanding timers`](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
runTask(() => {
this.application.advanceReadiness();
@@ -558,7 +566,8 @@ if (!jQueryDisabled) {
}
[`@test 'wait' respects registerWaiters with optional context`](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
let obj = {
counter: 0,
@@ -609,7 +618,8 @@ if (!jQueryDisabled) {
}
[`@test 'triggerEvent' accepts an optional options hash without context`](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
let event;
this.add(
@@ -656,7 +666,8 @@ if (!jQueryDisabled) {
}
[`@test 'triggerEvent' can limit searching for a selector to a scope`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
let event;
this.add(
@@ -708,7 +719,8 @@ if (!jQueryDisabled) {
}
[`@test 'triggerEvent' can be used to trigger arbitrary events`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
let event;
this.add(
@@ -754,7 +766,8 @@ if (!jQueryDisabled) {
}
[`@test 'fillIn' takes context into consideration`](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.addTemplate(
'index',
@@ -783,6 +796,7 @@ if (!jQueryDisabled) {
}
[`@test 'fillIn' focuses on the element`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let wasFocused = false;
this.add(
@@ -822,7 +836,8 @@ if (!jQueryDisabled) {
}
[`@test 'fillIn' fires 'input' and 'change' events in the proper order`](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
let events = [];
this.add(
@@ -870,6 +885,7 @@ if (!jQueryDisabled) {
}
[`@test 'fillIn' only sets the value in the first matched element`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'index',
`
@@ -899,7 +915,8 @@ if (!jQueryDisabled) {
}
[`@test 'triggerEvent' accepts an optional options hash and context`](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
let event;
this.add(
@@ -965,13 +982,14 @@ if (!jQueryDisabled) {
constructor() {
super();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => {
this.application.advanceReadiness();
});
}
[`@test pauseTest pauses`](assert) {
- assert.expect(1);
+ assert.expect(2);
// overwrite info to suppress the console output (see https://github.com/emberjs/ember.js/issues/16391)
setDebugFunction('info', noop);
@@ -987,7 +1005,7 @@ if (!jQueryDisabled) {
}
[`@test resumeTest resumes paused tests`](assert) {
- assert.expect(1);
+ assert.expect(2);
// overwrite info to suppress the console output (see https://github.com/emberjs/ember.js/issues/16391)
setDebugFunction('info', noop);
@@ -1004,7 +1022,7 @@ if (!jQueryDisabled) {
}
[`@test resumeTest throws if nothing to resume`](assert) {
- assert.expect(1);
+ assert.expect(2);
assert.throws(() => {
this.application.testHelpers.resumeTest();
@@ -1019,6 +1037,7 @@ if (!jQueryDisabled) {
constructor() {
super();
runTask(() => {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.createApplication();
this.application.setupForTesting();
this.application.injectTestHelpers();
@@ -1035,7 +1054,7 @@ if (!jQueryDisabled) {
}
[`@test currentRouteName for '/'`](assert) {
- assert.expect(3);
+ assert.expect(4);
let {
application: { testHelpers },
@@ -1048,7 +1067,7 @@ if (!jQueryDisabled) {
}
[`@test currentRouteName for '/posts'`](assert) {
- assert.expect(3);
+ assert.expect(4);
let {
application: { testHelpers },
@@ -1065,7 +1084,7 @@ if (!jQueryDisabled) {
}
[`@test currentRouteName for '/posts/new'`](assert) {
- assert.expect(3);
+ assert.expect(4);
let {
application: { testHelpers },
@@ -1078,7 +1097,7 @@ if (!jQueryDisabled) {
}
[`@test currentRouteName for '/posts/edit'`](assert) {
- assert.expect(3);
+ assert.expect(4);
let {
application: { testHelpers },
@@ -1158,6 +1177,7 @@ if (!jQueryDisabled) {
constructor() {
super();
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => {
this.createApplication();
@@ -1211,7 +1231,7 @@ if (!jQueryDisabled) {
}
[`@test currentRouteName for '/user'`](assert) {
- assert.expect(4);
+ assert.expect(5);
let {
application: { testHelpers },
@@ -1226,7 +1246,7 @@ if (!jQueryDisabled) {
}
[`@test currentRouteName for '/user/profile'`](assert) {
- assert.expect(5);
+ assert.expect(6);
let {
application: { testHelpers },
diff --git a/packages/ember-testing/tests/integration_test.js b/packages/ember-testing/tests/integration_test.js
index 0256518968c..2b9cefcf680 100644
--- a/packages/ember-testing/tests/integration_test.js
+++ b/packages/ember-testing/tests/integration_test.js
@@ -55,6 +55,7 @@ moduleFor(
}
[`@test template is bound to empty array of people`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
if (!jQueryDisabled) {
runTask(() => this.application.advanceReadiness());
window.visit('/').then(() => {
@@ -74,6 +75,7 @@ moduleFor(
[`@test template is bound to array of 2 people`](assert) {
if (!jQueryDisabled) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.modelContent = emberA([]);
this.modelContent.pushObject({ firstName: 'x' });
this.modelContent.pushObject({ firstName: 'y' });
@@ -90,6 +92,7 @@ moduleFor(
[`@test 'visit' can be called without advanceReadiness.`](assert) {
if (!jQueryDisabled) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
window.visit('/').then(() => {
let rows = window.find('.name').length;
assert.equal(
diff --git a/packages/ember/tests/application_lifecycle_test.js b/packages/ember/tests/application_lifecycle_test.js
index 54970ce1e9b..5d1e0a072d4 100644
--- a/packages/ember/tests/application_lifecycle_test.js
+++ b/packages/ember/tests/application_lifecycle_test.js
@@ -26,6 +26,7 @@ moduleFor(
super();
let menuItem = (this.menuItem = {});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
runTask(() => {
this.createApplication();
@@ -101,6 +102,8 @@ moduleFor(
[`@test Destroying a route after the router does create an undestroyed 'toplevelView'`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+
runTask(() => {
this.createApplication();
this.addTemplate('index', `Index!`);
@@ -121,7 +124,9 @@ moduleFor(
}
[`@test initializers can augment an applications customEvents hash`](assert) {
- assert.expect(1);
+ assert.expect(2);
+
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let MyApplication = Application.extend();
@@ -154,7 +159,9 @@ moduleFor(
}
[`@test instanceInitializers can augment an the customEvents hash`](assert) {
- assert.expect(1);
+ assert.expect(2);
+
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let MyApplication = Application.extend();
diff --git a/packages/ember/tests/component_context_test.js b/packages/ember/tests/component_context_test.js
index fa88436a09e..6917ce84809 100644
--- a/packages/ember/tests/component_context_test.js
+++ b/packages/ember/tests/component_context_test.js
@@ -5,6 +5,11 @@ import { moduleFor, ApplicationTestCase, getTextOf } from 'internal-test-helpers
moduleFor(
'Application Lifecycle - Component Context',
class extends ApplicationTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
['@test Components with a block should have the proper content when a template is provided'](
assert
) {
diff --git a/packages/ember/tests/component_registration_test.js b/packages/ember/tests/component_registration_test.js
index 1495ad74d95..99005db72c7 100644
--- a/packages/ember/tests/component_registration_test.js
+++ b/packages/ember/tests/component_registration_test.js
@@ -19,6 +19,7 @@ moduleFor(
assert.expect(0);
return;
}
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('components/expand-it', '
');
this.addTemplate('application', 'Hello world {{#expand-it}}world{{/expand-it}}');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
this.assertInnerHTML('Hello world
hello world
');
ENV._TEMPLATE_ONLY_GLIMMER_COMPONENTS = false;
@@ -50,6 +52,7 @@ moduleFor(
}
['@test If a component is registered, it is used'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('components/expand-it', '
hello {{yield}}
');
this.addTemplate('application', `Hello world {{#expand-it}}world{{/expand-it}}`);
@@ -72,6 +75,7 @@ moduleFor(
}
['@test Late-registered components can be rendered with custom `layout` property'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', `
there goes {{my-hero}}
`);
this.application.instanceInitializer({
@@ -100,6 +104,7 @@ moduleFor(
['@test Late-registered components can be rendered with template registered on the container'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'application',
`
hello world {{sally-rutherford}}-{{#sally-rutherford}}!!!{{/sally-rutherford}}
`
@@ -134,6 +139,7 @@ moduleFor(
['@test Late-registered components can be rendered with ONLY the template registered on the container'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'application',
`
hello world {{borf-snorlax}}-{{#borf-snorlax}}!!!{{/borf-snorlax}}
`
@@ -160,7 +166,8 @@ moduleFor(
}
['@test Assigning layoutName to a component should setup the template as a layout'](assert) {
- assert.expect(1);
+ assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'application',
@@ -199,7 +206,8 @@ moduleFor(
}
['@test Assigning layoutName and layout to a component should use the `layout` value'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.addTemplate(
'application',
@@ -239,6 +247,7 @@ moduleFor(
}
async ['@test Using name of component that does not exist'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', `
{{#no-good}} {{/no-good}}
`);
if (DEBUG) {
diff --git a/packages/ember/tests/controller_test.js b/packages/ember/tests/controller_test.js
index 26c8a020a94..71c8d0c1ccb 100644
--- a/packages/ember/tests/controller_test.js
+++ b/packages/ember/tests/controller_test.js
@@ -14,6 +14,7 @@ moduleFor(
'Template scoping examples',
class extends ApplicationTestCase {
['@test Actions inside an outlet go to the associated controller'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'controller:index',
Controller.extend({
diff --git a/packages/ember/tests/homepage_example_test.js b/packages/ember/tests/homepage_example_test.js
index 974d1918fd5..6b0d037eef0 100644
--- a/packages/ember/tests/homepage_example_test.js
+++ b/packages/ember/tests/homepage_example_test.js
@@ -8,6 +8,7 @@ moduleFor(
'The example renders correctly',
class extends ApplicationTestCase {
async ['@test Render index template into application outlet'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', '{{outlet}}');
this.addTemplate(
'index',
diff --git a/packages/ember/tests/integration/multiple-app-test.js b/packages/ember/tests/integration/multiple-app-test.js
index a9713bb7402..ee086bfdec2 100644
--- a/packages/ember/tests/integration/multiple-app-test.js
+++ b/packages/ember/tests/integration/multiple-app-test.js
@@ -83,6 +83,7 @@ moduleFor(
}
[`@test booting multiple applications can properly handle events`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let actions = [];
this.addFactoriesToResolver(actions, this.resolver);
this.addFactoriesToResolver(actions, this.secondResolver);
diff --git a/packages/ember/tests/routing/decoupled_basic_test.js b/packages/ember/tests/routing/decoupled_basic_test.js
index 8e5e13a6c26..6c9df1c0ff6 100644
--- a/packages/ember/tests/routing/decoupled_basic_test.js
+++ b/packages/ember/tests/routing/decoupled_basic_test.js
@@ -88,12 +88,14 @@ moduleFor(
}
async ['@test warn on URLs not included in the route set'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
await assert.rejects(this.visit('/what-is-this-i-dont-even'), /\/what-is-this-i-dont-even/);
}
['@test The Homepage'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
assert.equal(this.currentPath, 'home', 'currently on the home route');
@@ -103,6 +105,7 @@ moduleFor(
}
[`@test The Homepage and the Camelot page with multiple Router.map calls`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('camelot', { path: '/camelot' });
});
@@ -125,6 +128,7 @@ moduleFor(
}
['@test The Special Page returning a promise puts the app into a loading state until the promise is resolved']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('home', { path: '/' });
this.route('special', { path: '/specials/:menu_item_id' });
@@ -161,6 +165,7 @@ moduleFor(
[`@test The loading state doesn't get entered for promises that resolve on the same run loop`](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('home', { path: '/' });
this.route('special', { path: '/specials/:menu_item_id' });
@@ -195,6 +200,7 @@ moduleFor(
}
["@test The Special page returning an error invokes SpecialRoute's error handler"](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('home', { path: '/' });
this.route('special', { path: '/specials/:menu_item_id' });
@@ -239,7 +245,8 @@ moduleFor(
}
["@test ApplicationRoute's default error handler can be overridden"](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -293,6 +300,7 @@ moduleFor(
async ['@test Events are triggered on the controller if a matching action name is implemented'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let done = assert.async();
this.router.map(function () {
@@ -339,6 +347,7 @@ moduleFor(
async ['@test Events are triggered on the current state when defined in `actions` object'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let done = assert.async();
this.router.map(function () {
@@ -375,6 +384,7 @@ moduleFor(
async ['@test Events defined in `actions` object are triggered on the current state when routes are nested'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let done = assert.async();
this.router.map(function () {
@@ -416,7 +426,8 @@ moduleFor(
}
['@test Events can be handled by inherited event handlers'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
let SuperRoute = Route.extend({
actions: {
@@ -468,6 +479,7 @@ moduleFor(
async ['@test Actions are not triggered on the controller if a matching action name is implemented as a method'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let done = assert.async();
this.router.map(function () {
@@ -512,6 +524,7 @@ moduleFor(
}
async ['@test actions can be triggered with multiple arguments'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let done = assert.async();
this.router.map(function () {
this.route('root', { path: '/' }, function () {
@@ -562,6 +575,7 @@ moduleFor(
}
['@test transitioning multiple times in a single run loop only sets the URL once'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('root', { path: '/' });
this.route('foo');
@@ -590,7 +604,8 @@ moduleFor(
}
['@test navigating away triggers a url property change'](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('root', { path: '/' });
@@ -609,6 +624,7 @@ moduleFor(
}
['@test using replaceWith calls location.replaceURL if available'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let setCount = 0;
let replaceCount = 0;
this.router.reopen({
@@ -644,6 +660,7 @@ moduleFor(
}
['@test using replaceWith calls setURL if location.replaceURL is not defined'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let setCount = 0;
this.router.reopen({
@@ -671,6 +688,7 @@ moduleFor(
}
['@test A redirection hook is provided'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('choose', { path: '/' });
this.route('home');
@@ -713,7 +731,8 @@ moduleFor(
}
['@test Redirecting from the middle of a route aborts the remainder of the routes'](assert) {
- assert.expect(5);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(6);
this.router.map(function () {
this.route('home');
@@ -764,7 +783,8 @@ moduleFor(
['@test Redirecting to the current target in the middle of a route does not abort initial routing'](
assert
) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
this.router.map(function () {
this.route('home');
@@ -819,7 +839,8 @@ moduleFor(
['@test Redirecting to the current target with a different context aborts the remainder of the routes'](
assert
) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
this.router.map(function () {
this.route('home');
@@ -877,6 +898,7 @@ moduleFor(
['@test Transitioning from a parent event does not prevent currentPath from being set'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('foo', function () {
this.route('bar', { resetNamespace: true }, function () {
@@ -919,6 +941,7 @@ moduleFor(
}
['@test Router accounts for rootURL on page load when using history location'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let rootURL = window.location.pathname + '/app';
let postsTemplateRendered = false;
let setHistory;
@@ -1005,6 +1028,7 @@ moduleFor(
}
['@test Generating a URL should not affect currentModel'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('post', { path: '/posts/:post_id' });
});
@@ -1036,6 +1060,7 @@ moduleFor(
}
["@test Nested index route is not overridden by parent's implicit index route"](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('posts', function () {
this.route('index', { path: ':category' });
@@ -1054,7 +1079,8 @@ moduleFor(
}
['@test Promises encountered on app load put app into loading state until resolved'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
let deferred = RSVP.defer();
this.router.map(function () {
@@ -1131,7 +1157,7 @@ moduleFor(
})
);
- let deprecation = /You attempted to override the "willTransition" method which is deprecated\./;
+ let deprecation = /(You attempted to override the "willTransition" method which is deprecated\.|Usage of `renderTemplate` is deprecated)/;
return expectDeprecationAsync(() => {
return this.visit('/').then(() => {
@@ -1144,7 +1170,8 @@ moduleFor(
['@test Aborting/redirecting the transition in `willTransition` prevents LoadingRoute from being entered'](
assert
) {
- assert.expect(6);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(7);
this.router.map(function () {
this.route('index');
@@ -1231,7 +1258,8 @@ moduleFor(
}
async ['@test `didTransition` event fires on the router'](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('nork');
@@ -1259,7 +1287,8 @@ moduleFor(
}
['@test `activate` event fires on the route'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
let eventFired = 0;
@@ -1290,7 +1319,8 @@ moduleFor(
}
['@test `deactivate` event fires on the route'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
let eventFired = 0;
@@ -1322,7 +1352,8 @@ moduleFor(
}
['@test Actions can be handled by inherited action handlers'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
let SuperRoute = Route.extend({
actions: {
@@ -1373,7 +1404,8 @@ moduleFor(
}
['@test transitionTo returns Transition when passed a route name'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.router.map(function () {
this.route('root', { path: '/' });
@@ -1388,7 +1420,8 @@ moduleFor(
}
['@test transitionTo returns Transition when passed a url'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.router.map(function () {
this.route('root', { path: '/' });
@@ -1407,7 +1440,8 @@ moduleFor(
['@test currentRouteName is a property installed on ApplicationController that can be used in transitionTo'](
assert
) {
- assert.expect(36);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(37);
this.router.map(function () {
this.route('index', { path: '/' });
@@ -1457,6 +1491,7 @@ moduleFor(
}
["@test Redirecting with null model doesn't error out"](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('home', { path: '/' });
this.route('about', { path: '/about/:hurhurhur' });
@@ -1646,7 +1681,8 @@ moduleFor(
["@test willLeave, willChangeContext, willChangeModel actions don't fire unless feature flag enabled"](
assert
) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.router.map(function () {
this.route('about');
@@ -1717,6 +1753,7 @@ moduleFor(
}
['@test Errors in transition show error template if available'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('error', "
Error!
");
this.router.map(function () {
@@ -1747,7 +1784,8 @@ moduleFor(
}
['@test Route#resetController gets fired when changing models and exiting routes'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.router.map(function () {
this.route('a', function () {
@@ -1839,7 +1877,8 @@ moduleFor(
}
async ['@test Doesnt swallow exception thrown from willTransition'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.addTemplate('application', '{{outlet}}');
this.addTemplate('index', 'index');
this.addTemplate('other', 'other');
@@ -1869,7 +1908,8 @@ moduleFor(
}
['@test Route serializers work for Engines'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
// Register engine
let BlogEngine = Engine.extend({
@@ -1907,7 +1947,8 @@ moduleFor(
}
async ['@test Defining a Route#serialize method in an Engine throws an error'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
// Register engine
let BlogEngine = Engine.extend({
@@ -1942,7 +1983,8 @@ moduleFor(
}
['@test App.destroy does not leave undestroyed views after clearing engines'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
let engineInstance;
// Register engine
@@ -1991,6 +2033,7 @@ moduleFor(
}
["@test Generated route should be an instance of App's default route if provided"](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let generatedRoute;
this.router.map(function () {
diff --git a/packages/ember/tests/routing/model_loading_test.js b/packages/ember/tests/routing/model_loading_test.js
index 09dac8dbf6a..2fcc48bc84c 100644
--- a/packages/ember/tests/routing/model_loading_test.js
+++ b/packages/ember/tests/routing/model_loading_test.js
@@ -13,6 +13,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor() {
super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('home', '
Hours
');
this.addTemplate('camelot', '
Is a silly place
');
this.addTemplate('homepage', '
Megatroll
{{this.name}}
');
@@ -71,7 +72,7 @@ moduleFor(
}
['@test properties that autotrack the model update when the model changes'](assert) {
- assert.expect(2);
+ assert.expect(3);
this.router.map(function () {
this.route('track', { path: '/track/:id' });
@@ -451,7 +452,7 @@ moduleFor(
}
['@test Moving from one page to another triggers the correct callbacks'](assert) {
- assert.expect(3);
+ assert.expect(4);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -580,7 +581,7 @@ moduleFor(
}
['@test Route inherits model from parent route'](assert) {
- assert.expect(9);
+ assert.expect(10);
this.router.map(function () {
this.route('the-post', { path: '/posts/:post_id' }, function () {
@@ -677,7 +678,7 @@ moduleFor(
}
['@test Routes with { resetNamespace: true } inherits model from parent route'](assert) {
- assert.expect(6);
+ assert.expect(7);
this.router.map(function () {
this.route('the-post', { path: '/posts/:post_id' }, function () {
@@ -730,7 +731,7 @@ moduleFor(
}
['@test It is possible to get the model from a parent route'](assert) {
- assert.expect(6);
+ assert.expect(7);
this.router.map(function () {
this.route('the-post', { path: '/posts/:post_id' }, function () {
diff --git a/packages/ember/tests/routing/query_params_test.js b/packages/ember/tests/routing/query_params_test.js
index 66f07ea319b..3b2a8aafa8d 100644
--- a/packages/ember/tests/routing/query_params_test.js
+++ b/packages/ember/tests/routing/query_params_test.js
@@ -15,7 +15,7 @@ moduleFor(
async refreshModelWhileLoadingTest(loadingReturn) {
let assert = this.assert;
- assert.expect(9);
+ assert.expect(10);
let appModelCount = 0;
let promiseResolve;
@@ -94,7 +94,8 @@ moduleFor(
}
["@test No replaceURL occurs on startup because default values don't show up in URL"](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.setSingleQPController('index');
@@ -104,7 +105,8 @@ moduleFor(
['@test Calling transitionTo does not lose query params already on the activeTransition'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('parent', function () {
@@ -142,7 +144,8 @@ moduleFor(
['@test Calling transitionTo does not serialize query params already serialized on the activeTransition'](
assert
) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.router.map(function () {
this.route('parent', function () {
@@ -193,7 +196,8 @@ moduleFor(
async ['@test Single query params can be set on the controller and reflected in the url'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -214,7 +218,8 @@ moduleFor(
async ['@test Query params can map to different url keys configured on the controller'](
assert
) {
- assert.expect(6);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(7);
this.add(
'controller:index',
@@ -245,7 +250,8 @@ moduleFor(
}
async ['@test Routes have a private overridable serializeQueryParamKey hook'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.add(
'route:index',
@@ -266,7 +272,8 @@ moduleFor(
async ['@test Can override inherited QP behavior by specifying queryParams as a computed property'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.setSingleQPController('index', 'a', 0, {
queryParams: computed(function () {
@@ -288,7 +295,8 @@ moduleFor(
async ['@test Can concatenate inherited QP behavior by specifying queryParams as an array'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.setSingleQPController('index', 'a', 0, {
queryParams: ['c'],
@@ -306,7 +314,8 @@ moduleFor(
}
['@test model hooks receives query params'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.setSingleQPController('index');
@@ -323,7 +332,8 @@ moduleFor(
}
['@test model hooks receives query params with dynamic segment params'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('index', { path: '/:id' });
@@ -344,7 +354,8 @@ moduleFor(
}
['@test model hooks receives query params (overridden by incoming url value)'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('index', { path: '/:id' });
@@ -378,7 +389,8 @@ moduleFor(
}
['@test query params have been set by the time setupController is called'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.setSingleQPController('application');
@@ -399,7 +411,8 @@ moduleFor(
}
['@test mapped query params have been set by the time setupController is called'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.setSingleQPController('application', { faz: 'foo' });
@@ -420,7 +433,8 @@ moduleFor(
}
['@test Route#paramsFor fetches query params with default value'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('index', { path: '/:something' });
@@ -445,7 +459,8 @@ moduleFor(
}
['@test Route#paramsFor fetches query params with non-default value'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('index', { path: '/:something' });
@@ -470,7 +485,8 @@ moduleFor(
}
['@test Route#paramsFor fetches default falsy query params'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('index', { path: '/:something' });
@@ -495,7 +511,8 @@ moduleFor(
}
['@test Route#paramsFor fetches non-default falsy query params'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('index', { path: '/:something' });
@@ -520,7 +537,8 @@ moduleFor(
}
['@test model hook can query prefix-less application params'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.setSingleQPController('application', 'appomg', 'applol');
this.setSingleQPController('index', 'omg', 'lol');
@@ -552,7 +570,8 @@ moduleFor(
['@test model hook can query prefix-less application params (overridden by incoming url value)'](
assert
) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.setSingleQPController('application', 'appomg', 'applol');
this.setSingleQPController('index', 'omg', 'lol');
@@ -584,7 +603,8 @@ moduleFor(
async ['@test can opt into full transition by setting refreshModel in route queryParams'](
assert
) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
this.setSingleQPController('application', 'appomg', 'applol');
this.setSingleQPController('index', 'omg', 'lol');
@@ -632,7 +652,8 @@ moduleFor(
}
async ['@test refreshModel and replace work together'](assert) {
- assert.expect(8);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(9);
this.setSingleQPController('application', 'appomg', 'applol');
this.setSingleQPController('index', 'omg', 'lol');
@@ -682,7 +703,8 @@ moduleFor(
}
async ['@test multiple QP value changes only cause a single model refresh'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.setSingleQPController('index', 'alex', 'lol');
this.setSingleQPController('index', 'steely', 'lel');
@@ -717,7 +739,8 @@ moduleFor(
}
['@test refreshModel does not cause a second transition during app boot '](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.setSingleQPController('application', 'appomg', 'applol');
this.setSingleQPController('index', 'omg', 'lol');
@@ -742,6 +765,7 @@ moduleFor(
async ['@test queryParams are updated when a controller property is set and the route is refreshed. Issue #13263 '](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'application',
'{{this.foo}}{{outlet}}'
@@ -784,7 +808,8 @@ moduleFor(
}
async ["@test Use Ember.get to retrieve query params 'refreshModel' configuration"](assert) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
this.setSingleQPController('application', 'appomg', 'applol');
this.setSingleQPController('index', 'omg', 'lol');
@@ -834,7 +859,8 @@ moduleFor(
async ['@test can use refreshModel even with URL changes that remove QPs from address bar'](
assert
) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.setSingleQPController('index', 'omg', 'lol');
@@ -872,7 +898,8 @@ moduleFor(
async ['@test can opt into a replace query by specifying replace:true in the Route config hash'](
assert
) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.setSingleQPController('application', 'alex', 'matchneer');
@@ -898,7 +925,8 @@ moduleFor(
async ['@test Route query params config can be configured using property name instead of URL key'](
assert
) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.add(
'controller:application',
@@ -929,7 +957,8 @@ moduleFor(
async ['@test An explicit replace:false on a changed QP always wins and causes a pushState'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.add(
'controller:application',
@@ -969,6 +998,7 @@ moduleFor(
async ['@test can opt into full transition by setting refreshModel in route queryParams when transitioning from child to parent'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('parent', '{{outlet}}');
this.addTemplate(
'parent.child',
@@ -1007,7 +1037,8 @@ moduleFor(
}
async ["@test Use Ember.get to retrieve query params 'replace' configuration"](assert) {
- assert.expect(2);
+ assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.setSingleQPController('application', 'alex', 'matchneer');
@@ -1032,7 +1063,8 @@ moduleFor(
}
async ['@test can override incoming QP values in setupController'](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('about');
@@ -1062,7 +1094,8 @@ moduleFor(
}
async ['@test can override incoming QP array values in setupController'](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('about');
@@ -1092,7 +1125,8 @@ moduleFor(
}
['@test URL transitions that remove QPs still register as QP changes'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.setSingleQPController('index', 'omg', 'lol');
@@ -1106,6 +1140,7 @@ moduleFor(
}
async ['@test Subresource naming style is supported'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('abc.def', { path: '/abcdef' }, function () {
this.route('zoo');
@@ -1137,6 +1172,7 @@ moduleFor(
}
async ['@test transitionTo supports query params']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.setSingleQPController('index', 'foo', 'lol');
await this.visitAndAssert('/');
@@ -1155,6 +1191,7 @@ moduleFor(
}
async ['@test transitionTo supports query params (multiple)']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.add(
'controller:index',
Controller.extend({
@@ -1179,7 +1216,8 @@ moduleFor(
}
async ["@test setting controller QP to empty string doesn't generate null in URL"](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.setSingleQPController('index', 'foo', '123');
@@ -1191,7 +1229,8 @@ moduleFor(
}
async ["@test setting QP to empty string doesn't generate null in URL"](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.add(
'route:index',
@@ -1212,7 +1251,8 @@ moduleFor(
}
['@test A default boolean value deserializes QPs as booleans rather than strings'](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.setSingleQPController('index', 'foo', false);
@@ -1235,7 +1275,8 @@ moduleFor(
}
['@test Query param without value are empty string'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.add(
'controller:index',
@@ -1252,7 +1293,8 @@ moduleFor(
}
async ['@test Array query params can be set'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -1271,7 +1313,8 @@ moduleFor(
}
async ['@test (de)serialization: arrays'](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.setSingleQPController('index', 'foo', [1]);
@@ -1287,7 +1330,8 @@ moduleFor(
}
['@test Url with array query param sets controller property to array'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.setSingleQPController('index', 'foo', '');
@@ -1298,7 +1342,8 @@ moduleFor(
}
async ['@test Array query params can be pushed/popped'](assert) {
- assert.expect(17);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(18);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -1351,7 +1396,8 @@ moduleFor(
}
async ["@test Overwriting with array with same content shouldn't refire update"](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -1382,7 +1428,8 @@ moduleFor(
['@test Defaulting to params hash as the model should not result in that params object being watched'](
assert
) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.router.map(function () {
this.route('other');
@@ -1412,7 +1459,8 @@ moduleFor(
async ['@test Setting bound query param property to null or undefined does not serialize to url'](
assert
) {
- assert.expect(9);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(10);
this.router.map(function () {
this.route('home');
@@ -1445,6 +1493,7 @@ moduleFor(
}
async ['@test with null or undefined QPs does not get serialized into url'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'home',
`
@@ -1471,7 +1520,8 @@ moduleFor(
["@test A child of a resource route still defaults to parent route's model even if the child route has a query param"](
assert
) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.setSingleQPController('index', 'woot', undefined, {
woot: undefined,
@@ -1503,6 +1553,7 @@ moduleFor(
}
async ['@test opting into replace does not affect transitions between routes']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate(
'application',
`
@@ -1551,6 +1602,7 @@ moduleFor(
}
async ["@test undefined isn't serialized or deserialized into a string"](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('example');
});
@@ -1594,14 +1646,17 @@ moduleFor(
}
['@test when refreshModel is true and loading hook is undefined, model hook will rerun when QPs change even if previous did not finish']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.refreshModelWhileLoadingTest();
}
['@test when refreshModel is true and loading hook returns false, model hook will rerun when QPs change even if previous did not finish']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.refreshModelWhileLoadingTest(false);
}
['@test when refreshModel is true and loading hook returns true, model hook will rerun when QPs change even if previous did not finish']() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.refreshModelWhileLoadingTest(true);
}
@@ -1624,7 +1679,8 @@ moduleFor(
}
async ['@test handle route names that clash with Object.prototype properties'](assert) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
this.router.map(function () {
this.route('constructor');
@@ -1650,7 +1706,8 @@ moduleFor(
async ['@test Single query params defined with tracked properties can be on the controller and reflected in the url'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -1679,7 +1736,8 @@ moduleFor(
async ['@test Single query params defined with tracked properties can be linked to (and log is present)'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.addTemplate(
'application',
@@ -1719,7 +1777,8 @@ moduleFor(
async ['@test Single query params defined with native getters and tracked properties can be on the controller and reflected in the url'](
assert
) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.router.map(function () {
this.route('home', { path: '/' });
@@ -1756,7 +1815,8 @@ moduleFor(
async [`@test Updating single query parameter doesn't affect other query parameters. Issue #14438`](
assert
) {
- assert.expect(6);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(7);
this.router.map(function () {
this.route('grandparent', { path: 'grandparent/:foo' }, function () {
diff --git a/packages/ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js b/packages/ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js
index ad99d04f6fa..c2a51aa36d7 100644
--- a/packages/ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js
+++ b/packages/ember/tests/routing/query_params_test/model_dependent_state_with_query_params_test.js
@@ -29,7 +29,7 @@ class ModelDependentQPTestCase extends QueryParamTestCase {
async queryParamsStickyTest1(urlPrefix) {
let assert = this.assert;
- assert.expect(14);
+ assert.expect(15);
await this.boot();
this.$link1.click();
@@ -57,7 +57,7 @@ class ModelDependentQPTestCase extends QueryParamTestCase {
async queryParamsStickyTest2(urlPrefix) {
let assert = this.assert;
- assert.expect(24);
+ assert.expect(25);
await this.boot();
this.expectedModelHookParams = { id: 'a-1', q: 'lol', z: 0 };
@@ -100,7 +100,7 @@ class ModelDependentQPTestCase extends QueryParamTestCase {
async queryParamsStickyTest3(urlPrefix, articleLookup) {
let assert = this.assert;
- assert.expect(32);
+ assert.expect(33);
this.addTemplate(
'application',
@@ -156,7 +156,7 @@ class ModelDependentQPTestCase extends QueryParamTestCase {
async queryParamsStickyTest4(urlPrefix, articleLookup) {
let assert = this.assert;
- assert.expect(24);
+ assert.expect(25);
this.setupApplication();
@@ -208,7 +208,7 @@ class ModelDependentQPTestCase extends QueryParamTestCase {
async queryParamsStickyTest5(urlPrefix, commentsLookupKey) {
let assert = this.assert;
- assert.expect(12);
+ assert.expect(13);
await this.boot();
await this.transitionTo(commentsLookupKey, 'a-1');
@@ -235,7 +235,7 @@ class ModelDependentQPTestCase extends QueryParamTestCase {
async queryParamsStickyTest6(urlPrefix, articleLookup, commentsLookup) {
let assert = this.assert;
- assert.expect(13);
+ assert.expect(14);
this.setupApplication();
@@ -351,6 +351,7 @@ moduleFor(
}
visitApplication() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
let assert = this.assert;
@@ -462,6 +463,7 @@ moduleFor(
}
visitApplication() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
let assert = this.assert;
@@ -620,6 +622,7 @@ moduleFor(
}
visitApplication() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
let assert = this.assert;
@@ -650,7 +653,7 @@ moduleFor(
}
async ["@test query params have 'model' stickiness by default"](assert) {
- assert.expect(59);
+ assert.expect(60);
await this.boot();
this.links['s-1-a-1'].click();
@@ -721,7 +724,7 @@ moduleFor(
}
async ["@test query params have 'model' stickiness by default (url changes)"](assert) {
- assert.expect(88);
+ assert.expect(89);
await this.boot();
this.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };
@@ -892,7 +895,7 @@ moduleFor(
async ["@test query params have 'model' stickiness by default (params-based transitions)"](
assert
) {
- assert.expect(118);
+ assert.expect(119);
await this.boot();
this.expectedSiteModelHookParams = { site_id: 's-1', country: 'au' };
diff --git a/packages/ember/tests/routing/query_params_test/overlapping_query_params_test.js b/packages/ember/tests/routing/query_params_test/overlapping_query_params_test.js
index 0f7578952bb..663add77eba 100644
--- a/packages/ember/tests/routing/query_params_test/overlapping_query_params_test.js
+++ b/packages/ember/tests/routing/query_params_test/overlapping_query_params_test.js
@@ -17,7 +17,8 @@ moduleFor(
}
async ['@test can remap same-named qp props'](assert) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
this.setMappedQPController('parent');
this.setMappedQPController('parent.child', 'page', 'childPage');
@@ -52,7 +53,8 @@ moduleFor(
}
async ['@test query params can be either controller property or url key'](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.setMappedQPController('parent');
@@ -67,7 +69,8 @@ moduleFor(
}
async ['@test query param matching a url key and controller property'](assert) {
- assert.expect(3);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(4);
this.setMappedQPController('parent', 'page', 'parentPage');
this.setMappedQPController('parent.child', 'index', 'page');
@@ -88,7 +91,8 @@ moduleFor(
async ['@test query param matching same property on two controllers use the urlKey higher in the chain'](
assert
) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.setMappedQPController('parent', 'page', 'parentPage');
this.setMappedQPController('parent.child', 'page', 'childPage');
@@ -114,7 +118,8 @@ moduleFor(
async ['@test query params does not error when a query parameter exists for route instances that share a controller'](
assert
) {
- assert.expect(1);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(2);
let parentController = Controller.extend({
queryParams: { page: 'page' },
@@ -143,7 +148,8 @@ moduleFor(
}
async ['@test Support shared but overridable mixin pattern'](assert) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
let HasPage = Mixin.create({
queryParams: 'page',
diff --git a/packages/ember/tests/routing/query_params_test/query_param_async_get_handler_test.js b/packages/ember/tests/routing/query_params_test/query_param_async_get_handler_test.js
index 7c78124c955..c12c2c6d80f 100644
--- a/packages/ember/tests/routing/query_params_test/query_param_async_get_handler_test.js
+++ b/packages/ember/tests/routing/query_params_test/query_param_async_get_handler_test.js
@@ -60,6 +60,7 @@ moduleFor(
async ['@test can render a link to an asynchronously loaded route without fetching the route'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.router.map(function () {
this.route('post', { path: '/post/:id' });
});
@@ -99,7 +100,8 @@ moduleFor(
}
['@test can transitionTo to an asynchronously loaded route with simple query params'](assert) {
- assert.expect(6);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(7);
this.router.map(function () {
this.route('post', { path: '/post/:id' });
@@ -144,7 +146,8 @@ moduleFor(
}
['@test can transitionTo to an asynchronously loaded route with array query params'](assert) {
- assert.expect(5);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(6);
this.router.map(function () {
this.route('post', { path: '/post/:id' });
@@ -180,7 +183,8 @@ moduleFor(
}
['@test can transitionTo to an asynchronously loaded route with mapped query params'](assert) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
this.router.map(function () {
this.route('post', { path: '/post/:id' }, function () {
@@ -235,7 +239,8 @@ moduleFor(
}
['@test can transitionTo with a URL'](assert) {
- assert.expect(7);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(8);
this.router.map(function () {
this.route('post', { path: '/post/:id' }, function () {
@@ -286,7 +291,8 @@ moduleFor(
}
["@test undefined isn't serialized or deserialized into a string"](assert) {
- assert.expect(4);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(5);
this.router.map(function () {
this.route('example');
diff --git a/packages/ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js b/packages/ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js
index b68be96ff5f..4f80dd67ffb 100644
--- a/packages/ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js
+++ b/packages/ember/tests/routing/query_params_test/query_params_paramless_link_to_test.js
@@ -5,7 +5,7 @@ moduleFor(
'Query Params - paramless link-to',
class extends QueryParamTestCase {
testParamlessLinks(assert, routeName) {
- assert.expect(1);
+ assert.expect(2);
this.addTemplate(routeName, `index`);
@@ -17,6 +17,7 @@ moduleFor(
})
);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/?foo=YEAH').then(() => {
assert.equal(document.getElementById('index-link').getAttribute('href'), '/?foo=YEAH');
});
diff --git a/packages/ember/tests/routing/query_params_test/shared_state_test.js b/packages/ember/tests/routing/query_params_test/shared_state_test.js
index 8bcc144d985..cc492bdbdea 100644
--- a/packages/ember/tests/routing/query_params_test/shared_state_test.js
+++ b/packages/ember/tests/routing/query_params_test/shared_state_test.js
@@ -50,11 +50,12 @@ moduleFor(
this.addTemplate('dashboard', `Home`);
}
visitApplication() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/');
}
['@test can modify shared state before transition'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.boot().then(() => {
this.$input = document.getElementById('filters-checkbox');
@@ -69,7 +70,7 @@ moduleFor(
}
['@test can modify shared state back to the default value before transition'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.boot().then(() => {
this.$input = document.getElementById('filters-checkbox');
diff --git a/packages/ember/tests/routing/router_map_test.js b/packages/ember/tests/routing/router_map_test.js
index b6595e11b71..fa033fadf87 100644
--- a/packages/ember/tests/routing/router_map_test.js
+++ b/packages/ember/tests/routing/router_map_test.js
@@ -16,7 +16,8 @@ moduleFor(
}
['@test Router.map can be called multiple times'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
this.addTemplate('hello', 'Hello!');
this.addTemplate('goodbye', 'Goodbye!');
diff --git a/packages/ember/tests/routing/router_service_test/basic_test.js b/packages/ember/tests/routing/router_service_test/basic_test.js
index c8407929de9..fe3098cfbe1 100644
--- a/packages/ember/tests/routing/router_service_test/basic_test.js
+++ b/packages/ember/tests/routing/router_service_test/basic_test.js
@@ -5,8 +5,13 @@ import { RouterTestCase, moduleFor } from 'internal-test-helpers';
moduleFor(
'Router Service - main',
class extends RouterTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
['@test RouterService#currentRouteName is correctly set for top level route'](assert) {
- assert.expect(6);
+ assert.expect(7);
return this.visit('/').then(() => {
let currentRoute = this.routerService.currentRoute;
@@ -22,7 +27,7 @@ moduleFor(
}
['@test RouterService#currentRouteName is correctly set for child route'](assert) {
- assert.expect(6);
+ assert.expect(7);
return this.visit('/child').then(() => {
let currentRoute = this.routerService.currentRoute;
@@ -38,7 +43,7 @@ moduleFor(
}
['@test RouterService#currentRouteName is correctly set after transition'](assert) {
- assert.expect(5);
+ assert.expect(6);
return this.visit('/child')
.then(() => {
@@ -60,7 +65,7 @@ moduleFor(
}
'@test substates survive aborts GH#17430'(assert) {
- assert.expect(2);
+ assert.expect(3);
this.add(
`route:parent.child`,
Route.extend({
@@ -82,7 +87,7 @@ moduleFor(
}
['@test RouterService#currentRouteName is correctly set on each transition'](assert) {
- assert.expect(9);
+ assert.expect(10);
return this.visit('/child')
.then(() => {
@@ -116,7 +121,7 @@ moduleFor(
}
['@test RouterService#rootURL is correctly set to the default value'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/').then(() => {
assert.equal(this.routerService.get('rootURL'), '/');
@@ -124,7 +129,7 @@ moduleFor(
}
['@test RouterService#rootURL is correctly set to a custom value'](assert) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'route:parent.index',
@@ -142,7 +147,7 @@ moduleFor(
}
['@test RouterService#location is correctly delegated from router:main'](assert) {
- assert.expect(2);
+ assert.expect(3);
return this.visit('/').then(() => {
let location = this.routerService.get('location');
diff --git a/packages/ember/tests/routing/router_service_test/build_routeinfo_metadata_test.js b/packages/ember/tests/routing/router_service_test/build_routeinfo_metadata_test.js
index 8efb7e51431..52bad11dbe5 100644
--- a/packages/ember/tests/routing/router_service_test/build_routeinfo_metadata_test.js
+++ b/packages/ember/tests/routing/router_service_test/build_routeinfo_metadata_test.js
@@ -5,8 +5,13 @@ import { Route } from '@ember/-internals/routing';
moduleFor(
'buildRouteInfoMetadata',
class extends RouterTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
'@test basic metadata'(assert) {
- assert.expect(4);
+ assert.expect(5);
this.add(
`route:application`,
Route.extend({
@@ -132,7 +137,7 @@ moduleFor(
}
'@test metadata is placed on the `from`'(assert) {
- assert.expect(12);
+ assert.expect(13);
this.add(
`route:application`,
Route.extend({
@@ -199,7 +204,7 @@ moduleFor(
}
'@test can be used with model data from `attributes`'(assert) {
- assert.expect(6);
+ assert.expect(7);
this.add(
`route:application`,
Route.extend({
diff --git a/packages/ember/tests/routing/router_service_test/currenturl_lifecycle_test.js b/packages/ember/tests/routing/router_service_test/currenturl_lifecycle_test.js
index dcba7155853..53532ad9c91 100644
--- a/packages/ember/tests/routing/router_service_test/currenturl_lifecycle_test.js
+++ b/packages/ember/tests/routing/router_service_test/currenturl_lifecycle_test.js
@@ -112,6 +112,7 @@ moduleFor(
class extends RouterTestCase {
constructor() {
super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
results = [];
@@ -135,7 +136,7 @@ moduleFor(
}
['@test RouterService#currentURL is correctly set for top level route'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/').then(() => {
assert.equal(this.routerService.get('currentURL'), '/');
@@ -143,7 +144,7 @@ moduleFor(
}
['@test RouterService#currentURL is correctly set for child route'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/child').then(() => {
assert.equal(this.routerService.get('currentURL'), '/child');
@@ -151,7 +152,7 @@ moduleFor(
}
['@test RouterService#currentURL is correctly set after transition'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/child')
.then(() => {
@@ -163,7 +164,7 @@ moduleFor(
}
['@test RouterService#currentURL is correctly set on each transition'](assert) {
- assert.expect(3);
+ assert.expect(4);
return this.visit('/child')
.then(() => {
@@ -184,7 +185,7 @@ moduleFor(
['@test RouterService#currentURL is not set during model lifecycle hooks until routeDidChange'](
assert
) {
- assert.expect(2);
+ assert.expect(3);
return this.visit('/')
.then(() => {
@@ -237,7 +238,7 @@ moduleFor(
['@test RouterService#currentURL is correctly set with component after consecutive visits'](
assert
) {
- assert.expect(3);
+ assert.expect(4);
return this.visit('/')
.then(() => {
diff --git a/packages/ember/tests/routing/router_service_test/events_test.js b/packages/ember/tests/routing/router_service_test/events_test.js
index 20131502ef5..0680638f67c 100644
--- a/packages/ember/tests/routing/router_service_test/events_test.js
+++ b/packages/ember/tests/routing/router_service_test/events_test.js
@@ -6,8 +6,13 @@ import { later } from '@ember/runloop';
moduleFor(
'Router Service - events',
class extends RouterTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
'@test initial render'(assert) {
- assert.expect(12);
+ assert.expect(13);
this.add(
`route:application`,
Route.extend({
@@ -41,7 +46,7 @@ moduleFor(
}
'@test subsequent visits'(assert) {
- assert.expect(24);
+ assert.expect(25);
let toParent = true;
this.add(
@@ -126,7 +131,7 @@ moduleFor(
}
'@test redirection with `transitionTo`'(assert) {
- assert.expect(11);
+ assert.expect(12);
let toChild = false;
let toSister = false;
@@ -186,7 +191,7 @@ moduleFor(
}
'@test redirection with `replaceWith`'(assert) {
- assert.expect(11);
+ assert.expect(12);
let toChild = false;
let toSister = false;
@@ -246,7 +251,7 @@ moduleFor(
}
'@test nested redirection with `transitionTo`'(assert) {
- assert.expect(12);
+ assert.expect(13);
let toChild = false;
let toSister = false;
@@ -305,7 +310,7 @@ moduleFor(
}
'@test nested redirection with `replaceWith`'(assert) {
- assert.expect(12);
+ assert.expect(13);
let toChild = false;
let toSister = false;
@@ -364,7 +369,7 @@ moduleFor(
}
'@test aborted transition'(assert) {
- assert.expect(11);
+ assert.expect(12);
let didAbort = false;
let toChild = false;
@@ -419,7 +424,7 @@ moduleFor(
}
'@test query param transitions'(assert) {
- assert.expect(15);
+ assert.expect(16);
let initial = true;
let addQP = false;
let removeQP = false;
@@ -479,7 +484,7 @@ moduleFor(
}
'@test query param redirects with `transitionTo`'(assert) {
- assert.expect(7);
+ assert.expect(8);
let toSister = false;
this.add(
@@ -522,7 +527,7 @@ moduleFor(
return this.visit('/child');
}
'@test query param redirects with `replaceWith`'(assert) {
- assert.expect(7);
+ assert.expect(8);
let toSister = false;
this.add(
@@ -566,7 +571,7 @@ moduleFor(
}
'@test params'(assert) {
- assert.expect(14);
+ assert.expect(15);
let initial = true;
@@ -622,7 +627,7 @@ moduleFor(
}
'@test nested params'(assert) {
- assert.expect(30);
+ assert.expect(31);
let initial = true;
this.add(
@@ -700,12 +705,12 @@ moduleFor(
moduleFor(
'Router Service - deprecated events',
class extends RouterTestCase {
- '@test willTransition events are deprecated'() {
- return this.visit('/').then(() => {
- expectDeprecation(() => {
+ async '@test willTransition events are deprecated'() {
+ await expectDeprecationAsync(() => {
+ return this.visit('/').then(() => {
this.routerService['_router'].on('willTransition', () => {});
- }, 'You attempted to listen to the "willTransition" event which is deprecated. Please inject the router service and listen to the "routeWillChange" event.');
- });
+ });
+ }, /(You attempted to listen to the "willTransition" event which is deprecated\. Please inject the router service and listen to the "routeWillChange" event|Usage of `renderTemplate` is deprecated)/);
}
async '@test willTransition events are deprecated on routes'() {
@@ -720,7 +725,7 @@ moduleFor(
);
await expectDeprecationAsync(
() => this.visit('/'),
- 'You attempted to listen to the "willTransition" event which is deprecated. Please inject the router service and listen to the "routeWillChange" event.'
+ /(You attempted to listen to the "willTransition" event which is deprecated\. Please inject the router service and listen to the "routeWillChange" event|Usage of `renderTemplate` is deprecated)/
);
}
@@ -734,10 +739,10 @@ moduleFor(
},
})
);
- await expectDeprecationAsync(
- () => this.visit('/'),
- 'You attempted to listen to the "didTransition" event which is deprecated. Please inject the router service and listen to the "routeDidChange" event.'
+ expectDeprecation(
+ /(Usage of `renderTemplate` is deprecated|You attempted to listen to the "didTransition" event which is deprecated\. Please inject the router service and listen to the "routeDidChange" event)/
);
+ this.visit('/');
}
'@test other events are not deprecated on routes'() {
@@ -750,24 +755,22 @@ moduleFor(
},
})
);
- expectNoDeprecation(() => {
- return this.visit('/');
- });
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ this.visit('/');
}
- '@test didTransition events are deprecated'() {
- return this.visit('/').then(() => {
- expectDeprecation(() => {
+ async '@test didTransition events are deprecated'() {
+ await expectDeprecationAsync(() => {
+ return this.visit('/').then(() => {
this.routerService['_router'].on('didTransition', () => {});
- }, 'You attempted to listen to the "didTransition" event which is deprecated. Please inject the router service and listen to the "routeDidChange" event.');
- });
+ });
+ }, /(Usage of `renderTemplate` is deprecated|You attempted to listen to the "didTransition" event which is deprecated\. Please inject the router service and listen to the "routeDidChange" event)/);
}
'@test other events are not deprecated'() {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/').then(() => {
- expectNoDeprecation(() => {
- this.routerService['_router'].on('wat', () => {});
- });
+ this.routerService['_router'].on('wat', () => {});
});
}
}
@@ -788,7 +791,7 @@ moduleFor(
async '@test willTransition hook is deprecated'() {
await expectDeprecationAsync(
() => this.visit('/'),
- 'You attempted to override the "willTransition" method which is deprecated. Please inject the router service and listen to the "routeWillChange" event.'
+ /(You attempted to override the "willTransition" method which is deprecated\. Please inject the router service and listen to the "routeWillChange" event|Usage of `renderTemplate` is deprecated)/
);
}
}
@@ -808,7 +811,7 @@ moduleFor(
async '@test didTransition hook is deprecated'() {
await expectDeprecationAsync(
() => this.visit('/'),
- 'You attempted to override the "didTransition" method which is deprecated. Please inject the router service and listen to the "routeDidChange" event.'
+ /(You attempted to override the "didTransition" method which is deprecated\. Please inject the router service and listen to the "routeDidChange" event|Usage of `renderTemplate` is deprecated)/
);
}
}
diff --git a/packages/ember/tests/routing/router_service_test/isActive_test.js b/packages/ember/tests/routing/router_service_test/isActive_test.js
index 18021cf519f..25fa9daddb6 100644
--- a/packages/ember/tests/routing/router_service_test/isActive_test.js
+++ b/packages/ember/tests/routing/router_service_test/isActive_test.js
@@ -5,8 +5,13 @@ import Service, { inject as service } from '@ember/service';
moduleFor(
'Router Service - isActive',
class extends RouterTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
['@test RouterService#isActive returns true for simple route'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/')
.then(() => {
@@ -21,7 +26,7 @@ moduleFor(
}
['@test RouterService#isActive returns true for simple route with dynamic segments'](assert) {
- assert.expect(1);
+ assert.expect(2);
let dynamicModel = { id: 1 };
@@ -35,7 +40,7 @@ moduleFor(
}
async ['@test RouterService#isActive entangles with route transitions'](assert) {
- assert.expect(6);
+ assert.expect(7);
this.add(
`service:foo`,
@@ -73,7 +78,7 @@ moduleFor(
['@test RouterService#isActive does not eagerly instantiate controller for query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ sort: 'ASC' });
@@ -100,7 +105,7 @@ moduleFor(
}
['@test RouterService#isActive is correct for simple route with basic query params'](assert) {
- assert.expect(2);
+ assert.expect(3);
let queryParams = this.buildQueryParams({ sort: 'ASC' });
@@ -125,7 +130,7 @@ moduleFor(
}
['@test RouterService#isActive for simple route with array as query params'](assert) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ sort: ['ascending'] });
@@ -144,7 +149,7 @@ moduleFor(
}
['@test RouterService#isActive does not alter query params hash'](assert) {
- assert.expect(3);
+ assert.expect(4);
this.add(
'controller:parent.child',
diff --git a/packages/ember/tests/routing/router_service_test/non_application_test_test.js b/packages/ember/tests/routing/router_service_test/non_application_test_test.js
index ffaf14b3c10..64020776a3d 100644
--- a/packages/ember/tests/routing/router_service_test/non_application_test_test.js
+++ b/packages/ember/tests/routing/router_service_test/non_application_test_test.js
@@ -57,7 +57,8 @@ moduleFor(
}
['@test RouterService#transitionTo with basic route'](assert) {
- assert.expect(2);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ assert.expect(3);
let componentInstance;
diff --git a/packages/ember/tests/routing/router_service_test/recognize_test.js b/packages/ember/tests/routing/router_service_test/recognize_test.js
index f5a65cd10a8..676f1234758 100644
--- a/packages/ember/tests/routing/router_service_test/recognize_test.js
+++ b/packages/ember/tests/routing/router_service_test/recognize_test.js
@@ -4,6 +4,11 @@ import { Route } from '@ember/-internals/routing';
moduleFor(
'Router Service - recognize',
class extends RouterTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
'@test returns a RouteInfo for recognized URL'(assert) {
return this.visit('/').then(() => {
let routeInfo = this.routerService.recognize('/dynamic-with-child/123/1?a=b');
@@ -73,6 +78,11 @@ moduleFor(
moduleFor(
'Router Service - recognizeAndLoad',
class extends RouterTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
'@test returns a RouteInfoWithAttributes for recognized URL'(assert) {
this.add(
'route:dynamicWithChild',
diff --git a/packages/ember/tests/routing/router_service_test/replaceWith_test.js b/packages/ember/tests/routing/router_service_test/replaceWith_test.js
index a1ca0bca866..d4c147b52bc 100644
--- a/packages/ember/tests/routing/router_service_test/replaceWith_test.js
+++ b/packages/ember/tests/routing/router_service_test/replaceWith_test.js
@@ -8,6 +8,7 @@ moduleFor(
class extends RouterTestCase {
constructor() {
super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let testCase = this;
testCase.state = [];
@@ -35,7 +36,7 @@ moduleFor(
}
['@test RouterService#replaceWith returns a Transition'](assert) {
- assert.expect(1);
+ assert.expect(2);
let transition;
@@ -49,7 +50,7 @@ moduleFor(
}
['@test RouterService#replaceWith with basic route replaces location'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/')
.then(() => {
@@ -67,7 +68,7 @@ moduleFor(
}
['@test RouterService#replaceWith with basic route using URLs replaces location'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/')
.then(() => {
@@ -87,7 +88,7 @@ moduleFor(
['@test RouterService#replaceWith transitioning back to previously visited route replaces location'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/')
.then(() => {
@@ -110,7 +111,7 @@ moduleFor(
['@test RouterService#replaceWith with basic query params does not remove query param defaults'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:parent.child',
diff --git a/packages/ember/tests/routing/router_service_test/transitionTo_test.js b/packages/ember/tests/routing/router_service_test/transitionTo_test.js
index 7b6e23d96a5..e05e4779784 100644
--- a/packages/ember/tests/routing/router_service_test/transitionTo_test.js
+++ b/packages/ember/tests/routing/router_service_test/transitionTo_test.js
@@ -13,6 +13,7 @@ moduleFor(
class extends RouterTestCase {
constructor() {
super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let testCase = this;
testCase.state = [];
@@ -40,7 +41,7 @@ moduleFor(
}
['@test RouterService#transitionTo returns a Transition'](assert) {
- assert.expect(1);
+ assert.expect(2);
let transition;
@@ -54,7 +55,7 @@ moduleFor(
}
['@test RouterService#transitionTo with basic route updates location'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/')
.then(() => {
@@ -74,7 +75,7 @@ moduleFor(
['@test RouterService#transitionTo transitioning back to previously visited route updates location'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/')
.then(() => {
@@ -95,7 +96,7 @@ moduleFor(
}
['@test RouterService#transitionTo with basic route'](assert) {
- assert.expect(1);
+ assert.expect(2);
let componentInstance;
@@ -127,7 +128,7 @@ moduleFor(
}
['@test RouterService#transitionTo with basic route using URL'](assert) {
- assert.expect(1);
+ assert.expect(2);
let componentInstance;
@@ -159,7 +160,7 @@ moduleFor(
}
async ['@test RouterService#transitionTo with dynamic segment'](assert) {
- assert.expect(3);
+ assert.expect(4);
let componentInstance;
let dynamicModel = { id: 1, contents: 'much dynamicism' };
@@ -195,7 +196,7 @@ moduleFor(
}
async ['@test RouterService#transitionTo with dynamic segment and model hook'](assert) {
- assert.expect(3);
+ assert.expect(4);
let componentInstance;
let dynamicModel = { id: 1, contents: 'much dynamicism' };
@@ -242,7 +243,7 @@ moduleFor(
['@test RouterService#transitionTo with basic query params does not remove query param defaults'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:parent.child',
@@ -264,7 +265,7 @@ moduleFor(
}
['@test RouterService#transitionTo passing only queryParams works'](assert) {
- assert.expect(2);
+ assert.expect(3);
this.add(
'controller:parent.child',
@@ -291,7 +292,7 @@ moduleFor(
}
['@test RouterService#transitionTo with unspecified query params'](assert) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:parent.child',
@@ -317,7 +318,7 @@ moduleFor(
['@test RouterService#transitionTo with aliased query params uses the original provided key'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:parent.child',
@@ -343,7 +344,7 @@ moduleFor(
['@test RouterService#transitionTo with aliased query params uses the original provided key when controller property name'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:parent.child',
@@ -367,7 +368,7 @@ moduleFor(
['@test RouterService#transitionTo with aliased query params uses the original provided key also when scoped'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'route:parent',
@@ -401,7 +402,7 @@ moduleFor(
['@test RouterService#transitionTo with application query params when redirecting form a different route'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'route:parent.child',
diff --git a/packages/ember/tests/routing/router_service_test/urlFor_test.js b/packages/ember/tests/routing/router_service_test/urlFor_test.js
index 7eef0f561d8..b73582d47e5 100644
--- a/packages/ember/tests/routing/router_service_test/urlFor_test.js
+++ b/packages/ember/tests/routing/router_service_test/urlFor_test.js
@@ -17,8 +17,13 @@ function setupController(app, name) {
moduleFor(
'Router Service - urlFor',
class extends RouterTestCase {
+ constructor() {
+ super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
+ }
+
['@test RouterService#urlFor returns URL for simple route'](assert) {
- assert.expect(1);
+ assert.expect(2);
return this.visit('/').then(() => {
let expectedURL = this.routerService.urlFor('parent.child');
@@ -28,7 +33,7 @@ moduleFor(
}
['@test RouterService#urlFor returns URL for simple route with dynamic segments'](assert) {
- assert.expect(1);
+ assert.expect(2);
setupController(this.application, 'dynamic');
@@ -42,7 +47,7 @@ moduleFor(
}
['@test RouterService#urlFor returns URL for simple route with basic query params'](assert) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ foo: 'bar' });
@@ -56,7 +61,7 @@ moduleFor(
['@test RouterService#urlFor returns URL for simple route with basic query params and default value'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
this.add(
'controller:parent.child',
@@ -78,7 +83,7 @@ moduleFor(
['@test RouterService#urlFor returns URL for simple route with basic query params and default value with stickyness'](
assert
) {
- assert.expect(2);
+ assert.expect(3);
this.add(
'controller:parent.child',
@@ -100,7 +105,7 @@ moduleFor(
}
['@test RouterService#urlFor returns URL for simple route with array as query params'](assert) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({
selectedItems: ['a', 'b', 'c'],
@@ -114,7 +119,7 @@ moduleFor(
}
['@test RouterService#urlFor returns URL for simple route with null query params'](assert) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ foo: null });
@@ -128,7 +133,7 @@ moduleFor(
['@test RouterService#urlFor returns URL for simple route with undefined query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ foo: undefined });
@@ -142,7 +147,7 @@ moduleFor(
['@test RouterService#urlFor returns URL for simple route with dynamic segments and basic query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ foo: 'bar' });
@@ -156,7 +161,7 @@ moduleFor(
['@test RouterService#urlFor returns URL for simple route with dynamic segments and array as query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({
selectedItems: ['a', 'b', 'c'],
@@ -175,7 +180,7 @@ moduleFor(
['@test RouterService#urlFor returns URL for simple route with dynamic segments and null query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ foo: null });
@@ -189,7 +194,7 @@ moduleFor(
['@test RouterService#urlFor returns URL for simple route with dynamic segments and undefined query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let queryParams = this.buildQueryParams({ foo: undefined });
@@ -201,7 +206,7 @@ moduleFor(
}
['@test RouterService#urlFor correctly transitions to route via generated path'](assert) {
- assert.expect(1);
+ assert.expect(2);
let expectedURL;
@@ -219,7 +224,7 @@ moduleFor(
['@test RouterService#urlFor correctly transitions to route via generated path with dynamic segments'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let expectedURL;
let dynamicModel = { id: 1 };
@@ -247,7 +252,7 @@ moduleFor(
['@test RouterService#urlFor correctly transitions to route via generated path with query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let expectedURL;
let actualURL;
@@ -269,7 +274,7 @@ moduleFor(
['@test RouterService#urlFor correctly transitions to route via generated path with dynamic segments and query params'](
assert
) {
- assert.expect(1);
+ assert.expect(2);
let expectedURL;
let actualURL;
diff --git a/packages/ember/tests/routing/substates_test.js b/packages/ember/tests/routing/substates_test.js
index 4bbf2b8a77b..0f3d8d3faf9 100644
--- a/packages/ember/tests/routing/substates_test.js
+++ b/packages/ember/tests/routing/substates_test.js
@@ -15,6 +15,7 @@ moduleFor(
constructor() {
super(...arguments);
counter = 1;
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('application', `
{{outlet}}
`);
this.addTemplate('index', 'INDEX');
@@ -582,6 +583,7 @@ moduleFor(
}
async ['@test ApplicationRoute#currentPath reflects loading state path'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let momDeferred = RSVP.defer();
@@ -615,6 +617,7 @@ moduleFor(
}
async [`@test Loading actions bubble to root but don't enter substates above pivot `](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let sallyDeferred = RSVP.defer();
@@ -677,6 +680,7 @@ moduleFor(
}
async ['@test Default error event moves into nested route'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
this.addTemplate('grandma.error', 'ERROR: {{@model.msg}}');
@@ -708,6 +712,7 @@ moduleFor(
}
async [`@test Non-bubbled errors that re-throw aren't swallowed`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
this.add(
@@ -737,6 +742,7 @@ moduleFor(
}
async [`@test Handled errors that re-throw aren't swallowed`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let handledError;
@@ -784,6 +790,7 @@ moduleFor(
}
async ['@test errors that are bubbled are thrown at a higher level if not handled'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
this.add(
@@ -814,6 +821,7 @@ moduleFor(
}
async [`@test Handled errors that are thrown through rejection aren't swallowed`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let handledError;
@@ -863,6 +871,7 @@ moduleFor(
async ['@test Default error events move into nested route, prioritizing more specifically named error routes - NEW'](
assert
) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
this.addTemplate('grandma.error', 'ERROR: {{@model.msg}}');
@@ -900,6 +909,7 @@ moduleFor(
}
async ['@test Slow promises waterfall on startup'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let grandmaDeferred = RSVP.defer();
@@ -971,6 +981,7 @@ moduleFor(
}
async ['@test Enter child loading state of pivot route'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let deferred = RSVP.defer();
@@ -1008,6 +1019,7 @@ moduleFor(
}
async [`@test Error events that aren't bubbled don't throw application assertions`](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
this.add(
@@ -1075,6 +1087,7 @@ moduleFor(
}
async ['@test Setting a query param during a slow transition should work'](assert) {
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let deferred = RSVP.defer();
diff --git a/packages/ember/tests/routing/template_rendering_test.js b/packages/ember/tests/routing/template_rendering_test.js
index b1da5207607..8b1b5435e5b 100644
--- a/packages/ember/tests/routing/template_rendering_test.js
+++ b/packages/ember/tests/routing/template_rendering_test.js
@@ -13,6 +13,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor() {
super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this.addTemplate('home', '
Hours
');
this.addTemplate('camelot', '
Is a silly place
');
this.addTemplate('homepage', '
Megatroll
{{this.name}}
');
@@ -305,7 +306,7 @@ moduleFor(
}
['@test Generated names can be customized when providing routes with dot notation'](assert) {
- assert.expect(4);
+ assert.expect(5);
this.addTemplate('index', '
Index
');
this.addTemplate('application', "
Home
{{outlet}}
");
@@ -952,7 +953,7 @@ moduleFor(
}
['@test Route silently fails when cleaning an outlet from an inactive view'](assert) {
- assert.expect(3); // handleURL
+ assert.expect(4); // handleURL
this.addTemplate('application', '{{outlet}}');
this.addTemplate('posts', "{{outlet 'modal'}}");
@@ -999,7 +1000,7 @@ moduleFor(
}
['@test Specifying non-existent controller name in route#render throws'](assert) {
- assert.expect(1);
+ assert.expect(2);
this.router.map(function () {
this.route('home', { path: '/' });
diff --git a/packages/ember/tests/routing/toplevel_dom_test.js b/packages/ember/tests/routing/toplevel_dom_test.js
index 57c5d7aa701..0694e916418 100644
--- a/packages/ember/tests/routing/toplevel_dom_test.js
+++ b/packages/ember/tests/routing/toplevel_dom_test.js
@@ -6,6 +6,7 @@ moduleFor(
class extends ApplicationTestCase {
constructor() {
super(...arguments);
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
this._APPLICATION_TEMPLATE_WRAPPER = ENV._APPLICATION_TEMPLATE_WRAPPER;
}
diff --git a/packages/ember/tests/service_injection_test.js b/packages/ember/tests/service_injection_test.js
index 280f7f81e0e..5e7cb0f00a2 100644
--- a/packages/ember/tests/service_injection_test.js
+++ b/packages/ember/tests/service_injection_test.js
@@ -19,6 +19,7 @@ moduleFor(
this.add('service:my-service', MyService);
this.addTemplate('application', '');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let controller = this.applicationInstance.lookup('controller:application');
@@ -44,6 +45,7 @@ moduleFor(
this.add('service:my-service', MyService);
this.addTemplate('application', '');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
let instance = await this.visit('/');
let controller = this.applicationInstance.lookup('controller:application');
@@ -71,6 +73,7 @@ moduleFor(
this.add('service:my-service', MyService);
this.addTemplate('application', '');
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
await this.visit('/');
let controller = this.applicationInstance.lookup('controller:application');
diff --git a/packages/ember/tests/view_instrumentation_test.js b/packages/ember/tests/view_instrumentation_test.js
index 4fa35d8bf5c..cbcf1a44471 100644
--- a/packages/ember/tests/view_instrumentation_test.js
+++ b/packages/ember/tests/view_instrumentation_test.js
@@ -29,6 +29,7 @@ moduleFor(
after() {},
});
+ expectDeprecation('Usage of `renderTemplate` is deprecated.');
return this.visit('/')
.then(() => {
assert.equal(this.textValue(), 'Index', 'It rendered the correct template');