Skip to content

Commit

Permalink
Remove use of this.element in component-test and helper-test bl…
Browse files Browse the repository at this point in the history
…ueprints

(cherry picked from commit c7fa69e)
  • Loading branch information
bertdeblock authored and kategengler committed Aug 7, 2023
1 parent f17aae1 commit 4196a01
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module('<%= friendlyTestDescription %>', function (hooks) {

await render(hbs`<%= selfCloseComponent(componentName) %>`);

assert.dom(this.element).hasText('');
assert.dom().hasText('');

// Template block usage:
await render(hbs`
Expand All @@ -21,7 +21,7 @@ module('<%= friendlyTestDescription %>', function (hooks) {
<%= closeComponent(componentName) %>
`);

assert.dom(this.element).hasText('template block text');
assert.dom().hasText('template block text');
});
});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit';
import { setupTest } from '<%= modulePrefix %>/tests/helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ module('<%= friendlyTestName %>', function (hooks) {

await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

assert.dom(this.element).hasText('1234');
assert.dom().hasText('1234');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module('<%= friendlyTestDescription %>', function (hooks) {

await render(hbs`<%= selfCloseComponent(componentName) %>`);

assert.dom(this.element).hasText('');
assert.dom().hasText('');

// Template block usage:
await render(hbs`
Expand All @@ -21,7 +21,7 @@ module('<%= friendlyTestDescription %>', function (hooks) {
<%= closeComponent(componentName) %>
`);

assert.dom(this.element).hasText('template block text');
assert.dom().hasText('template block text');
});
});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit';
import { setupTest } from '<%= modulePrefix %>/tests/helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ module('<%= friendlyTestName %>', function (hooks) {

await render(hbs`{{<%= dasherizedModuleName %> this.inputValue}}`);

assert.dom(this.element).hasText('1234');
assert.dom().hasText('1234');
});
});
4 changes: 2 additions & 2 deletions node-tests/fixtures/component-test/rfc232-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module('Integration | Component | foo', function (hooks) {

await render(hbs`<Foo />`);

assert.dom(this.element).hasText('');
assert.dom().hasText('');

// Template block usage:
await render(hbs`
Expand All @@ -21,6 +21,6 @@ module('Integration | Component | foo', function (hooks) {
</Foo>
`);

assert.dom(this.element).hasText('template block text');
assert.dom().hasText('template block text');
});
});
4 changes: 2 additions & 2 deletions node-tests/fixtures/component-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module('Integration | Component | x-foo', function (hooks) {

await render(hbs`<XFoo />`);

assert.dom(this.element).hasText('');
assert.dom().hasText('');

// Template block usage:
await render(hbs`
Expand All @@ -21,6 +21,6 @@ module('Integration | Component | x-foo', function (hooks) {
</XFoo>
`);

assert.dom(this.element).hasText('template block text');
assert.dom().hasText('template block text');
});
});
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/rfc232-addon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ module('Integration | Helper | foo', function (hooks) {

await render(hbs`{{foo this.inputValue}}`);

assert.dom(this.element).hasText('1234');
assert.dom().hasText('1234');
});
});
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/rfc232.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ module('Integration | Helper | foo/bar-baz', function (hooks) {

await render(hbs`{{foo/bar-baz this.inputValue}}`);

assert.dom(this.element).hasText('1234');
assert.dom().hasText('1234');
});
});

0 comments on commit 4196a01

Please sign in to comment.