If at any time you need to inspect the entire contents of your document, you can inspect the return value of browser.html()
. For instance, if you want to inspect the document's state right before the browser is reloaded, you can add the following line to the test/todo.js
file, in place of browser.dump()
:
...
browser.choose('Use Alarm', function(err) {
if (err) throw err;
assert.equal(container.style.display, '');
browser.choose('No Alarm', function(err) {
if (err) throw err;
console.log(browser.html());
assert.equal(container.style.display, 'none');
done();
});
});
...
You can now run the test and observe the output:
$ node_modules/.bin/mocha -g 'alarm' test/todos ... <html style=""><head> ...