Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.5.0-beta1
-
None
-
shindig java
Description
I ran into a problem with JS API tests in shindig.
It seems that it does not gather the tests asserts correctly in EndToEndTest.java.
I run test with the following command:
mvn -Dtest=EndToEndTest -DfailIfNoTests=false test -P server
If I only change in the file: personTest.xml
line 34: "Shin Digg" to "Shin Dig"
the output of tests is SUCCESS, when it has to be FAILURE
It does not work with require "osapi" because alertHandler (in EndToEndTest.java) does not wait enough
for getting JS alerts from the gadget page.
"osapi" waits longer than normal "opensocial-9.0", so gadgets.util.registerOnLoadHandler takes longer and is not processed by alertHandler.
This behavior can be easily imitated if we change in testframework.js
gadgets.util.registerOnLoadHandler(executeTest);
into
setTimeout(executeTest, 2000);
In this case all the tests become broken.
There is a simple one-line solution to it. The patch is on the way.