- Restrict dependabot to direct dependencies
- Add support for custom example placeholder delimiters to mocha plugin
- Bump dev dependencies
- Move to prettier
- Move to github actions
- Update dependencies
- Fixes bug
- No longer testing on node 4 and 5
- Update dependencies
- Remove examples with insecure depenencies
- Add support of programatically skipping mocha tests when using the step level plugin
- Fix examples in npm 5
- Updated more dev deps including browserify
- Updated dev dependencies
- Automated codeclimate
- Ukranian Localisation - thanks dedmazayukr.
- Passing options through localised steps definition. See #232. Thanks bogus34.
- npms didn't pick up the build
- Switching to eslint
- Tidy up
- Configuring Code Climate
- Fixes bug where errors returned by steps in jasmine were swallowed.
- Removed webdriver examples (webdriver.js is not longer maintained)
- Fixes bug where errors thrown by synchronous steps were swallowed.
- Converters can yield multiple values
- Working around this issue with mocha 3.
- Removed dist from npm package
- Closes #217 (using catch with promises)
- Closes #216 (improves step sync/async detection)
- GLOBAL is dead. Long live global. Fixes #215
- Registering in bower repo.
- Adding the ability to report unused steps. See the report-unused-steps-example.
- simonihmig reported and fixed a bug with the step selection routines which caused different behaviour in chrome and phantom.
- Fixing a bug where the interpreter wasn't favoring an ambiguous step from the same library as the previous step
- Supports mixed async and sync - Thanks chrisns
- Steps can return promises - Thanks chrisns
- Stopped casper integration throwing an exception when path module could not be found
- Fixing a typo
- Configurable placeholder characters used in example tables. Requested in #203
- Karma support courtesy of inf3rno. Thanks very much.
- Removed NODE_ENV=test which caused failures on windows.
- Chinese Localisation - thanks snowyu.
- Fixed a bug which discarded blank lines at the end of a multline step. If the scenario had multiple multline steps, then an ending blank line in the first step, was injected into the second step.
- Fixed a bug introduced in 0.16.2 which meant Yadda picked the more undesirable step when two step implementations in the same library matches the step text.
- When yadda find two matching steps with the same Levenshtein distance, it will prefer the one defined in the same library as the previous step.
- Removed bind so phantom works without polyfill
- Outer borders on data tables are ignored
- Fixed but with the mocha ScenarioLevelPlugin which cased all tests to timeout
- Dutch language support courtesy of https://github.com/remkoboschker. Thanks.
- Step name included in context automatically courtesy of remkoboschker. Thanks.
- Multiline Steps and data-table converters (multiline data tables are still a work in progress)
- Protractor example courtesy of [mgijsbertihodenpijl])[https://github.com/mgijsbertihodenpijl]. Thanks
- Converted README into a gitbook
- Fixed a minor bug with example tables
- Breaking Change: Multiline steps in scenarios and backgrounds
- Example table meta fields for incorporating index, line and column values into your scenarios.
- Dictionary converters can take multilpe arguments.
- Dictionaries can be used to convert arguments into arbitary types. Integer, float and date converters are provided out of the box.
- Fixes an issues where the new Annotations class broke moonraker
- An amazing amount of work adding multiline example tables be thr0w.
- thr0w also added annotation support to example tables.
- Breaking Change: In reworking some of thr0w's example table code we added a breaking change around example table formating. You'll only notice if you centered column headings. If this feature is important to you then we suggest adding column separators to the outer left and right edges table, e.g.
| one | two | three |
| banana | orange | apricot |
- Breaking Change: Annotations have been reworked into a class. If you access annotations you need to do so via the get method
// Instead of
feature.annotations.pending;
// Do
feature.annotations.get('pending');
Annotations can be requested using any case but are stored internally in lowercase. It is not longer valid for annotation names to contain spaces and non alhpanumerics are no longer converted to an underscore.
- Breaking Change: Removed deprecated mocha plugin
- Breaking Change: Background can no longer have descriptions
- If you're using a recent version of mocha in combination with the StepLevelPlugin aborted steps will be marked as Pending.
- Adding @Only support to jasmine plugin
- Removing deprecated mocha plugin.
- Allow the default language to be overriden. See #102.
- Portuguese language support courtesy of https://github.com/thr0w. Thanks.
- Added console.log to request user feedback on whether background descriptions can be decprecated
- Improved examples
- Russian language support kindly contributed by vectart
- Added a friendlier syntax
- Node is fixed. Removing warning about failing travis build from readme
- Fix for issue 120 - False positives with the new StepLevelPlugin
- Scenarios created from example tables no longer share annotations. See PR #119
- Removal of scenario descriptions which forced a blank line between scenario title and steps. See issue #55
- Deprecation of AsyncScenarioLevelPlugin, SyncScenarioLevelPlugin, AsyncStepLevelPlugin, SyncStepLevelPlugin. Use the new ScenarioLevelPlugin or StepLevelPlugin replacements instead
- Improved readme - Thanks prokls
- Adding German language support - Thanks prokls
- Locking down the webdriver examples to 2.41.x as (problems)[#105] where reported with 2.42
- Adds support for mocha's only feature to the Mocha plugin - see issue-98
- Fixes issue-97 - scenario annotations after a background caused the parser to fail.
- Added a really basic example
- Added jshint
- Fix for issue-88
- Removal of incorrect French translation for 'background'
- The new mocha plugins can be passed a custom parser
- Polish language support - Thanks macie
- A fix for multiline commments
- Fix for issue-82
- Jasmine webdriver example
- Supporting multiple variations of Pending annotation. See issue 78
- Annotations can now be prefixed with a space. See issue79
- The webdriver example uses new mocha plugin
- Fixes to the mocha-sync and mocha-express examples
- Bower support - Thanks jeffreytgilbert
- Improved French localisation - Thanks poum
- Improved README - Thanks gblosser42
- Improved nodejs detection - Thanks eXon
- Added support for backgrounds - Thanks mucsi
- Added support for step level output in mocha tests - Thanks simoami
- Fixed a few minor bugs in the FeatureParser
- This release involves a complete rewrite of the mocha/jasmine plugin. The old plugin will be deprecated in 0.12.0. The replacement syntax is:
var Yadda = require('yadda');
Yadda.plugins.mocha.AsyncScenarioLevelPlugin.init();
new Yadda.FeatureFileSearch('features').each(function(file) {
// Previously features(file, function(feature))
featureFile(file, function(feature) {
var library = require('./bottles-library');
var yadda = new Yadda.Yadda(library);
scenarios(feature.scenarios, function(scenario, done) {
yadda.yadda(scenario.steps, done);
});
});
});
To get step level output use SyncStepLevelPlugin or AsyncStepLevelPlugin as appropriate, e.g.
var Yadda = require('yadda');
Yadda.plugins.mocha.AsyncStepLevelPlugin.init();
new Yadda.FeatureFileSearch('features').each(function(file) {
// Previously features(file, function(feature))
featureFile(file, function(feature) {
var library = require('./bottles-library');
var yadda = new Yadda.Yadda(library);
scenarios(feature.scenarios, function(scenario) {
steps(scenario.steps, function(step, done) {
yadda.yadda(step, done);
})
});
});
});
- Updated French translations - Thanks poum
- You can use Scenario and Scenario Outline interchangeably
- Added an example using mocha and express
- Added support for component - thanks johntron.
- Spanish localisation - thanks feliun.
- Fix for issue 43 - @Pending not working
- Improvements to French localsation and examples - thanks ami44.
- Added Zombie JS example
- Added Multi library example
- Generally improved other examples
- Added FeatureFileSearch as discussed in #47
- Using npm link to install yadda for the examples
- Yadda now lists undefined and ambiguous steps as discussed in #30
- French localisation for example tables - thanks ami44.
- Added package.json to the example projects so than can be run with
npm install; npm test
- French Localisation - thanks ami44.
- Adds support for example tables
- Fixes a bug in the MochaPlugin which didn't recognise non English @Pending annotations on scenarios
- Adds both original and lowercase annotations to the feature / scenarios, so that code which accesses them looks more normal
- Fixes bug in qunit example contributed by [RaulMB](https://github.com/RaulMB
- Fixes to localisation contributed by kjell.
- Improvements to localisation suggested by kjell.
- Adds a FileSearch class so you can slurp feature files by directory and pattern instead of having to explicitly list them in your tests.
- Fixeds a bug in the mocha plugin output
- Any text between a Feature line and a Scenario line is ignored.
- Added support for multiline comments
- Norwegian Localisation - thanks kjelloe.
- FeatureParser can be localised. Unfortunately this involved a breaking change to the Yadda.localisation.English API. Thankfully the adjustment is simple.
// Old Code (< 0.8.0)
var library = new Yadda.localisation.English(optional_dictionary);
// New Code (>= 0.8.0)
var library = Yadda.localisation.English.library(optional_dictionary);
- FeatureParser supports single line comments (any line where the first non whitespace character is #)
- TextParser renamed to FeatureParser as per Issue 12.
- StepParser added
- Dictionaries can now be merged
- This release adds jasmine examples
- This release adds support for annotations on scenarios. Theses were previously only available on features. Support for simple annoations, e.g. @Pending, is also included.
- Yadda now throws Error objects instead of Strings. See Issue #24.
- Fix for Issue #23 which prevented the scenario context being shared between steps when using the Mocha plugin. The plugin API was made clearer at the same time, which unfortunately necessitated breaking changes. The following demonstrates how to migrate < 0.6 mocha tests to the 0.6 api.
< 0.6.0
var Yadda = require('yadda');
Yadda.plugins.mocha();
var library = require('./bottles-library');
var yadda = new Yadda.Yadda(library);
yadda.mocha('Bottles', './spec/bottles-spec.txt');
>= 0.6.0
var Yadda = require('yadda');
Yadda.plugins.mocha();
feature('./features/bottles.feature', function (feature) {
var library = require('./bottles-library');
var yadda = new Yadda.Yadda(library);
scenarios(feature.scenarios, function (scenario, done) {
yadda.yadda(scenario.steps, done);
});
});
- Adds annoations to features in feature files. Thanks mrwiggles.
- Yadda now emits events, which can be useful for debugging. See the README.md for more details.
- This adds the feature title to the output from the text parser contributed by akikhtenko (thanks). Since this changes the object structure returned by TextParser.parse() if you're using the TextParser directly rather than via the Mocha or Casper plugins, it's a breaking change, but the change is very minor...
var scenarios = parser.parse(text); // < 0.5.0
var scenarios = parser.parse(text).scenarios; // >= 0.5.0
- The stable version of casperjs is no longer recommended by the casperjs author. It's also problematic to require modules. The latest version of casperjs (installed from master after 13th September 2013) fixes these problems, so I've updated the example to reflect this.
- Changed the CasperPlugin API
- Changed the MochaPlugin API
- TextParser no longer maintains state between parses
- Stopped pending asynchronous steps hanging the test run
- Added mocha plugin
- Yadda now supports both asynchronous and synchronous usage
- Deleted the before and after hook (after cannot be guaranteed to run when asynchronous)
The before and after hooks have been removed because after cannot be guaranteed to run when yadda is asynchronous. Use your test runner's before and after mechanism instead.
You can no longer pass non-object contexts to yadda, i.e. instead of...
library.define('blah blah blah') function() {
this.assert();
});
new Yadda(library).('blah blah blah', test);
Do...
library.define('blah blah blah') function() {
this.test.assert();
});
new Yadda(library).('blah blah blah', { test: test });
- Re-implemented as a nodejs module
- Used browserify for compatability with browser test frameworks like qunit
Yadda has been re-implemented as a nodejs module. This means that the global 'Yadda' prefixed class names are no longer exposed and that all Yadda classes must be explicitly 'required'
In a node environment this is straightforward...
npm install yadda
var Yadda = require('yadda').Yadda;
var Library = require('yadda').Library;
var library = new Library();
library.given('$NUM bottles of beer', function (n) {
console.log(n + ' ' + 'bottles of beer');
});
new Yadda(library).yadda('100 bottles of beer');
Thanks to browserify it straightforward from a browser environment too...
<head>
<script src="http://www.github.com/acuminous/yadda/dist/yadda-0.3.0.js"></script>
<script type="text/javascript">
var Yadda = require('yadda').Yadda;
var Library = require('yadda').Library;
var library = new Library();
library.given('$NUM bottles of beer', function (n) {
console.log(n + ' ' + 'bottles of beer');
});
new Yadda(library).yadda('100 bottles of beer');
</script>
</head>
In a CasperJS environment it's less straightforward. We haven't found how to get casper to understand commonjs or umd node modules and Casper's 'require' function clashes with the one created by browserify. For the moment we're working around this with the following ugly hack...
var oldRequire = require;
phantom.injectJs('../../dist/yadda-0.3.0.js');
window.Yadda = require('yadda').Yadda;
window.CasperPlugin = require('yadda').plugins.CasperPlugin;
window.Library = require('yadda').Library;
window.require = oldRequire;
library.given('$NUM bottles of beer', function(n) {
console.log(n + ' ' + 'bottles of beer');
};
var yadda = new Yadda(library).yadda('100 bottles of beer');
casper = new CasperPlugin(yadda, casper).init();
- Added a feature file parser
- Improved documentation and examples
- Added a CoffeeScript example
- Added a Nodeunit example
- Added a Mocha example
- Added a new context variable to the interpret method. See Nodeunit example for usage.
- Ensured that Yadda.after is called even if an error occurs
- Fixed distance_table typo
In Yadda 0.1.0 you invoked yadda with
new Yadda(steps).yadda(['some scenario']);
The equivalent syntax in 0.2.2 is
new Yadda.yadda(library).yadda(['some scenario']);
where library is an instance of Yadda.Library
var steps = new Steps();
steps.importSteps(other_steps);
var yadda = new Yadda(steps);
Now you pass yadda an array of libraries instead of a single merged one
var lib1 = new Yadda.Library();
var lib2 = new Yadda.Library();
var yadda = new Yadda().yadda([lib1, lib2]);
alternatively you can do
var yadda = new Yadda.yadda();
yadda.requires(lib1);
yadda.requires(lib2);
or
var yadda = new Yadda.yadda();
yadda.requires([lib1, lib2]);
Previously you defined steps using the addStep method, or a given, when, then helper method, e.g.
steps.addStep('some text', function () {
// some code
});
Step.addStep has been replaced with Library.define
library.define('some text', function () {
// some code
});
The helper methods are no longer available by default, but you can restore them by including yadda-0.2.2-localisation.js and creating your libraries as instances of Yadda.Library.English, e.g.
var library = Yadda.Library.English.library()
.given('a (\\d+) green bottles', function () {
// some code
})
.when('(\\d+) falls', function () {
// some code
})
.then('there are (\\d+) green bottles', function () {
// some code
});