cms/app-client/tests/integration/components/notice-component-test.js
author ymh <ymh.work@gmail.com>
Thu, 06 Apr 2017 11:29:14 +0200
changeset 530 a76bae4795d5
parent 217 989b9c36b849
permissions -rw-r--r--
version 0.0.19
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
217
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     1
import { moduleForComponent, test } from 'ember-qunit';
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     2
import hbs from 'htmlbars-inline-precompile';
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     3
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     4
moduleForComponent('notice-component', 'Integration | Component | notice component', {
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     5
  integration: true
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     6
});
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     7
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     8
test('it renders', function(assert) {
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
     9
  // Set any properties with this.set('myProperty', 'value');
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    10
  // Handle any actions with this.on('myAction', function(val) { ... });
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    11
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    12
  this.render(hbs`{{notice-component}}`);
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    13
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    14
  assert.equal(this.$().text().trim(), '');
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    15
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    16
  // Template block usage:
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    17
  this.render(hbs`
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    18
    {{#notice-component}}
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    19
      template block text
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    20
    {{/notice-component}}
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    21
  `);
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    22
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    23
  assert.equal(this.$().text().trim(), 'template block text');
989b9c36b849 Toolbar and Notice component styles
Chloe Laisne <chloe.laisne@gmail.com>
parents:
diff changeset
    24
});