Ensure you have Maven installed. Then:
mvn clean install
cd tests
mvn clean testTo test the library we use karma, mocha and chai.
The tests suite is composed of 4 Maven modules:
tests-app: The source of all the components used for testing.tests-app-wrapper-gwt2: A simple GWT2 entry point that importtests-appand build a GWT2 js app with it.tests-app-wrapper-j2cl: A simple J2CL entry point that importtests-appand build a J2CL js app with it.tests-runner: Contains all the JS tests that runs using the built tests component.
The flow for GWT2 goes like this:
- The
tests-appmodule containing the test components is built as agwt-libusing gwt-maven-plugin. tests-app-wrapper-gwt2importstests-appand build agwt-appalso using gwt-maven-plugin. The target JS files are stored intests-app-wrapper-gwt2/target/vue-gwt-tests-app-wrapper-gwt2-XX-SNAPSHOT/VueGwtTestsAppGwt2/*.js.tests-runnerrunstests-runner/src/test/javascript/karma.conf.ci.gwt2.jswith Karma using frontend-maven-plugin. This loads the GWT2 output JS and the JS tests in Chrome and runs all the tests against the built components.
The flow for J2CL goes like this:
- The
tests-appmodule containing the test components is built as agwt-libusing gwt-maven-plugin, this ends up just being a jar with the source and generated sources. tests-app-wrapper-j2climportstests-appand build a J2CL app using j2cl-maven-plugin. The target JS files are stored intests-app-wrapper-j2cl/target/vue-gwt-tests-app-wrapper-j2cl-XX-SNAPSHOT/VueGwtTests.j2cl.js.tests-runnerrunstests-runner/src/test/javascript/karma.conf.ci.j2cl.jswith Karma using frontend-maven-plugin. This loads the J2CL output JS and the JS tests in Chrome and runs all the tests against the built components.