-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7e8c89
commit 3f6e472
Showing
18 changed files
with
260 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"predef": [ | ||
"console" | ||
], | ||
"strict": false | ||
} |
1 change: 1 addition & 0 deletions
1
blueprints/ember-cli-yadda/files/tests/acceptance/__name__.feature
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 @@ | ||
Feature: <%= featureName %> |
32 changes: 32 additions & 0 deletions
32
blueprints/ember-cli-yadda/files/tests/acceptance/acceptance-test.js
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,32 @@ | ||
import Yadda from 'yadda'; | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
|
||
|
||
|
||
|
||
Yadda.plugins.mocha.StepLevelPlugin.init(); | ||
|
||
new Yadda.FeatureFileSearch('./').each(function(file) { | ||
|
||
featureFile(file, function(feature) { | ||
let stepFileName = `../steps/${feature.title}-step.js` | ||
import * as library from stepFileName; | ||
let yadda = Yadda.createInstance(library); | ||
|
||
module(`Feature: ${feature.title}`, { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
scenarios(feature.scenarios, function(scenario) { | ||
test(`Scenario: ${scenario.title}`, yadda.run(scenario)); | ||
}); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
blueprints/ember-cli-yadda/files/tests/steps/__name__-step.js
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,20 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
import { localisation } from 'yadda'; | ||
|
||
let Nederlands = localisation.Nederlands; | ||
|
||
module('make feature', { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
test('Scenario generate', function(assert) { | ||
Nederlands. | ||
}); |
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,14 @@ | ||
module.exports = { | ||
description: '' | ||
|
||
// locals: function(options) { | ||
// // Return custom template variables here. | ||
// return { | ||
// foo: options.entity.options.foo | ||
// }; | ||
// } | ||
|
||
// afterInstall: function(options) { | ||
// // Perform extra work here. | ||
// } | ||
}; |
21 changes: 21 additions & 0 deletions
21
blueprints/feature/files/tests/acceptance/__name__-steps-test.js
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,21 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
|
||
module('<%= featureName %>', { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
test('visiting /<%= dasherizedModuleName %>', function(assert) { | ||
visit('/<%= dasherizedModuleName %>'); | ||
|
||
andThen(function() { | ||
assert.equal(currentURL(), '/<%= dasherizedModuleName %>'); | ||
}); | ||
}); |
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 @@ | ||
Feature: <%= featureName %> |
21 changes: 21 additions & 0 deletions
21
blueprints/feature/files/tests/acceptance/acceptance-test.js
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,21 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
|
||
module('<%= featureName %>', { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
test('visiting /<%= dasherizedModuleName %>', function(assert) { | ||
visit('/<%= dasherizedModuleName %>'); | ||
|
||
andThen(function() { | ||
assert.equal(currentURL(), '/<%= dasherizedModuleName %>'); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
blueprints/feature/files/tests/acceptance/steps/__name__-step.js
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,20 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
import { localisation } from 'yadda'; | ||
|
||
let Nederlands = localisation.Nederlands; | ||
|
||
module('make feature', { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
test('Scenario generate', function(assert) { | ||
Nederlands. | ||
}); |
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,20 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
import { localisation } from 'yadda'; | ||
|
||
let Nederlands = localisation.Nederlands; | ||
|
||
module('make feature', { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
test('Scenario generate', function(assert) { | ||
Nederlands. | ||
}); |
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,19 @@ | ||
module.exports = { | ||
description: '', | ||
locals: function(options) { | ||
return { | ||
featureName: options.entity.name.replace(/-/g, ' ') | ||
}; | ||
} | ||
|
||
// locals: function(options) { | ||
// // Return custom template variables here. | ||
// return { | ||
// foo: options.entity.options.foo | ||
// }; | ||
// } | ||
|
||
// afterInstall: function(options) { | ||
// // Perform extra work here. | ||
// } | ||
}; |
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,7 @@ | ||
Feature: make feature | ||
|
||
Scenario: generate | ||
|
||
Given I type "Ember g feature make feature" | ||
When I look in the folder | ||
Then I should find a file |
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 @@ | ||
Feature: barrys |
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,17 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
import { localisation } from 'yadda'; | ||
|
||
const Nederlands = localisation.English; | ||
|
||
export default English.library() | ||
.given('I type "Ember g feature make feature"', function(next) { | ||
next(); | ||
}) | ||
.when('I look in the folder', function(next) { | ||
next(); | ||
}) | ||
.then('I should find a file', function(next) { | ||
next(); | ||
}) |
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,20 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
import { localisation } from 'yadda'; | ||
|
||
let Nederlands = localisation.Nederlands; | ||
|
||
module('make feature', { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
test('Scenario generate', function(assert) { | ||
Nederlands. | ||
}); |
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,20 @@ | ||
import Ember from 'ember'; | ||
import { module, test } from 'qunit'; | ||
import startApp from '/tests/helpers/start-app'; | ||
import { localisation } from 'yadda'; | ||
|
||
let Nederlands = localisation.Nederlands; | ||
|
||
module('make feature', { | ||
beforeEach: function() { | ||
this.application = startApp(); | ||
}, | ||
|
||
afterEach: function() { | ||
Ember.run(this.application, 'destroy'); | ||
} | ||
}); | ||
|
||
test('Scenario generate', function(assert) { | ||
Nederlands. | ||
}); |