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