Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes webdriver issues #635

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions grunt/tasks/webdriver-jasmine.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ module.exports = function(){

function getJSReport(browser){
return browser
.waitForCondition("typeof window.jasmine != 'undefined'", 5e3)
.waitFor(wd.asserters.jsCondition("typeof window.jasmine != 'undefined'"), 5e3, 50)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the third argument here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poll interval

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the default? why set the other intervals differently?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

50ms because I want to start the tests asap

.fail(function(error){
throw Error("The test page didn't load properly. " + error);
})
.waitForCondition("typeof window.jasmine.getJSReport != 'undefined'", 10e3)
.waitForCondition("window.postDataToURL.running <= 0", 30e3)
.waitFor(wd.asserters.jsCondition("typeof window.jasmine.getJSReport != 'undefined'"), 60e3, 100)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

100ms because the tests can take a few seconds to run, but then I don't want to unnecessarily delay everything more than necessary.

.waitFor(wd.asserters.jsCondition("window.postDataToURL.running <= 0"), 30e3, 500)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

500ms because if this isn't already 0 that means you're probably in debug mode and there are going to be a bunch of things to send.

.eval("jasmine.getJSReport().passed");
}
2 changes: 1 addition & 1 deletion test/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
urls.unshift('../node_modules/es5-shim/es5-shim.js');
}

var cacheBust = '?_=' + Date.now().toString(36);
var cacheBust = '?_=' + (+new Date).toString(36);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what polyfills are for? Or is the polyfill not loaded yet?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not loaded yet.


for (var urls_index = -1, urls_length = urls.length; ++urls_index < urls_length;) {
document.write('<script src="' + urls[urls_index] + cacheBust + '"><\/script>');
Expand Down