Uploaded image for project: 'Nuxeo Elements'
  1. Nuxeo Elements
  2. ELEMENTS-345

Fix jQuery import in Nuxeo UI elements test

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 1.0.0
    • Component/s: UI

      Description

      Tests are failing because of:

      16:37:51 chrome 57                ✓ test/nuxeo-notifications-toggle-button.html » <nuxeo-notifications-toggle-button> » when a document is not subscribed » toggle should subscribe the document
      16:37:51 chrome 57                ✖ Test Suite Initialization
      16:37:51 
      16:37:51   jQuery is not defined
      16:37:51     <unknown> at   <unknown> at /components/select2/select2.js:39:0
      16:37:51 
      16:37:51 chrome 57                Tests failed: Error thrown outside of test function: jQuery(...).val(...).select2 is not a function
      16:37:51       HTMLElement._initSelect2 at /components/nuxeo-ui-elements-master/widgets/nuxeo-select2-behavior.html:292
      16:37:51           HTMLElement.attached at /components/nuxeo-ui-elements-master/widgets/nuxeo-select2.html:86
      16:37:51                      <unknown> at /components/polymer/polymer-micro.html:279
      16:37:51               Object.whenReady at /components/polymer/polymer-micro.html:110
      16:37:51   HTMLElement.attachedCallback at /components/polymer/polymer-micro.html:270
      16:37:51   HTMLElement.attachedCallback at /components/polymer/polymer-mini.html:181
      16:37:51         HTMLElement.createFrom at /components/test-fixture/test-fixture.html:208
      16:37:51        HTMLElement.<anonymous> at /components/test-fixture/test-fixture.html:176
      16:37:51        HTMLElement.forElements at /components/test-fixture/test-fixture.html:270
      16:37:51 Test run ended in failure: Error thrown outside of test function: jQuery(...).val(...).select2 is not a function
      16:37:51       HTMLElement._initSelect2 at /components/nuxeo-ui-elements-master/widgets/nuxeo-select2-behavior.html:292
      16:37:51           HTMLElement.attached at /components/nuxeo-ui-elements-master/widgets/nuxeo-select2.html:86
      16:37:51                      <unknown> at /components/polymer/polymer-micro.html:279
      16:37:51               Object.whenReady at /components/polymer/polymer-micro.html:110
      16:37:51   HTMLElement.attachedCallback at /components/polymer/polymer-micro.html:270
      16:37:51   HTMLElement.attachedCallback at /components/polymer/polymer-mini.html:181
      16:37:51         HTMLElement.createFrom at /components/test-fixture/test-fixture.html:208
      16:37:51        HTMLElement.<anonymous> at /components/test-fixture/test-fixture.html:176
      16:37:51        HTMLElement.forElements at /components/test-fixture/test-fixture.html:270
      

      It is random because https://github.com/nuxeo/nuxeo-ui-elements/blob/master/jquery-import.html is importing jQuery async and may not be fast enough for tests.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: