Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
patocallaghan committed Mar 1, 2021
1 parent 2676ee3 commit 21350a5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
24 changes: 13 additions & 11 deletions packages/ember-testing/tests/acceptance_test.js
Expand Up @@ -51,6 +51,7 @@ if (!jQueryDisabled) {
'route:posts',
Route.extend({
renderTemplate() {
expectDeprecation('Usage of `renderTemplate` is deprecated.');
testContext.currentRoute = 'posts';
this._super(...arguments);
},
Expand All @@ -73,6 +74,7 @@ if (!jQueryDisabled) {
'route:comments',
Route.extend({
renderTemplate() {
expectDeprecation('Usage of `renderTemplate` is deprecated.');
testContext.currentRoute = 'comments';
this._super(...arguments);
},
Expand Down Expand Up @@ -125,7 +127,7 @@ if (!jQueryDisabled) {
}

[`@test helpers can be chained with then`](assert) {
assert.expect(6);
assert.expect(8);

window
.visit('/posts')
Expand Down Expand Up @@ -164,7 +166,7 @@ if (!jQueryDisabled) {
}

[`@test helpers can be chained to each other (legacy)`](assert) {
assert.expect(7);
assert.expect(10);

window
.visit('/posts')
Expand Down Expand Up @@ -192,7 +194,7 @@ if (!jQueryDisabled) {
}

[`@test helpers don't need to be chained`](assert) {
assert.expect(5);
assert.expect(8);

window.visit('/posts');

Expand All @@ -219,7 +221,7 @@ if (!jQueryDisabled) {
}

[`@test Nested async helpers`](assert) {
assert.expect(5);
assert.expect(8);

window.visit('/posts');

Expand Down Expand Up @@ -247,7 +249,7 @@ if (!jQueryDisabled) {
}

[`@test Multiple nested async helpers`](assert) {
assert.expect(3);
assert.expect(5);

window.visit('/posts');

Expand All @@ -270,7 +272,7 @@ if (!jQueryDisabled) {
}

[`@test Helpers nested in thens`](assert) {
assert.expect(5);
assert.expect(8);

window.visit('/posts').then(() => {
window.click('a:first', '#comments-link');
Expand Down Expand Up @@ -311,7 +313,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;
Expand Down Expand Up @@ -343,7 +345,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({
Expand All @@ -364,7 +366,7 @@ if (!jQueryDisabled) {
}

[`@test should not start routing on the root URL when visiting another`](assert) {
assert.expect(4);
assert.expect(5);

window.visit('/posts');

Expand Down Expand Up @@ -427,7 +429,7 @@ if (!jQueryDisabled) {
}

[`@test visiting a URL that causes another transition should yield the correct URL`](assert) {
assert.expect(2);
assert.expect(3);

window.visit('/redirect');

Expand All @@ -439,7 +441,7 @@ 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(5);

window.visit('/posts');

Expand Down
3 changes: 2 additions & 1 deletion packages/ember/tests/routing/template_rendering_test.js
Expand Up @@ -305,7 +305,7 @@ moduleFor(
}

['@test Generated names can be customized when providing routes with dot notation'](assert) {
assert.expect(4);
assert.expect(5);

this.addTemplate('index', '<div>Index</div>');
this.addTemplate('application', "<h1>Home</h1><div class='main'>{{outlet}}</div>");
Expand All @@ -325,6 +325,7 @@ moduleFor(
'route:foo',
Route.extend({
renderTemplate() {
expectDeprecation('Usage of `renderTemplate` is deprecated.');
assert.ok(true, 'FooBarRoute was called');
return this._super(...arguments);
},
Expand Down

0 comments on commit 21350a5

Please sign in to comment.