github.com/outbrain/consul@v1.4.5/ui-v2/tests/integration/components/feedback-dialog-test.js (about)

     1  import { moduleForComponent, test, skip } from 'ember-qunit';
     2  import hbs from 'htmlbars-inline-precompile';
     3  
     4  moduleForComponent('feedback-dialog', 'Integration | Component | feedback dialog', {
     5    integration: true,
     6  });
     7  
     8  skip("it doesn't render anything when used inline");
     9  test('it renders', function(assert) {
    10    // Set any properties with this.set('myProperty', 'value');
    11    // Handle any actions with this.on('myAction', function(val) { ... });
    12  
    13    this.render(hbs`{{feedback-dialog}}`);
    14  
    15    assert.equal(
    16      this.$()
    17        .text()
    18        .trim(),
    19      ''
    20    );
    21  
    22    // Template block usage:
    23    this.render(hbs`
    24      {{#feedback-dialog}}
    25        {{#block-slot 'success'}}
    26        {{/block-slot}}
    27        {{#block-slot 'error'}}
    28        {{/block-slot}}
    29      {{/feedback-dialog}}
    30    `);
    31  
    32    assert.equal(
    33      this.$()
    34        .text()
    35        .trim(),
    36      ''
    37    );
    38  });