django-smart-selects icon indicating copy to clipboard operation
django-smart-selects copied to clipboard

Include evaluation of Javascript code in Travis

Open rooterkyberian opened this issue 8 years ago • 1 comments
trafficstars

The recent pull request https://github.com/digi604/django-smart-selects/pull/172, while it fixed a real nasty XSS, it also introduced couple bugs into javascript code. Some of them (like double forEach loop on the same collection) were quite obvious, but as shown easily gone unnoticed. This situation was especially unfortunate as all previous "working" versions (although containing a security hole) have been simultaneously removed from the PYPI.

This could situation could have been prevented if automatic testes included javascript code. Such tests could be conducted using Django LiveServerTestCase, Selenium&Travis

Steps to reproduce

  1. fork repo & introduce error to javascript code
  2. create a pull request

Expected behavior

Pull request is automatically validate by Travis or other CI and marked as containing errors.

Actual behavior

CI does indeed conduct validation, but it does not include javascript, which is very much part of this project (15% of the code at the moment according to github stats).

rooterkyberian avatar Feb 02 '17 20:02 rooterkyberian

I would love this, but I don't think I have the experience with Selenium to pull this off in any appreciable timeframe.

If you would like to become a collaborator and implement this please email @digi604 or submit a pull request.

blag avatar Feb 21 '17 22:02 blag