Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use qunit-dom in helper and component test blueprints #19384

Merged
merged 1 commit into from Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -12,7 +12,7 @@ module('<%= friendlyTestDescription %>', function(hooks) {

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

assert.equal(this.element.textContent.trim(), '');
assert.dom(this.element).hasText('');

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

assert.equal(this.element.textContent.trim(), 'template block text');
assert.dom(this.element).hasText('template block text');
});
});<% } else if (testType === 'unit') { %>import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
Expand Down
Expand Up @@ -12,7 +12,7 @@ module('<%= friendlyTestName %>', function(hooks) {

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

assert.equal(this.element.textContent.trim(), '1234');
assert.dom(this.element).hasText('1234');
});
});<% } else if (testType === 'unit') { %>import { <%= camelizedModuleName %> } from '<%= dasherizedModulePrefix %>/helpers/<%= dasherizedModuleName %>';
import { module, test } from 'qunit';
Expand Down
4 changes: 2 additions & 2 deletions node-tests/fixtures/component-test/rfc232.js
Expand Up @@ -12,7 +12,7 @@ module('Integration | Component | x-foo', function(hooks) {

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

assert.equal(this.element.textContent.trim(), '');
assert.dom(this.element).hasText('');

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

assert.equal(this.element.textContent.trim(), 'template block text');
assert.dom(this.element).hasText('template block text');
});
});
2 changes: 1 addition & 1 deletion node-tests/fixtures/helper-test/rfc232.js
Expand Up @@ -12,6 +12,6 @@ module('Integration | Helper | foo/bar-baz', function(hooks) {

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

assert.equal(this.element.textContent.trim(), '1234');
assert.dom(this.element).hasText('1234');
});
});