adobe / adobe/aem-project-archetype

Cypress tests not generated when using uiTestingFramework parameter

Open
#1,127 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
596
Forks
431
Avg merge
10d 6h
Merged PRs (30d)
1

Description

### Expected Behaviour
When `uiTestingFramework` is set to `cypress` then cypress tests should be generated.

### Actual Behaviour
Archetype always generates `ui.tests` with `wdio` tests.

### Reproduce Scenario (including but not limited to)

#### Steps to Reproduce
When I try to generate project from latest archetype with `uiTestingFramework` set to `cypress` the `ui.tests` module does not contain cypress tests. Command I am trying:

```
mvn -B org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate \
-D archetypeGroupId=com.adobe.aem \
-D archetypeArtifactId=aem-project-archetype \
-D archetypeVersion=43 \
-D aemVersion=cloud \
-D appTitle="AEM Cloud" \
-D appId="aem-cloud" \
-D groupId="com.aem" \
-D uiTestingFramework="cypress" \
-D singleCountry=n \
-D includeExamples=y \
-D includeErrorHandler=y \
-D includeFormscommunications=y \
-D includeFormsenrollment=y \
```
I also tried `-D uiTestingFramework=cypress` and running the command without `uiTestingFramework` parameter as `cypress` should be the default value according to README.md.

#### Platform and Version
- Mac OS 13.0, Apple M1 Max
- Java version: 11.0.16.1
- Apache Maven 3.8.6

#### Sample Code that illustrates the problem

#### Logs taken while reproducing problem
In the logs I can not see the `uiTestingFramework` parameter listed:

```
INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: aem-project-archetype:43
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: com.aem
[INFO] Parameter: artifactId, Value: aem-cloud
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: package, Value: com.aem
[INFO] Parameter: packageInPathFormat, Value: com/aem/
[INFO] Parameter: includeForms, Value: n
[INFO] Parameter: includeFormsenrollment, Value: y
[INFO] Parameter: country, Value: us
[INFO] Parameter: amp, Value: n
[INFO] Parameter: groupId, Value: com.aem
[INFO] Parameter: enableDynamicMedia, Value: n
[INFO] Parameter: language, Value: en
[INFO] Parameter: appTitle, Value: AEM Cloud Starter
[INFO] Parameter: enableSSR, Value: n
[INFO] Parameter: appId, Value: aem-cloud
[INFO] Parameter: artifactId, Value: aem-cloud
[INFO] Parameter: includeFormscommunications, Value: y
[INFO] Parameter: singleCountry, Value: n
[INFO] Parameter: includeErrorHandler, Value: y
[INFO] Parameter: datalayer, Value: y
[INFO] Parameter: precompiledScripts, Value: n
[INFO] Parameter: includeDispatcherConfig, Value: y
[INFO] Parameter: sdkFormsVersion, Value: latest
[INFO] Parameter: package, Value: com.aem
[INFO] Parameter: includeExamples, Value: y
[INFO] Parameter: commerceEndpoint, Value: https://hostname.com/graphql
[INFO] Parameter: includeFormsheadless, Value: n
[INFO] Parameter: version, Value: 1.0.0-SNAPSHOT
[INFO] Parameter: aemVersion, Value: cloud
[INFO] Parameter: includeCommerce, Value: n
[INFO] Parameter: frontendModule, Value: general
[INFO] Parameter: sdkVersion, Value: latest
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Maven archetype generation command and compare README.md with the generated ui.tests module. Trace where the uiTestingFramework parameter is defined and applied to the archetype templates. Done means selecting cypress generates Cypress tests instead of wdio tests, including when the parameter is omitted if Cypress is the documented default.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, javascript
Domain
build-system, testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.