-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from avdev4j/feat/ENG-1372-fix-tests
Feat/eng 1372 fix tests
- Loading branch information
Showing
9 changed files
with
897 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
const path = require('path'); | ||
const assert = require('yeoman-assert'); | ||
const helpers = require('yeoman-test'); | ||
const constants = require('generator-jhipster/generators/generator-constants'); | ||
const expectedFiles = require('./utils/expected-files'); | ||
|
||
const appBaseName = 'entandoPlugin'; | ||
const { SERVER_MAIN_RES_DIR } = constants; | ||
|
||
describe('Subgenerator app of entando JHipster blueprint', () => { | ||
describe('With default blueprint configuration', () => { | ||
before(done => { | ||
helpers | ||
.run('generator-jhipster/generators/app') | ||
.withOptions({ | ||
'from-cli': true, | ||
skipInstall: true, | ||
blueprint: 'entando', | ||
skipChecks: true, | ||
}) | ||
.withGenerators([ | ||
[ | ||
require('../generators/app/index.js'), // eslint-disable-line global-require | ||
'jhipster-entando:app', | ||
path.join(__dirname, '../generators/app/index.js'), | ||
], | ||
]) | ||
.withPrompts({ | ||
baseName: appBaseName, | ||
packageName: 'com.mycompany.myapp', | ||
applicationType: 'microservice', | ||
databaseType: 'sql', | ||
devDatabaseType: 'h2Disk', | ||
prodDatabaseType: 'mysql', | ||
cacheProvider: 'ehcache', | ||
authenticationType: 'oauth2', | ||
enableTranslation: true, | ||
nativeLanguage: 'en', | ||
languages: ['fr', 'de'], | ||
buildTool: 'maven', | ||
rememberMeKey: '2bb60a80889aa6e6767e9ccd8714982681152aa5', | ||
}) | ||
.on('end', done); | ||
}); | ||
|
||
it('creates expected files for the blueprint', () => { | ||
assert.file(expectedFiles.microservices); | ||
}); | ||
|
||
it('microservice index.html contains Entando data', () => { | ||
assert.fileContent(`${SERVER_MAIN_RES_DIR}static/index.html`, 'https://dev.entando.org/'); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const path = require('path'); | ||
const assert = require('yeoman-assert'); | ||
const helpers = require('yeoman-test'); | ||
|
||
describe('Subgenerator common of entando JHipster blueprint', () => { | ||
describe('With default blueprint configuration', () => { | ||
before(done => { | ||
helpers | ||
.run('generator-jhipster/generators/common') | ||
.withOptions({ | ||
'from-cli': true, | ||
skipInstall: true, | ||
blueprint: 'entando', | ||
skipChecks: true, | ||
}) | ||
.withGenerators([ | ||
[ | ||
require('../generators/common/index.js'), // eslint-disable-line global-require | ||
'jhipster-entando:common', | ||
path.join(__dirname, '../generators/common/index.js'), | ||
], | ||
]) | ||
.withPrompts({ | ||
baseName: 'entandoPlugin', | ||
packageName: 'com.mycompany.myapp', | ||
applicationType: 'microservice', | ||
databaseType: 'sql', | ||
devDatabaseType: 'h2Disk', | ||
prodDatabaseType: 'mysql', | ||
cacheProvider: 'ehcache', | ||
authenticationType: 'oauth2', | ||
enableTranslation: true, | ||
nativeLanguage: 'en', | ||
languages: ['fr', 'de'], | ||
buildTool: 'maven', | ||
rememberMeKey: '2bb60a80889aa6e6767e9ccd8714982681152aa5', | ||
}) | ||
.on('end', done); | ||
}); | ||
|
||
it('creates expected files for the blueprint', () => { | ||
assert.fileContent( | ||
'.gitignore', | ||
'######################\n' + | ||
'# Entando bundles\n' + | ||
'######################\n' + | ||
'bundle/\n' + | ||
'# !/bundle/descriptor.yaml', | ||
); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.