import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';

moduleForAcceptance('Acceptance | Polymer | index');

test('visiting /', function(assert) {
  visit('/');

  andThen(function() {
    assert.equal(this.currentURL(), '/');
  });

  andThen(function() {
    let done = assert.async();

    let testElement = () => {
      assert.ok(document.querySelector('paper-button').shadowRoot,
        'paper-button has shadowRoot');
      assert.equal(this.$('paper-button').attr('role'), 'button',
        'paper-button rendered successfully');

      done();
    };

    if (window.Polymer.Settings.nativeShadow) {
      testElement();
    } else {
      // wait for elements to be polyfilled
      window.addEventListener('WebComponentsReady', testElement);
    }
  });
});

import { test } from 'qunit';
import moduleForAcceptance from '../../tests/helpers/module-for-acceptance';

moduleForAcceptance('Acceptance | Polymer | index');

test('visiting /', function(assert) {
  visit('/');

  andThen(function() {
    assert.equal(currentURL(), '/');
  });

  andThen(function() {
    let done = assert.async();

    let testElement = () => {
      assert.ok(document.querySelector('paper-button').shadowRoot,
        'paper-button has shadowRoot');
      assert.equal($('paper-button').attr('role'), 'button',
        'paper-button rendered successfully');

      done();
    };

    if (window.Polymer.Settings.nativeShadow) {
      testElement();
    } else {
      // wait for elements to be polyfilled
      window.addEventListener('WebComponentsReady', testElement);
    }
  });
});

Fix scope access in index acceptance test 🔨
Fix scope access in index acceptance test 🔨

This somehow only just started causing problems in ember-cli >= 2.8.0
