author | ymh <ymh.work@gmail.com> |
Fri, 02 Dec 2016 00:22:31 +0100 | |
changeset 454 | 710a2ae08a74 |
parent 217 | 989b9c36b849 |
permissions | -rw-r--r-- |
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 |
}); |