I tried the -ea flag (checkAssertions in the POM). It seems to be
incompatible with the flag productionMode. I guess when production mode is
true, assertions are disabled. I ended up with two test executions in my
POM: "jsni-test" for keeping the type checked for legacy JSNI codes, and
"normal-test
On Monday, March 12, 2018 at 9:17:58 AM UTC+1, Mincong Huang wrote:
>
> Thanks, Thomas. Changing to production mode fixed the problem.
>
> However, I noticed that when using production mode in tests, I cannot test
> the type-matching for JSNI anymore. Previously, the GWT generated interface
> co
Thanks, Thomas. Changing to production mode fixed the problem.
However, I noticed that when using production mode in tests, I cannot test
the type-matching for JSNI anymore. Previously, the GWT generated interface
code caught the problem at runtime in development mode. When running in
production m
JsInterop doesn't work in legacy DevMode; you have to run the tests in
production
mode:
https://gwt-maven-plugin.github.io/gwt-maven-plugin/test-mojo.html#productionMode
(this is the default in GWT 2.8, but Mojo's Maven plugin for GWT forces
legacy DevMode by default; may I suggest that you swi
Hi Vassilis,
Thanks for your help. After having specified the TOP_WINDOW as you
suggested, the test
passed in IntelliJ IDEA. However, it is still failing via Maven plugin [1].
I don't understand any
more...
Mincong
[1]: https://travis-ci.org/mincong-h/learning-gwt/jobs/352049257#L769
On Sun, Ma
I would guess that script injector injects by default inside gwt frame.
You need to specify TOP_WINDOW because jsinterop are mapped to $wnd by
default.
Something like that (can't test right now)
ScriptInjector.fromString(js).setWindow(ScriptInjector.TOP_WINDOW).inject();
If you do this then you