[
https://issues.apache.org/jira/browse/RANGER-2255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16654137#comment-16654137
]
Csaba Koncz commented on RANGER-2255:
-------------------------------------
Added JavaScript testing infrastructure (Karma, Mocha, PhantomJS) and a minimal
test that checks whether the JavaScript application can be (hopefully) loaded:
[https://reviews.apache.org/r/69067/]
This required two changes in the production code:
# Main.js was converted to an AMD module (it did not have a define wrapper,
now it has)
# Main.js loading is triggered by a script tag in index.html. The production
and development versions now differ only in how the JavaScript assets are
loaded into the browser:
## by letting RequireJS know the asset locations in Init.js and then rely on
the recursive download
## by inlining all resources via Main.min.js. No RequireJS configuration is
needed in this case.
The test execution does not use index.html but has two configurations that
differ only in the JS module loading method.
> Add JavaScript unit tests
> -------------------------
>
> Key: RANGER-2255
> URL: https://issues.apache.org/jira/browse/RANGER-2255
> Project: Ranger
> Issue Type: Wish
> Components: admin
> Affects Versions: 0.7.0, 2.0.0, 1.2.1
> Reporter: Csaba Koncz
> Priority: Minor
> Fix For: 2.0.0
>
>
> It would be nice if the admin-ui project would have JavaScript unit tests.
> As with RANGER-2220 JavaScript minification was introduced, that can lead to
> new type of loading errors that were not seen before.
> It would be nice if there was an automatic check that validates the minified
> output.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)