tests/integration/components/bsy-alert-test.js in bootstrap-bookingsync-sass-1.0.5 vs tests/integration/components/bsy-alert-test.js in bootstrap-bookingsync-sass-2.0.0
- old
+ new
@@ -1,24 +1,26 @@
-import { moduleForComponent, test } from 'ember-qunit';
+import { module, test } from 'qunit';
+import { setupRenderingTest } from 'ember-qunit';
+import { render } from '@ember/test-helpers';
import hbs from 'htmlbars-inline-precompile';
-moduleForComponent('bsy-alert', 'Integration | Component | bsy alert', {
- integration: true
-});
+module('Integration | Component | bsy alert', function(hooks) {
+ setupRenderingTest(hooks);
-test('it renders', function(assert) {
- // Set any properties with this.set('myProperty', 'value');
- // Handle any actions with this.on('myAction', function(val) { ... });"
+ test('it renders', async function(assert) {
+ // Set any properties with this.set('myProperty', 'value');
+ // Handle any actions with this.on('myAction', function(val) { ... });"
- this.render(hbs`{{bsy-alert}}`);
+ await render(hbs`{{bsy-alert}}`);
- assert.equal(this.$().text().trim(), '');
+ assert.dom().hasText('');
- // Template block usage:"
- this.render(hbs`
- {{#bsy-alert}}
- template block text
- {{/bsy-alert}}
- `);
+ // Template block usage:"
+ await render(hbs`
+ {{#bsy-alert}}
+ template block text
+ {{/bsy-alert}}
+ `);
- assert.equal(this.$().text().trim(), 'template block text');
+ assert.dom().hasText('template block text');
+ });
});