Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for..in when polyfills are used #936

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RichardBradley
Copy link
Contributor

This branch fixes #863

There are two issues:

  1. This fix requires the PR Iterating over array entries using "for .. in" breaks if Array polyfills are used admin-config#57 but that hasn't been merged. On this branch, I've added a dependency on "git://github.com/RichardBradley/admin-config.git#a455071e", but obviously you won't want that on master. What's the correct fix here? Do we just need to deal wtih Iterating over array entries using "for .. in" breaks if Array polyfills are used admin-config#57 before this?
  2. I haven't been able to run the e2e tests to add a regression test for this issue. I'd prefer to add a test which fails before this patch and passes afterwards. See my comments on Iterating over array entries using "for .. in" breaks if Array polyfills are used  #863 for how to trigger this bug.

I get:

$ make test-e2e
Running "exec:webpack" (exec) task
Hash: e6794cb9016d826da037
Version: webpack 1.12.9
Time: 12092ms
                      Asset     Size  Chunks             Chunk Names
      build/ng-admin.min.js  3.14 MB       0  [emitted]  ng-admin
 build/ng-admin-only.min.js  2.35 MB       1  [emitted]  ng-admin-only
     build/ng-admin.min.css   1.6 MB       0  [emitted]  ng-admin
build/ng-admin-only.min.css  10.6 kB       1  [emitted]  ng-admin-only
   [0] multi ng-admin 160 bytes {0} [built]
   [0] multi ng-admin-only 52 bytes {1} [built]
    + 278 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 2 hidden modules
Child extract-text-webpack-plugin:
        + 8 hidden modules
Child extract-text-webpack-plugin:
        + 7 hidden modules

Running "copy:test_sample_app" (copy) task
Created 1 directories, copied 4 files

Running "copy:test_build" (copy) task
Copied 8 files

Running "copy:test_fakerest" (copy) task
Copied 1 file

Running "copy:test_sinon_server" (copy) task
Copied 1 file

Running "connect:test" (connect) task
Started connect web server on http://0.0.0.0:8001

Running "protractor:e2e" (protractor) task
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://10.0.2.15:48650/wd/hub
ERROR - Unable to start a WebDriver session.

/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113
  var template = new Error(this.message);
                 ^
UnknownError: null
    at new bot.Error (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
    at Object.bot.response.checkResponse (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
    at /home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:152:24
    at /home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    at [object Object].webdriver.promise.ControlFlow.runInNewFrame_ (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    at notify (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
    at notifyAll (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:442:7)
    at resolve (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:420:7)
    at fulfill (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/promise.js:535:5)
    at /home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
==== async task ====
WebDriver.createSession()
    at Function.webdriver.WebDriver.acquireSession_ (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:149:22)
    at Function.webdriver.WebDriver.createSession (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:123:30)
    at Builder.build (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/selenium-webdriver/builder.js:294:22)
    at DriverProvider.getNewDriver (/home/vagrant/src/ng-admin/node_modules/protractor/lib/driverProviders/driverProvider.js:38:7)
    at Runner.createBrowser (/home/vagrant/src/ng-admin/node_modules/protractor/lib/runner.js:180:37)
    at /home/vagrant/src/ng-admin/node_modules/protractor/lib/runner.js:257:21
    at _fulfilled (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/home/vagrant/src/ng-admin/node_modules/protractor/node_modules/q/q.js:759:13)
[launcher] Process exited with error code 1
>>
Fatal error: protractor exited with code: 1
make: *** [test-e2e] Error 3
[vagrant@localhost ng-admin]$

@RichardBradley
Copy link
Contributor Author

Any thoughts on this?
This is necessary for me to use ng-admin at the same time as polyfills like Array.find

@RichardBradley
Copy link
Contributor Author

(bump)

@RichardBradley
Copy link
Contributor Author

Are you waiting for anything from me on this?

Last time I checked, this was ready to merge. It is old now, so it's possible that it is no longer correct.

The CI failure is due to the ng-admin / admin-config repository split and does not indicate a real bug, as noted above.

@RichardBradley
Copy link
Contributor Author

(From my point of view, this is ready to merge)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Iterating over array entries using "for .. in" breaks if Array polyfills are used
1 participant