A functional testing framework for component-based web applications
$ npm install --save-dev tintoTinto is configured from an optional tinto.conf.js file that should be placed in your project root. It should export the configuration object directly.
- includeStack: Whether or not to include a stack trace in assertion error messages.
- bundles: An array of bundle names or bundle instances to load.
- browser: Which browser to use. See the WebDriver documentation for the list of supported browsers.
{
includeStack: false,
bundles: [],
browser: 'firefox'
}searchButton.should.have.text('Search');searchButton.text.should.equal('Search');searchButton.should.be.enabled;grid.should.have(3).rows;grid.rows(0).should.equal(firstRow);grid.should.contain(firstRow, secondRow);searchButton.should.have.text('Search').and.be.enabled;searchButton.should(
have.text('Search'),
be.enabled
);searchButton.should.eventually.have.text('Search').and.be.enabled;searchButton.should.eventually(
have.text('Search'),
be.enabled
);function Grid() {
Component.apply(this, arguments);
this.getter('rows', function() {
return this.find('tr');
});
}
tinto.inherits(Grid, Component);class Grid extends Component {
get rows() {
return this.find('tr');
}
}var Grid = Component.extend({
get rows() {
return this.find('tr');
}
});In order to use the CLI, you must install tinto globally. You can then run tinto --help to list available commands.
See the example folder for a complete example.
This project was inspired by the excellent Testatoo functional testing library for Java.