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