Reduce JS runtime warnings and errors
Description
Fix or otherwise deal with JS warnings and errors, then turn on test fail for warnings.
Make PR with warnings=error, fix and push.
Pull request: https://github.com/zanata/zanata-server/pull/1072
Activity
When this is tested, please check on and ZNTA-815, since they are affected by these URL changes.
EDIT: also
Unfortunately, I haven't been able to eliminate the JS errors without causing bigger problems (or spending a lot more time on this).
We still have a number of intermittent JS errors, some of which seem to be triggered by DeltaSpike's LAZY mode's use of client-side redirects mid-page when dswid is missing. This sometimes leads to scripts being aborted in strange ways (eg skip signals.js but run crossroads.js which depends on it), which triggers JS errors on the old page just before loading the new page.
We could eliminate at least some of these errors by using DeltaSpike's CLIENTWINDOW mode, but I haven't been able to find a solution for the server-side error "ContextNotActiveException: WELD-001303 No active contexts for scope type org.apache.deltaspike.core.api.scope.WindowScoped" which seems to happen with CLIENTWINDOW when forms are POSTed without a windowId (eg when viewing a project page with stats).
However, on the bright side: the Selenium tests should now log better JavaScript information, functional tests should not have any trouble starting the dummy SMTP server, and we shouldn't run into this problem when opening new tabs, because I got rid of all ViewAccessScoped beans.
JavaScript errors are now treated as test failures: https://github.com/zanata/zanata-server/pull/1056
Correction: oops, not really.
Assignee
Reporter
Labels
Tested Version/s
Epic Link
Components
Sprint
Fix versions
Priority
