diff --git a/test/acceptance/test-component.js b/test/acceptance/test-component.js index eda9d8b2..056ded40 100644 --- a/test/acceptance/test-component.js +++ b/test/acceptance/test-component.js @@ -113,4 +113,61 @@ describe('subgenerator -> component', () => { }); }); }) + + describe('aurelia1', () => { + describe('testsSeparated is true', () => { + before(function (done) { + helpers + .run(path.join(__dirname, '../../component')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": true + } + }, this.async()); + }) + .withArguments('user') + .withOptions({ 'skip-install': true, feature: 'yo'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/yo/components/user.js', + 'client/dev/yo/components/user.html', + 'client/dev/yo/styles/user.css', + 'tests/client/yo/components/user_test.js' + ]); + }); + }); + + describe('testsSeparated is false', () => { + before(function (done) { + helpers + .run(path.join(__dirname, '../../component')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": false + } + }, this.async()); + }) + .withArguments('user') + .withOptions({ 'skip-install': true, feature: 'yo'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/yo/components/user.js', + 'client/dev/yo/components/user.html', + 'client/dev/yo/styles/user.css', + 'client/dev/yo/components/user_test.js' + ]); + }); + }); + }) + }) diff --git a/test/acceptance/test-directive.js b/test/acceptance/test-directive.js index c812830f..5ab308e5 100644 --- a/test/acceptance/test-directive.js +++ b/test/acceptance/test-directive.js @@ -182,6 +182,65 @@ describe('subgenerator -> directive', () => { ]); }); }); - }) + }) + + describe('aurelia1', () => { + describe('testsSeparated is true', () => { + before(function (done) { + helpers + .run(path.join(__dirname, '../../directive')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": true + } + }, this.async()); + }) + .withArguments('something') + .withOptions({ 'skip-install': true, feature: 'common'}) + .on('end', done); + }); + + after((done) => { + MockConfigFile.delete(done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/common/directives/something.js', + 'tests/client/common/directives/something_test.js' + ]); + }); + }); + + describe('testsSeparated is false', () => { + before(function (done) { + helpers + .run(path.join(__dirname, '../../directive')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": false + } + }, this.async()); + }) + .withArguments('something') + .withOptions({ 'skip-install': true, feature: 'common'}) + .on('end', done); + }); + + after((done) => { + MockConfigFile.delete(done); + }); + it('creates files', () => { + assert.file([ + 'client/dev/common/directives/something.js', + 'client/dev/common/directives/something_test.js' + ]); + }); + }); + }) }); diff --git a/test/acceptance/test-factory.js b/test/acceptance/test-factory.js index bb38dc1a..337081b9 100644 --- a/test/acceptance/test-factory.js +++ b/test/acceptance/test-factory.js @@ -159,4 +159,56 @@ describe('subgenerator -> factory', () => { }); }); }) + + describe('aurelia1', () => { + describe('testsSeparated is true', () => { + before((done) => { + helpers + .run(path.join(__dirname, '../../factory')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": true + } + }, this.async()); + }) + .withArguments('cars') + .withOptions({ 'skip-install': true, feature: 'myModel'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/myModel/factory/cars.js', + 'tests/client/myModel/factory/cars_test.js' + ]); + }); + }); + + describe('testsSeparated is false', () => { + before((done) => { + helpers + .run(path.join(__dirname, '../../factory')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": false + } + }, this.async()); + }) + .withArguments('cars') + .withOptions({ 'skip-install': true, feature: 'myModel'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/myModel/factory/cars.js', + 'client/dev/myModel/factory/cars_test.js' + ]); + }); + }); + }) }); diff --git a/test/acceptance/test-filter.js b/test/acceptance/test-filter.js index d6c06a38..1eaae1e9 100644 --- a/test/acceptance/test-filter.js +++ b/test/acceptance/test-filter.js @@ -108,4 +108,56 @@ describe('subgenerator -> filter', () => { }) }) + describe('aurelia1', () => { + describe('testsSeparated is true', () => { + before(function (done) { + helpers + .run(path.join(__dirname, '../../filter')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": true + } + }, this.async()); + }) + .withArguments('something') + .withOptions({ 'skip-install': true, feature: 'beautifiers'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/beautifiers/filters/something.js', + 'tests/client/beautifiers/filters/something_test.js' + ]); + }); + }) + + describe('testsSeparated is false', () => { + before(function (done) { + helpers + .run(path.join(__dirname, '../../filter')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": false + } + }, this.async()); + }) + .withArguments('something') + .withOptions({ 'skip-install': true, feature: 'beautifiers'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/beautifiers/filters/something.js', + 'client/dev/beautifiers/filters/something_test.js' + ]); + }); + }) + }) + }); diff --git a/test/acceptance/test-model.js b/test/acceptance/test-model.js index b6c70fa7..ef59e3d8 100644 --- a/test/acceptance/test-model.js +++ b/test/acceptance/test-model.js @@ -134,7 +134,7 @@ describe('subgenerator -> model', () => { }); }); - describe('ng2 - testsSeparated is false', () => { + describe('testsSeparated is false', () => { before((done) => { helpers .run(path.join(__dirname, '../../model')) @@ -160,4 +160,56 @@ describe('subgenerator -> model', () => { }); }) + describe('aurelia1', () => { + describe('testsSeparated is true', () => { + before((done) => { + helpers + .run(path.join(__dirname, '../../model')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": true + } + }, this.async()); + }) + .withArguments('cars') + .withOptions({ 'skip-install': true, feature: 'myModel'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/myModel/models/cars.js', + 'tests/client/myModel/models/cars_test.js' + ]); + }); + }); + + describe('testsSeparated is false', () => { + before((done) => { + helpers + .run(path.join(__dirname, '../../model')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": false + } + }, this.async()); + }) + .withArguments('cars') + .withOptions({ 'skip-install': true, feature: 'myModel'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/myModel/models/cars.js', + 'client/dev/myModel/models/cars_test.js' + ]); + }); + }); + }) + }); diff --git a/test/acceptance/test-module.js b/test/acceptance/test-module.js index 041c1ef3..0ec90ad3 100644 --- a/test/acceptance/test-module.js +++ b/test/acceptance/test-module.js @@ -212,4 +212,72 @@ describe('subgenerator -> module', () => { }); }); }) + + describe('aurelia1', () => { + describe('testsSeparated is true', () => { + before((done) => { + helpers + .run(path.join(__dirname, '../../module')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": true + } + }, this.async()); + }) + .withArguments('cars') + .withOptions({ 'skip-install': true, feature: 'myModel'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/myModel/components/cars.js', + 'client/dev/myModel/models/cars.js', + 'client/dev/myModel/factory/cars.js', + 'client/dev/myModel/services/cars.js', + 'client/dev/myModel/styles/cars.css', + + 'tests/client/myModel/components/cars_test.js', + 'tests/client/myModel/models/cars_test.js', + 'tests/client/myModel/services/cars_test.js', + 'tests/client/myModel/factory/cars_test.js' + ]); + }); + }); + + describe('testsSeparated is false', () => { + before((done) => { + helpers + .run(path.join(__dirname, '../../module')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": false + } + }, this.async()); + }) + .withArguments('cars') + .withOptions({ 'skip-install': true, feature: 'myModel'}) + .on('end', done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/myModel/components/cars.js', + 'client/dev/myModel/models/cars.js', + 'client/dev/myModel/factory/cars.js', + 'client/dev/myModel/services/cars.js', + 'client/dev/myModel/styles/cars.css', + + 'client/dev/myModel/components/cars_test.js', + 'client/dev/myModel/models/cars_test.js', + 'client/dev/myModel/services/cars_test.js', + 'client/dev/myModel/factory/cars_test.js' + ]); + }); + }); + }) }); diff --git a/test/acceptance/test-service.js b/test/acceptance/test-service.js index e7728c50..dbe4d354 100644 --- a/test/acceptance/test-service.js +++ b/test/acceptance/test-service.js @@ -120,7 +120,7 @@ describe('subgenerator -> service', () => { }); }) - describe('ng2', () => { + describe('vue2', () => { describe('testsSeparated is true', () => { before((done) => { helpers.run(path.join(__dirname, '../../service')) @@ -178,4 +178,62 @@ describe('subgenerator -> service', () => { }); }) + describe('aurelia1', () => { + describe('testsSeparated is true', () => { + before((done) => { + helpers.run(path.join(__dirname, '../../service')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": true + } + }, this.async()); + }) + .withArguments('post') + .withOptions({ 'skip-install': true, feature: 'http'}) + .on('end', done); + }); + + after((done) => { + MockConfigFile.delete(done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/http/services/post.js', + 'tests/client/http/services/post_test.js' + ]); + }); + }); + + describe('testsSeparated is false', () => { + before((done) => { + helpers.run(path.join(__dirname, '../../service')) + .inTmpDir(function(dir) { + MockConfigFile.create({ + "generator-ng-fullstack": { + "client": "aurelia1", + "testsSeparated": false + } + }, this.async()); + }) + .withArguments('post') + .withOptions({ 'skip-install': true, feature: 'http'}) + .on('end', done); + }); + + after((done) => { + MockConfigFile.delete(done); + }); + + it('creates files', () => { + assert.file([ + 'client/dev/http/services/post.js', + 'client/dev/http/services/post_test.js' + ]); + }); + }); + }) + });