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

Show:
Sean Flanigan
December 16, 2015, 4:29 AM
Edited

JavaScript errors are now treated as test failures: https://github.com/zanata/zanata-server/pull/1056

Correction: oops, not really.

Sean Flanigan
February 2, 2016, 6:17 AM

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.

Sean Flanigan
February 16, 2016, 1:57 AM
Edited

When this is tested, please check on and ZNTA-815, since they are affected by these URL changes.

EDIT: also

Ready for Release

Assignee

Sean Flanigan

Reporter

Damian Jansen

Labels

Tested Version/s

None

Epic Link

Components

Sprint

None

Fix versions

Priority

unspecified
Configure