Skip to content

mwbrooks/dominator.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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