Can't apply 7.5.0 version to existing projects with Cypress.
Reproduce the error
Welcome to JHipster v7.5.0
Application files will be generated in folder: /Users/youngseon/temp/vue-cypress
_______________________________________________________________________________________________________________
Documentation for creating an application is at https://www.jhipster.tech/creating-an-app/
If you find JHipster useful, consider sponsoring the project at https://opencollective.com/generator-jhipster
_______________________________________________________________________________________________________________
? Which *type* of application would you like to create? Monolithic application (recommended for simple projects)
? What is the base name of your application? jhipster
? Do you want to make it reactive with Spring WebFlux? No
? What is your default Java package name? com.mycompany.myapp
? Which *type* of authentication would you like to use? JWT authentication (stateless, with a token)
? Which *type* of database would you like to use? SQL (H2, PostgreSQL, MySQL, MariaDB, Oracle, MSSQL)
? Which *production* database would you like to use? PostgreSQL
? Which *development* database would you like to use? H2 with disk-based persistence
? Which cache do you want to use? (Spring cache abstraction) Ehcache (local cache, for a single node)
? Do you want to use Hibernate 2nd level cache? Yes
? Would you like to use Maven or Gradle for building the backend? Maven
? Do you want to use the JHipster Registry to configure, monitor and scale your application? No
? Which other technologies would you like to use?
? Which *Framework* would you like to use for the client? Angular
? Do you want to generate the admin UI? Yes
? Would you like to use a Bootswatch theme (https://bootswatch.com/)? Default JHipster
? Would you like to enable internationalization support? Yes
? Please choose the native language of the application English
? Please choose additional languages to install
? Besides JUnit and Jest, which testing frameworks would you like to use? Cypress
? Would you like to install other generators from the JHipster Marketplace? No
? Would you like to generate code coverage for Cypress tests? [Experimental] No
KeyStore '/Users/youngseon/temp/vue-cypress/src/main/resources/config/tls//keystore.p12' already exists. Leaving unchanged.
WARNING! /Users/youngseon/jhipster/generator-jhipster/generators/cypress/templates/src/test/javascript/cypress/integration/account/register-page.spec.ts.ejs
ERROR! /Users/youngseon/jhipster/generator-jhipster/generators/cypress/templates/src/test/javascript/cypress/integration/account/register-page.spec.ts.ejs:42
40| cy.visit('');
41| cy.clickOnRegisterItem();
>> 42| cy.url().should('match', /<%= registerPage.replaceAll('/', '\\/') %>$/);
43| });
44|
45| it('should load the register page', () => {
registerPage.replaceAll is not a function
TypeError: /Users/youngseon/jhipster/generator-jhipster/generators/cypress/templates/src/test/javascript/cypress/integration/account/register-page.spec.ts.ejs:42
40| cy.visit('');
41| cy.clickOnRegisterItem();
>> 42| cy.url().should('match', /<%= registerPage.replaceAll('/', '\\/') %>$/);
43| });
44|
45| it('should load the register page', () => {
registerPage.replaceAll is not a function
at module.exports.eval (eval at compile (/Users/youngseon/jhipster/generator-jhipster/node_modules/ejs/lib/ejs.js:662:12), <anonymous>:22:39)
at register-page.spec.ts (/Users/youngseon/jhipster/generator-jhipster/node_modules/ejs/lib/ejs.js:692:17)
at /Users/youngseon/jhipster/generator-jhipster/node_modules/ejs/lib/ejs.js:258:40
at new Promise (<anonymous>)
at tryHandleCache (/Users/youngseon/jhipster/generator-jhipster/node_modules/ejs/lib/ejs.js:256:14)
at Object.exports.renderFile (/Users/youngseon/jhipster/generator-jhipster/node_modules/ejs/lib/ejs.js:489:10)
at Object.renderContent (/Users/youngseon/jhipster/generator-jhipster/generators/utils.js:305:23)
at module.exports.template (/Users/youngseon/jhipster/generator-jhipster/generators/generator-base-private.js:738:8)
at /Users/youngseon/jhipster/generator-jhipster/generators/generator-base.js:2268:47
at Array.map (<anonymous>)
at /Users/youngseon/jhipster/generator-jhipster/generators/generator-base.js:2184:42
at Array.map (<anonymous>)
at /Users/youngseon/jhipster/generator-jhipster/generators/generator-base.js:2181:29
at Array.map (<anonymous>)
at module.exports.writeFilesToDisk (/Users/youngseon/jhipster/generator-jhipster/generators/generator-base.js:2180:45)
at module.exports.writeFiles (/Users/youngseon/jhipster/generator-jhipster/generators/cypress/files.js:89:19) {
path: '/Users/youngseon/jhipster/generator-jhipster/generators/cypress/templates/src/test/javascript/cypress/integration/account/register-page.spec.ts.ejs'
}
Overview of the issue
Generator fails when JWT, Cypress is selected.
Motivation for or Use Case
Can't apply 7.5.0 version to existing projects with Cypress.
Reproduce the error
Suggest a Fix
Could be fixed like below?
/generator-jhipster/generators/cypress/templates/src/test/javascript/cypress/integration/account/register-page.spec.ts.ejs
JHipster Version(s)
7.5.0
Browsers and Operating System
MacOS 11.6