Wednesday, May 4, 2016

Re: GWT unit tests along with JsInterop and external javascript

Yes, I have put <jsInteropMode>JS</jsInteropMode> although I don't think it
is really necessary because running the app (not the unit tests) works ok
without this flag. Anyway, I have it.
The error I got when I want to create a Person object in my unit test is:
com.google.gwt.core.client.JavaScriptException: (TypeError) : Cannot read
property "example" from undefined

The Persons' definitions from js and java are:
JS: Ext.define('com.example.formula.client.Person', {...});

JAVA: package com.example.formula.client;

@JsType(isNative = true, namespace="com.example.formula.client",
name="Person")
public class Person {
...
}

It seems that the namespace of the JsType is not working with GwtTestCase..
I don't know..



--
View this message in context: http://google-web-toolkit.2317884.n4.nabble.com/GWT-unit-tests-along-with-JsInterop-and-external-javascript-tp15739p15743.html
Sent from the Google Web Toolkit mailing list archive at Nabble.com.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment