Re: Test Strategies for Modern GWT (i.e. Elemental2 etc)

2017-09-19 Thread Thomas Broyer
On Tuesday, September 19, 2017 at 9:02:45 AM UTC+2, Peter Donald wrote: > > Excellent - I will look into it. I had always assumed as the modern code > did not use GWT.create() anymore that GwtMockito was no longer necessary > but I guess it must have other goodies in there ;) > > Anyhoo - will

Re: Test Strategies for Modern GWT (i.e. Elemental2 etc)

2017-09-19 Thread Peter Donald
Excellent - I will look into it. I had always assumed as the modern code did not use GWT.create() anymore that GwtMockito was no longer necessary but I guess it must have other goodies in there ;) Anyhoo - will dig in. This is one occasion where I do miss the javascript ecosystem with it's ease of

Re: Test Strategies for Modern GWT (i.e. Elemental2 etc)

2017-09-18 Thread Ignacio Baca Moreno-Torres
Elemento (so elemental2) uses it to test the builder, but as Erik said, not quite practical for anything else than non-browser-related logic testing. https://github.com/hal/elemento/blob/develop/core/src/test/java/org/jboss/gwt/elemento/core/ElementsBuilderTest.java#L50 On Tue, Sep 19, 2017 at 3:4

Re: Test Strategies for Modern GWT (i.e. Elemental2 etc)

2017-09-18 Thread Erik Kuefler
If you want to further explore the mock-based option you should check out GwtMockito: https://github.com/google/gwtmockito. It handles natives and finals and has a few other GWT-specific features. I haven't made any big changes to it in the last couple of years, but if there are new things it c

Re: Test Strategies for Modern GWT (i.e. Elemental2 etc)

2017-09-17 Thread Jens
AFAICT Elemental 2 doesn't really have any code to be tested (Java methods directly map to JS methods). You would test the browser API itself which browser vendors already do. So I would mock any elemental 2 class and use JUNIT to test whatever component/abstraction you build on top of elemental

Test Strategies for Modern GWT (i.e. Elemental2 etc)

2017-09-17 Thread Peter Donald
Hi, Has anyone got any good examples of how they are testing GWT code that is interacting with the browser APIs. Historically we just ignored that low level code as we either were using pre-existing Widgets that we implicitly trusted and for that limited amount of jsni or browser interaction that