yeoman / generator-polymer

Scaffold out a Polymer project
http://polymer-project.org
926 stars 149 forks source link

Remove polymer.html import from element test templates. #226

Closed andybons closed 8 years ago

andybons commented 8 years ago

Using yo polymer:el with an app generated by yo polymer leads to a test initialization failure on Chrome (45 Mac at the time of this writing) due to the double import:

chrome 45                ✖ Test Suite Initialization

  Failed to execute 'registerElement' on 'Document': Registration failed for type 'dom-module'. A type with that name is already registered.
    <unknown> at   <unknown> at /components/polygerrit/app/bower_components/polymer/polymer-micro.html:263:0
    <unknown> at   <unknown> at /components/polygerrit/app/bower_components/polymer/polymer-micro.html:273:0

chrome 45                ✖ Test Suite Initialization

  Polymer.Base._getExtendedPrototype is not a function
    <unknown> at          desugar at /components/polygerrit/app/bower_components/polymer/polymer-micro.html:70:0
    <unknown> at   window.Polymer at /components/polygerrit/app/bower_components/polymer/polymer-micro.html:57:0
    <unknown> at        <unknown> at /components/polygerrit/app/bower_components/polymer/polymer.html:3202:0
    <unknown> at        <unknown> at /components/polygerrit/app/bower_components/polymer/polymer.html:3255:0

chrome 45                ✖ Test Suite Initialization

  this._desugarBehaviors is not a function
    <unknown> at   HTMLElement.Polymer.Base.registerCallback at /components/polygerrit/app/bower_components/polymer/polymer-micro.html:142:0
    <unknown> at                                    desugar at /components/polygerrit/app/bower_components/polymer/polymer-micro.html:73:0
    <unknown> at                             window.Polymer at /components/polygerrit/app/bower_components/polymer/polymer-micro.html:57:0
    <unknown> at                                  <unknown> at /components/polygerrit/app/elements/change-list/change-list.html:103:0
    <unknown> at                                  <unknown> at /components/polygerrit/app/elements/change-list/change-list.html:165:0

It’s also questionable whether webcomponents.min.js should be included as well since it's included by test/index.html, but I’m not familiar enough with the mechanics or use cases to take a definitive stance. EDIT: nevermind about the webcomponents part :)

samccone commented 8 years ago

lgtm :+1: thanks soooo much @andybons :jack_o_lantern:

andybons commented 8 years ago

:heart: I have regained my sanity, now. ┬─┬ノ( º _ ºノ)

arthurvr commented 8 years ago

LGTM, thanks @andybons.