You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now each test can start navigating, which is just clicking and rendering views within the one page.
Currently it seems that the open function really expects physical pages. Is would be great if we could also pass it an absolute URL, so that each test can simply reset the entire app and start fresh. My current workaround is:
var HOME = 'http://localhost:4567';
dominator.extend('home', function(callback) {
this.window.location.href = HOME;
this.expect(1);
var intervalId = setInterval(function() {
if (this.window && this.window.location.href.indexOf(HOME) >= 0) {
QUnit.ok(true, HOME + ' loaded');
clearTimeout(intervalId);
callback();
}
}, 100);
});
So each test can do:
[TEST 1] dominator.home().click('foo') ...
[TEST 2] dominator.home().click('bar') ...
// home() doesn't take any argument for simplicity reasons.
// Ideally it would just reset to whatever URL the iframe was created with.
Is there an easier way I'm missing, or does that functionality make sense?
Cheers
The text was updated successfully, but these errors were encountered:
I started using Dominator to test a single-page webapp (actually a PhoneGap app).
My setup looks like:
Now each test can start navigating, which is just clicking and rendering views within the one page.
Currently it seems that the
open
function really expects physical pages. Is would be great if we could also pass it an absolute URL, so that each test can simply reset the entire app and start fresh. My current workaround is:So each test can do:
Is there an easier way I'm missing, or does that functionality make sense?
Cheers
The text was updated successfully, but these errors were encountered: