Not really ready for prime time. Works well for us
Has two components.
npm install roombajs
Start the server using
node appjs//ornpm start
Create an instance of roomba for each run. This creates a unique run id, used to submit reports to server
var Roomba = require"roomba"var roomba = serverUrl nameOfTest;
Now use the various methods to say what all you need to do
roombatap"#foo div";roombawaitFor300;roombatap"#bar span";
Add your asserts at any point. You can use any assert library, here I use chai.
roombathenexpect$".uiPageActive .subToolBar em"htmltocontainstring"Philadelphia to SF";;
Signal that you are done specifying your tests
roombarunAll; //Runs each step one by one, and submits the report to server
var roomba = roombaSeverUrl nameOfTest;//examplevar roomba = "" "regression suite";
fill a textbox or text input
roombafillselector value;//exampleroombafill"#loginUsername" "email@example.com";
select a drop down
roombaselectselector value;//exampleroombaselect"#environment" "production";
waitFor: timeout or function
roombawaitFortimeMilliSeconds;roombawaitForfnfn: return true to indicate waitFor condition is met//exampleroombawaitFor300;roombawaitForreturn $"#foo"length === 1;
runAll: Signal that you are done specifying the test. Now run actions one by one. On each step, information will be logged in roomba server. If there is an error in any step, it'll bail out.
module: Indicate start of a module. Once a module is set, any actions done like a tap are logged under that module. If none specified, all tests go into 'default' module. Module names should be unique, or reports will get messed up.