Home > dominator.js

dominator.js

Dominator.js is a project mainly written in JavaScript, based on the MIT license.

Function Test Destruction for QUnit.

Dominator.js

Functional Test Destruction

dominator.open('#home')
         .click('a.redButton')
         .waitForPage('#boom')
         .destroy();

Synopsis

Dominator adds functional test assertions to QUnit.

Functional tests should be simple to write, easy to read, and adaptable to any JavaScript framework.

For us, functional tests are a smoke screen. When you need more, then it is time to abstract and unit test.

Example

module('open');

test('should open first page', function() {
    dominator.open('#home')
             .waitForPage('#home')
             .destroy();
});

module('settings');

test('should save settings', function() {
    dominator.open('#settings')
             .click('#save')
             .waitForEvent('document', 'settingsChange');
             .destroy();
});

Usage

Dominator.js Homepage.

  • Installation
  • Getting Started
  • Reference
  • Customizing
  • Community
  • Contributing
  • Acknowledgements
  • License

Support

Currently, dominator.js only runs in WebKit browsers.

Development

Getting the Source Code

$ git clone git://github.com/mwbrooks/dominator.js.git

$ cd dominator.js

$ git submodule init
$ git submodule update

Building the Source Code

$ make

Running Tests

Open test/index.html

Previous:chromad