diff --git a/test/.jhipster/application-with-entities-jwt-dto.jdl b/test/.jhipster/application-with-entities-jwt-dto.jdl deleted file mode 100644 index 359ce09c2..000000000 --- a/test/.jhipster/application-with-entities-jwt-dto.jdl +++ /dev/null @@ -1,113 +0,0 @@ -application { - config { - skipClient true - authenticationType jwt - } - entities * -} - -entity Region { - regionName String -} - -entity Country { - countryName String -} - -// an ignored comment -/** not an ignored comment */ -entity Location { - streetAddress String, - postalCode String, - city String, - stateProvince String -} - -entity Department { - departmentName String required -} - -/** - * Task entity. - * @author The JHipster team. - */ -entity Task { - title String, - description String -} - -/** - * The Employee entity. - */ -entity Employee { - /** - * The firstname attribute. - */ - firstName String, - lastName String, - email String, - phoneNumber String, - hireDate Instant, - salary Long, - commissionPct Long -} - -entity Job { - jobTitle String, - minSalary Long, - maxSalary Long -} - -entity JobHistory { - startDate Instant, - endDate Instant, - language Language -} - -enum Language { - FRENCH, ENGLISH, SPANISH -} - -relationship ManyToMany { - Job{task(title)} to Task{job(jobTitle)} -} - -// defining multiple OneToMany relationships with comments -relationship OneToMany { - Employee{job(jobTitle)} to Job{employee(email)}, - /** - * A relationship - */ - Department{employee(email)} to - /** - * Another side of the same relationship - */ - Employee{department(departmentName)} -} - -relationship ManyToOne { - Department{location(streetAddress)} to Location - Location{country(countryName)} to Country - Country{region(regionName)} to Region - Employee{manager} to Employee -} - -// defining multiple oneToOne relationships -relationship OneToOne { - JobHistory{job} to Job, - JobHistory{department} to Department, - JobHistory{employee} to Employee -} - -// Set pagination options -paginate JobHistory, Employee with infinite-scroll -paginate Job with pagination - -// Use Data Transfert Objects (DTO) -dto * with mapstruct - -// Set service options to all except few -service all with serviceClass - -// Set an angular suffix -// angularSuffix * with mySuffix diff --git a/test/.jhipster/application-with-entities-jwt-websockets.jdl b/test/.jhipster/application-with-entities-jwt-websockets.jdl deleted file mode 100644 index 9d23c8b8d..000000000 --- a/test/.jhipster/application-with-entities-jwt-websockets.jdl +++ /dev/null @@ -1,114 +0,0 @@ -application { - config { - skipClient true - authenticationType jwt - websocket spring-websocket - } - entities * -} - -entity Region { - regionName String -} - -entity Country { - countryName String -} - -// an ignored comment -/** not an ignored comment */ -entity Location { - streetAddress String, - postalCode String, - city String, - stateProvince String -} - -entity Department { - departmentName String required -} - -/** - * Task entity. - * @author The JHipster team. - */ -entity Task { - title String, - description String -} - -/** - * The Employee entity. - */ -entity Employee { - /** - * The firstname attribute. - */ - firstName String, - lastName String, - email String, - phoneNumber String, - hireDate Instant, - salary Long, - commissionPct Long -} - -entity Job { - jobTitle String, - minSalary Long, - maxSalary Long -} - -entity JobHistory { - startDate Instant, - endDate Instant, - language Language -} - -enum Language { - FRENCH, ENGLISH, SPANISH -} - -relationship ManyToMany { - Job{task(title)} to Task{job(jobTitle)} -} - -// defining multiple OneToMany relationships with comments -relationship OneToMany { - Employee{job(jobTitle)} to Job{employee(email)}, - /** - * A relationship - */ - Department{employee(email)} to - /** - * Another side of the same relationship - */ - Employee{department(departmentName)} -} - -relationship ManyToOne { - Department{location(streetAddress)} to Location - Location{country(countryName)} to Country - Country{region(regionName)} to Region - Employee{manager} to Employee -} - -// defining multiple oneToOne relationships -relationship OneToOne { - JobHistory{job} to Job, - JobHistory{department} to Department, - JobHistory{employee} to Employee -} - -// Set pagination options -paginate JobHistory, Employee with infinite-scroll -paginate Job with pagination - -// Use Data Transfert Objects (DTO) -// dto * with mapstruct - -// Set service options to all except few -service all with serviceClass - -// Set an angular suffix -// angularSuffix * with mySuffix diff --git a/test/.jhipster/application-with-entities-jwt.jdl b/test/.jhipster/application-with-entities-jwt.jdl deleted file mode 100644 index cee47f642..000000000 --- a/test/.jhipster/application-with-entities-jwt.jdl +++ /dev/null @@ -1,113 +0,0 @@ -application { - config { - skipClient true - authenticationType jwt - } - entities * -} - -entity Region { - regionName String -} - -entity Country { - countryName String -} - -// an ignored comment -/** not an ignored comment */ -entity Location { - streetAddress String, - postalCode String, - city String, - stateProvince String -} - -entity Department { - departmentName String required -} - -/** - * Task entity. - * @author The JHipster team. - */ -entity Task { - title String, - description String -} - -/** - * The Employee entity. - */ -entity Employee { - /** - * The firstname attribute. - */ - firstName String, - lastName String, - email String, - phoneNumber String, - hireDate Instant, - salary Long, - commissionPct Long -} - -entity Job { - jobTitle String, - minSalary Long, - maxSalary Long -} - -entity JobHistory { - startDate Instant, - endDate Instant, - language Language -} - -enum Language { - FRENCH, ENGLISH, SPANISH -} - -relationship ManyToMany { - Job{task(title)} to Task{job(jobTitle)} -} - -// defining multiple OneToMany relationships with comments -relationship OneToMany { - Employee{job(jobTitle)} to Job{employee(email)}, - /** - * A relationship - */ - Department{employee(email)} to - /** - * Another side of the same relationship - */ - Employee{department(departmentName)} -} - -relationship ManyToOne { - Department{location(streetAddress)} to Location - Location{country(countryName)} to Country - Country{region(regionName)} to Region - Employee{manager} to Employee -} - -// defining multiple oneToOne relationships -relationship OneToOne { - JobHistory{job} to Job, - JobHistory{department} to Department, - JobHistory{employee} to Employee -} - -// Set pagination options -paginate JobHistory, Employee with infinite-scroll -paginate Job with pagination - -// Use Data Transfert Objects (DTO) -// dto * with mapstruct - -// Set service options to all except few -service all with serviceClass - -// Set an angular suffix -// angularSuffix * with mySuffix diff --git a/test/.jhipster/application-with-entities-oauth2-dto.jdl b/test/.jhipster/application-with-entities-oauth2-dto.jdl deleted file mode 100644 index b89cd91fd..000000000 --- a/test/.jhipster/application-with-entities-oauth2-dto.jdl +++ /dev/null @@ -1,113 +0,0 @@ -application { - config { - skipClient true - authenticationType oauth2 - } - entities * -} - -entity Region { - regionName String -} - -entity Country { - countryName String -} - -// an ignored comment -/** not an ignored comment */ -entity Location { - streetAddress String, - postalCode String, - city String, - stateProvince String -} - -entity Department { - departmentName String required -} - -/** - * Task entity. - * @author The JHipster team. - */ -entity Task { - title String, - description String -} - -/** - * The Employee entity. - */ -entity Employee { - /** - * The firstname attribute. - */ - firstName String, - lastName String, - email String, - phoneNumber String, - hireDate Instant, - salary Long, - commissionPct Long -} - -entity Job { - jobTitle String, - minSalary Long, - maxSalary Long -} - -entity JobHistory { - startDate Instant, - endDate Instant, - language Language -} - -enum Language { - FRENCH, ENGLISH, SPANISH -} - -relationship ManyToMany { - Job{task(title)} to Task{job(jobTitle)} -} - -// defining multiple OneToMany relationships with comments -relationship OneToMany { - Employee{job(jobTitle)} to Job{employee(email)}, - /** - * A relationship - */ - Department{employee(email)} to - /** - * Another side of the same relationship - */ - Employee{department(departmentName)} -} - -relationship ManyToOne { - Department{location(streetAddress)} to Location - Location{country(countryName)} to Country - Country{region(regionName)} to Region - Employee{manager} to Employee -} - -// defining multiple oneToOne relationships -relationship OneToOne { - JobHistory{job} to Job, - JobHistory{department} to Department, - JobHistory{employee} to Employee -} - -// Set pagination options -paginate JobHistory, Employee with infinite-scroll -paginate Job with pagination - -// Use Data Transfert Objects (DTO) -dto * with mapstruct - -// Set service options to all except few -service all with serviceClass - -// Set an angular suffix -// angularSuffix * with mySuffix diff --git a/test/.jhipster/application-with-entities-oauth2.jdl b/test/.jhipster/application-with-entities-oauth2.jdl deleted file mode 100644 index 0664df42e..000000000 --- a/test/.jhipster/application-with-entities-oauth2.jdl +++ /dev/null @@ -1,113 +0,0 @@ -application { - config { - skipClient true - authenticationType oauth2 - } - entities * -} - -entity Region { - regionName String -} - -entity Country { - countryName String -} - -// an ignored comment -/** not an ignored comment */ -entity Location { - streetAddress String, - postalCode String, - city String, - stateProvince String -} - -entity Department { - departmentName String required -} - -/** - * Task entity. - * @author The JHipster team. - */ -entity Task { - title String, - description String -} - -/** - * The Employee entity. - */ -entity Employee { - /** - * The firstname attribute. - */ - firstName String, - lastName String, - email String, - phoneNumber String, - hireDate Instant, - salary Long, - commissionPct Long -} - -entity Job { - jobTitle String, - minSalary Long, - maxSalary Long -} - -entity JobHistory { - startDate Instant, - endDate Instant, - language Language -} - -enum Language { - FRENCH, ENGLISH, SPANISH -} - -relationship ManyToMany { - Job{task(title)} to Task{job(jobTitle)} -} - -// defining multiple OneToMany relationships with comments -relationship OneToMany { - Employee{job(jobTitle)} to Job{employee(email)}, - /** - * A relationship - */ - Department{employee(email)} to - /** - * Another side of the same relationship - */ - Employee{department(departmentName)} -} - -relationship ManyToOne { - Department{location(streetAddress)} to Location - Location{country(countryName)} to Country - Country{region(regionName)} to Region - Employee{manager} to Employee -} - -// defining multiple oneToOne relationships -relationship OneToOne { - JobHistory{job} to Job, - JobHistory{department} to Department, - JobHistory{employee} to Employee -} - -// Set pagination options -paginate JobHistory, Employee with infinite-scroll -paginate Job with pagination - -// Use Data Transfert Objects (DTO) -// dto * with mapstruct - -// Set service options to all except few -service all with serviceClass - -// Set an angular suffix -// angularSuffix * with mySuffix diff --git a/test/.jhipster/application-with-entities-session-dto.jdl b/test/.jhipster/application-with-entities-session-dto.jdl deleted file mode 100644 index 65bd74697..000000000 --- a/test/.jhipster/application-with-entities-session-dto.jdl +++ /dev/null @@ -1,113 +0,0 @@ -application { - config { - skipClient true - authenticationType session - } - entities * -} - -entity Region { - regionName String -} - -entity Country { - countryName String -} - -// an ignored comment -/** not an ignored comment */ -entity Location { - streetAddress String, - postalCode String, - city String, - stateProvince String -} - -entity Department { - departmentName String required -} - -/** - * Task entity. - * @author The JHipster team. - */ -entity Task { - title String, - description String -} - -/** - * The Employee entity. - */ -entity Employee { - /** - * The firstname attribute. - */ - firstName String, - lastName String, - email String, - phoneNumber String, - hireDate Instant, - salary Long, - commissionPct Long -} - -entity Job { - jobTitle String, - minSalary Long, - maxSalary Long -} - -entity JobHistory { - startDate Instant, - endDate Instant, - language Language -} - -enum Language { - FRENCH, ENGLISH, SPANISH -} - -relationship ManyToMany { - Job{task(title)} to Task{job(jobTitle)} -} - -// defining multiple OneToMany relationships with comments -relationship OneToMany { - Employee{job(jobTitle)} to Job{employee(email)}, - /** - * A relationship - */ - Department{employee(email)} to - /** - * Another side of the same relationship - */ - Employee{department(departmentName)} -} - -relationship ManyToOne { - Department{location(streetAddress)} to Location - Location{country(countryName)} to Country - Country{region(regionName)} to Region - Employee{manager} to Employee -} - -// defining multiple oneToOne relationships -relationship OneToOne { - JobHistory{job} to Job, - JobHistory{department} to Department, - JobHistory{employee} to Employee -} - -// Set pagination options -paginate JobHistory, Employee with infinite-scroll -paginate Job with pagination - -// Use Data Transfert Objects (DTO) -dto * with mapstruct - -// Set service options to all except few -service all with serviceClass - -// Set an angular suffix -// angularSuffix * with mySuffix diff --git a/test/.jhipster/application-with-entities-session.jdl b/test/.jhipster/application-with-entities-session.jdl deleted file mode 100644 index 37b42a964..000000000 --- a/test/.jhipster/application-with-entities-session.jdl +++ /dev/null @@ -1,113 +0,0 @@ -application { - config { - skipClient true - authenticationType session - } - entities * -} - -entity Region { - regionName String -} - -entity Country { - countryName String -} - -// an ignored comment -/** not an ignored comment */ -entity Location { - streetAddress String, - postalCode String, - city String, - stateProvince String -} - -entity Department { - departmentName String required -} - -/** - * Task entity. - * @author The JHipster team. - */ -entity Task { - title String, - description String -} - -/** - * The Employee entity. - */ -entity Employee { - /** - * The firstname attribute. - */ - firstName String, - lastName String, - email String, - phoneNumber String, - hireDate Instant, - salary Long, - commissionPct Long -} - -entity Job { - jobTitle String, - minSalary Long, - maxSalary Long -} - -entity JobHistory { - startDate Instant, - endDate Instant, - language Language -} - -enum Language { - FRENCH, ENGLISH, SPANISH -} - -relationship ManyToMany { - Job{task(title)} to Task{job(jobTitle)} -} - -// defining multiple OneToMany relationships with comments -relationship OneToMany { - Employee{job(jobTitle)} to Job{employee(email)}, - /** - * A relationship - */ - Department{employee(email)} to - /** - * Another side of the same relationship - */ - Employee{department(departmentName)} -} - -relationship ManyToOne { - Department{location(streetAddress)} to Location - Location{country(countryName)} to Country - Country{region(regionName)} to Region - Employee{manager} to Employee -} - -// defining multiple oneToOne relationships -relationship OneToOne { - JobHistory{job} to Job, - JobHistory{department} to Department, - JobHistory{employee} to Employee -} - -// Set pagination options -paginate JobHistory, Employee with infinite-scroll -paginate Job with pagination - -// Use Data Transfert Objects (DTO) -// dto * with mapstruct - -// Set service options to all except few -service all with serviceClass - -// Set an angular suffix -// angularSuffix * with mySuffix diff --git a/test/common-methods.js b/test/common-methods.js index b490a3ffb..0fb3d6acb 100644 --- a/test/common-methods.js +++ b/test/common-methods.js @@ -14,7 +14,7 @@ const copyFilesAndGenerateApp = async (authType, useDto) => { await execa('mkdir', ['backend']) await execa('mkdir', ['backend/.jhipster']) await execa('cp', [`${testFolder}/.jhipster/${authType}-yo-rc.json`, 'backend/.yo-rc.json']) - await execa('cp', [`${testFolder}/.jhipster/entities${useDto ? '-dto' : ''}.jdl`, 'backend/backend.jdl']) + await execa('cp', [`${testFolder}/jdl/entities${useDto ? '-dto' : ''}.jdl`, 'backend/backend.jdl']) await execa('cp', [`${testFolder}/.jhipster/FieldTestEntity.json`, 'backend/.jhipster/FieldTestEntity.json']) const generationLog = await execa('ignite', [ diff --git a/test/jdl/app-jwt-websockets.jdl b/test/jdl/app-jwt-websockets.jdl new file mode 100644 index 000000000..e6f5c52c5 --- /dev/null +++ b/test/jdl/app-jwt-websockets.jdl @@ -0,0 +1,8 @@ +application { + config { + skipClient true + authenticationType jwt + websocket spring-websocket + } + entities * +} diff --git a/test/jdl/app-jwt.jdl b/test/jdl/app-jwt.jdl new file mode 100644 index 000000000..6434e24d0 --- /dev/null +++ b/test/jdl/app-jwt.jdl @@ -0,0 +1,7 @@ +application { + config { + skipClient true + authenticationType jwt + } + entities * +} diff --git a/test/jdl/app-oauth2.jdl b/test/jdl/app-oauth2.jdl new file mode 100644 index 000000000..3b92f1b53 --- /dev/null +++ b/test/jdl/app-oauth2.jdl @@ -0,0 +1,7 @@ +application { + config { + skipClient true + authenticationType oauth2 + } + entities * +} diff --git a/test/jdl/app-session.jdl b/test/jdl/app-session.jdl new file mode 100644 index 000000000..6bef80ebc --- /dev/null +++ b/test/jdl/app-session.jdl @@ -0,0 +1,7 @@ +application { + config { + skipClient true + authenticationType session + } + entities * +} diff --git a/test/.jhipster/entities-dto.jdl b/test/jdl/entities-dto.jdl similarity index 100% rename from test/.jhipster/entities-dto.jdl rename to test/jdl/entities-dto.jdl diff --git a/test/.jhipster/entities.jdl b/test/jdl/entities.jdl similarity index 96% rename from test/.jhipster/entities.jdl rename to test/jdl/entities.jdl index 2318ad9a0..e22699050 100644 --- a/test/.jhipster/entities.jdl +++ b/test/jdl/entities.jdl @@ -95,9 +95,6 @@ relationship OneToOne { paginate JobHistory, Employee with infinite-scroll paginate Job with pagination -// Use Data Transfert Objects (DTO) -// dto * with mapstruct - // Set service options to all except few service all with serviceClass diff --git a/test/scripts/copy-jdl-file.sh b/test/scripts/copy-jdl-file.sh index b3257b088..b6e079a79 100755 --- a/test/scripts/copy-jdl-file.sh +++ b/test/scripts/copy-jdl-file.sh @@ -6,8 +6,10 @@ if [ "$JHI_WEBSOCKETS" = true ] ; then WEBSOCKET_SUFFIX="-websockets" fi -JDL_FILE="application-with-entities-${JHI_AUTH_TYPE}${DTO_SUFFIX}${WEBSOCKET_SUFFIX}.jdl" +APP_JDL="app-${JHI_AUTH_TYPE}${WEBSOCKET_SUFFIX}.jdl" +ENTITY_JDL="entities${DTO_SUFFIX}.jdl" -echo "Using JDL file: ${JDL_FILE}" +echo "Using JDL files: ${APP_JDL} ${ENTITY_JDL}" -cp ${BUILD_REPOSITORY_LOCALPATH}/test/.jhipster/${JDL_FILE} ../${SYSTEM_JOBNAME}.jdl +# combine the app and entity JDL file +cat ${BUILD_REPOSITORY_LOCALPATH}/test/jdl/${APP_JDL} ${BUILD_REPOSITORY_LOCALPATH}/test/jdl/${ENTITY_JDL} >> ../${SYSTEM_JOBNAME}.jdl