BeelGroup / Docear-Online-HTW---Frontend

0 stars 0 forks source link

jsplumb maybe has browser incompatibilities #7

Closed schleichardt closed 11 years ago

schleichardt commented 11 years ago

I tried to create a Selenium test that clicks on a link for a mind map and loads it, but HTMLUNIT has Problems with JSplumb. HTMLUNIT behaves like IE8 I think.

Here is my Stack Trace

michael@ms1:~/Dropbox/imi/Docear/HTW-Frontend$ play test [info] Loading project definition from /home/michael/Dropbox/imi/Docear/HTW-Frontend/project [info] Set current project to Docear Frontend (in build file:/home/michael/Dropbox/imi/Docear/HTW-Frontend/) [info] Compiling 2 Java sources to /home/michael/Dropbox/imi/Docear/HTW-Frontend/target/scala-2.9.1/test-classes... [warn] Note: /home/michael/Dropbox/imi/Docear/HTW-Frontend/test/features/mindmap/node/Visualization.java uses unchecked or unsafe operations. [warn] Note: Recompile with -Xlint:unchecked for details. [info] assets.HandlebarsDeployTest [info] + assets.HandlebarsDeployTest.testDeploymentOfNodeHandlebar [info] [info] [info] Total for test assets.HandlebarsDeployTest [info] Finished in 1.582 seconds [info] 1 tests, 0 failures, 0 errors [error] Test features.mindmap.node.Visualization.testText failed: org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "Dot" from undefined (http://localhost:3333/assets/javascripts/jquery.jsPlumb-1.3.16-all-min.js#1) [error] Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01' [error] System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-35-generic', java.version: '1.7.0_09' [error] Driver info: driver.version: HtmlUnitDriver [error] at play.test.Helpers.running(Helpers.java:350) [error] at base.DocearHttpTest.runInBrowser(DocearHttpTest.java:30) [error] at features.mindmap.node.Visualization.testText(Visualization.java:26) [error] ... [error] Caused by: org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "Dot" from undefined (http://localhost:3333/assets/javascripts/jquery.jsPlumb-1.3.16-all-min.js#1) [error] Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 22:18:01' [error] System info: os.name: 'Linux', os.arch: 'amd64', os.version: '3.2.0-35-generic', java.version: '1.7.0_09' [error] Driver info: driver.version: HtmlUnitDriver [error] at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:353) [error] at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:334) [error] at org.fluentlenium.core.Fluent.goTo(Fluent.java:122) [error] at features.mindmap.node.Visualization$1.invoke(Visualization.java:29) [error] at features.mindmap.node.Visualization$1.invoke(Visualization.java:26) [error] at play.test.Helpers.running(Helpers.java:348) [error] ... 67 more [error] Caused by: com.gargoylesoftware.htmlunit.ScriptException: TypeError: Cannot read property "Dot" from undefined (http://localhost:3333/assets/javascripts/jquery.jsPlumb-1.3.16-all-min.js#1) [error] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:595) [error] at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537) [error] at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538) [error] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:545) [error] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.callFunction(JavaScriptEngine.java:520) [error] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptFunctionIfPossible(HtmlPage.java:896) [error] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeEventListeners(EventListenersContainer.java:162) [error] at com.gargoylesoftware.htmlunit.javascript.host.EventListenersContainer.executeBubblingListeners(EventListenersContainer.java:221) [error] at com.gargoylesoftware.htmlunit.javascript.host.Node.fireEvent(Node.java:735) [error] at com.gargoylesoftware.htmlunit.html.HtmlElement$2.run(HtmlElement.java:866) [error] at net.sourceforge.htmlunit.corejs.javascript.Context.call(Context.java:537) [error] at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.call(ContextFactory.java:538) [error] at com.gargoylesoftware.htmlunit.html.HtmlElement.fireEvent(HtmlElement.java:871) [error] at com.gargoylesoftware.htmlunit.html.HtmlPage.executeEventHandlersIfNeeded(HtmlPage.java:1162) [error] at com.gargoylesoftware.htmlunit.html.HtmlPage.initialize(HtmlPage.java:202) [error] at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseInto(WebClient.java:440) [error] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:311) [error] at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:373) [error] at org.openqa.selenium.htmlunit.HtmlUnitDriver.get(HtmlUnitDriver.java:347) [error] ... 72 more [error] Caused by: net.sourceforge.htmlunit.corejs.javascript.EcmaError: TypeError: Cannot read property "Dot" from undefined (http://localhost:3333/assets/javascripts/jquery.jsPlumb-1.3.16-all-min.js#1) [error] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3790) [error] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3768) [error] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3796) [error] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3815) [error] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.undefReadError(ScriptRuntime.java:3828) [error] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.getObjectElem(ScriptRuntime.java:1460) [error] at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpretLoop(Interpreter.java:1428) [error] at net.sourceforge.htmlunit.corejs.javascript.Interpreter.interpret(Interpreter.java:854) [error] at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:164) [error] at net.sourceforge.htmlunit.corejs.javascript.ContextFactory.doTopCall(ContextFactory.java:429) [error] at com.gargoylesoftware.htmlunit.javascript.HtmlUnitContextFactory.doTopCall(HtmlUnitContextFactory.java:267) [error] at net.sourceforge.htmlunit.corejs.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3183) [error] at net.sourceforge.htmlunit.corejs.javascript.InterpretedFunction.call(InterpretedFunction.java:162) [error] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$4.doRun(JavaScriptEngine.java:538) [error] at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine$HtmlUnitContextAction.run(JavaScriptEngine.java:589) [error] ... 90 more [error] Failed: : Total 3, Failed 1, Errors 0, Passed 2, Skipped 0 [error] Failed tests: [error] features.mindmap.node.Visualization

schleichardt commented 11 years ago

Maybe we doesn't initialize jsPlumb right: https://groups.google.com/forum/?fromgroups=#!msg/jsplumb/qYN4jdFtBNU/ygC36QL6IGAJ

But I put all in a jsPlumb.ready function block and it still doesn't work.