import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('foo-bar', 'Integration | Polymer | Shadow DOM', {
  integration: true
});

test('Uses native Shadow DOM if available', function(assert) {
  if (!window.Polymer.Settings.nativeShadow) {
    return assert.expect(0);
  }

  assert.expect(2);

  this.render(hbs`<paper-button></paper-button>`);

  assert.ok(document.querySelector('paper-button').shadowRoot,
    'paper-button has shadowRoot');
  assert.equal(this.$('paper-button').attr('role'), 'button',
    'role is attached to button immediately');
});

import { moduleForComponent, test } from 'ember-qunit';
import hbs from 'htmlbars-inline-precompile';

moduleForComponent('foo-bar', 'Integration | Polymer | Shadow DOM', {
  integration: true
});

test('Uses native Shadow DOM if available', function(assert) {
  if (!window.Polymer.Settings.nativeShadow) {
    return assert.expect(0);
  }

  assert.expect(2);

  this.render(hbs`<paper-button></paper-button>`);

  assert.ok(document.querySelector('paper-button').shadowRoot,
    'paper-button has shadowRoot');
  assert.equal($('paper-button').attr('role'), 'button',
    'role is attached to button immediately');
});

Fix jquery scope once again, in integration test 🔨
Fix jquery scope once again, in integration test 🔨

For some reason ember 2.9.0 and above has some serious problems with
the previously used scope. This should fix a broken build.
