Closed kwin closed 5 months ago
@dulvac something you could look into?
@kwin , thanks for bringing this up. IIUC, you'd like the ui test modules themselves to be built when building with maven, in order to catch any build errors locally, when executing a maven build on e.g. the whole archetype. Did I get it right?
@dulvac That is correct
@kwin , sorry for the delay. I had a look at this today and I came to the realization that I'm not sure what you need.
The ui tests being javascript, there's no build. Also, idk what a check would be for e.g. cypress.
What would be the npm
command that we would run as part of the maven build?
I was assuming that something like node --check
could be used (https://nodejs.org/api/cli.html#-c---check)
Yeah, but that doesn't catch much at all. For example, adding a random string wrongtoken
to a random line doesn't throw any error. The only thing it catches is stuff like unclosed brackets
Ok, I think the best thing to do is to run eslint
. This seems to be working best. I'll add that for both js modules.
@kwin sorry for the delay. This fell off the radar for a bit. Should be fixed now
Currently the submodule within
ui-tests
(e.g. either https://github.com/adobe/aem-project-archetype/tree/develop/src/main/archetype/ui.tests.wdio/test-module or https://github.com/adobe/aem-project-archetype/tree/develop/src/main/archetype/ui.tests.cypress/test-module) are only built through the special profiles. Those profiles either require Docker to be installed and/or Selenium and AEM running.For regular local and pre Cloud Manager CI builds those conditions are usually not fulfilled therefore the profiles are not set and this module is not checked at all.
There should be a dedicated profile (active by default) which just builds/checks the tests with the
frontend-maven-plugin
but without actually executing them.This is similar to what is provided in https://github.com/adobe/aem-project-archetype/blob/ea3b2b862ab9299008233b47264ceb9940bbb266/src/main/archetype/ui.tests.wdio/pom.xml#L107 but without the execution part and being active by default.