コード例 #1
0
test('"for" takes an string id', function (assert) {
  let target = Target.create({
    target: "ember-testing-container",
    on: 'click'
  });
  target.attach();
  assert.equal(target.element, document.getElementById("ember-testing-container"));
  target.detach();
});
コード例 #2
0
test('"for" takes an element', function (assert) {
  let element = document.getElementById("ember-testing-container");
  let target = Target.create({
    target: element,
    on: 'click'
  });
  target.attach();
  assert.equal(target.element, element);
  target.detach();
});
コード例 #3
0
ファイル: target-test.js プロジェクト: Wikia/ember-pop-over
test('"for" takes an element', function() {
  expect(1);

  var element = document.getElementById("ember-testing-container");
  var target = Target.create({
    target: element,
    on: 'click'
  });
  target.attach();
  equal(target.element, element);
  target.detach();
});
コード例 #4
0
test('"for" takes a component', function (assert) {
  let component = Ember.Component.create();
  run(function () {
    component.appendTo("#qunit-fixture");
  });
  let target = Target.create({
    target: component,
    on: 'click'
  });
  target.attach();

  assert.equal(target.element, get(component, 'element'));

  run(function () {
    component.destroy();
  });
  target.detach();
});