Permalink
Browse files

Remove eyedee.me related wclickIfExists invocations

* When redirecting to eyedee.me, add a small delay before continuing to ensure time for the click handler to be hooked up.
* Renenable the returning-user, remove-email, and add-primary-to-secondary tests.
  • Loading branch information...
shane-tomlinson committed Nov 19, 2012
1 parent cec83da commit 7a96b4643873188c9cda973b910c4980ca184501
@@ -5,8 +5,5 @@
// These are tests to ignore
exports.tests_to_ignore = [
- "add-primary-to-secondary.js",
- "public-terminals.js",
- "remove-email.js",
- "returning-user.js"
+ "public-terminals.js"
];
@@ -1,2 +1,3 @@
exports.DEFAULT_POLL_MS = 500;
exports.DEFAULT_TIMEOUT_MS = 20000;
+exports.DEFAULT_LOAD_PAGE_MS = 1500;
@@ -15,7 +15,8 @@ CSS = require('../pages/css.js'),
dialog = require('../pages/dialog.js'),
runner = require('../lib/runner.js'),
testSetup = require('../lib/test-setup.js'),
-user = require('../lib/user.js');
+user = require('../lib/user.js'),
+timeouts = require('../lib/timeouts.js');
var browser,
primaryEmail,
@@ -55,10 +56,11 @@ runner.run(module, {
// make sense to me, since wclick implicitly calls wfind first o_O.
.wfind(CSS['dialog'].verifyWithPrimaryButton)
.wclick(CSS['dialog'].verifyWithPrimaryButton)
- // continuing past that button
+ // continuing past that button. Wait to give the dialog time to
+ // load.
+ .delay(timeouts.DEFAULT_LOAD_PAGE_MS)
.wtype(CSS['eyedee.me'].newPassword, primaryEmail.pass)
.wclick(CSS['eyedee.me'].createAccountButton)
- .wclickIfExists(CSS['eyedee.me'].createAccountButton)
.wwin()
.wtext(CSS['123done.org'].currentlyLoggedInEmail, function(err, text) {
done(err || assert.equal(text, primaryEmail.email));
@@ -83,10 +85,11 @@ runner.run(module, {
// is not clickable immediately after being added to the DOM.
.wfind(CSS['dialog'].verifyWithPrimaryButton)
.wclick(CSS['dialog'].verifyWithPrimaryButton)
- // continuing past that button
+ // continuing past that button. Wait to give the dialog time to
+ // load.
+ .delay(timeouts.DEFAULT_LOAD_PAGE_MS)
.wtype(CSS['eyedee.me'].newPassword, secondPrimaryEmail.pass)
.wclick(CSS['eyedee.me'].createAccountButton)
- .wclickIfExists(CSS['eyedee.me'].createAccountButton)
.wwin()
.wtext(CSS['123done.org'].currentlyLoggedInEmail, function(err, text) {
done(err || assert.equal(text, secondPrimaryEmail.email))
@@ -15,7 +15,8 @@ CSS = require('../pages/css.js'),
dialog = require('../pages/dialog.js'),
runner = require('../lib/runner.js'),
testSetup = require('../lib/test-setup.js'),
-user = require('../lib/user.js');
+user = require('../lib/user.js'),
+timeouts = require('../lib/timeouts.js');
var browser,
primaryEmail,
@@ -75,7 +76,9 @@ runner.run(module, {
// make sense to me, since wclick implicitly calls wfind first o_O.
.wfind(CSS['dialog'].verifyWithPrimaryButton)
.wclick(CSS['dialog'].verifyWithPrimaryButton)
- // continuing past that button
+ // continuing past that button. Wait to give the dialog time to
+ // load.
+ .delay(timeouts.DEFAULT_LOAD_PAGE_MS)
.wtype(CSS['eyedee.me'].newPassword, primaryEmail.pass)
.wclick(CSS['eyedee.me'].createAccountButton)
.wwin()
@@ -13,7 +13,8 @@ CSS = require('../pages/css.js'),
dialog = require('../pages/dialog.js'),
restmail = require('../lib/restmail.js'),
runner = require('../lib/runner.js'),
-testSetup = require('../lib/test-setup.js');
+testSetup = require('../lib/test-setup.js'),
+timeouts = require('../lib/timeouts.js');
var pcss = CSS['persona.org'],
browser, secondBrowser, eyedeemail, theEmail;
@@ -53,6 +54,8 @@ var primaryTest = {
"switch to eyedeeme dialog, submit password, click ok": function(done) {
browser.chain({onError: done})
.wwin(pcss.verifyPrimaryDialogName)
+ // Give eyedee.me a bit of time to load itself up.
+ .delay(timeouts.DEFAULT_LOAD_PAGE_MS)
.wtype(CSS['eyedee.me'].newPassword, eyedeemail.split('@')[0])
.wclick(CSS['eyedee.me'].createAccountButton, done);
},
@@ -92,7 +92,8 @@ runner.run(module, {
.wclick(CSS['dialog'].newEmailNextButton)
// sometimes the verifyWithPrimaryButton needs to be clicked twice
.wclick(CSS['dialog'].verifyWithPrimaryButton)
- .wclickIfExists(CSS['dialog'].verifyWithPrimaryButton)
+ // Give eyedee.me a bit of time to load itself up.
+ .delay(timeouts.DEFAULT_LOAD_PAGE_MS)
.wtype(CSS['eyedee.me'].newPassword, firstPrimaryPassword)
.wclick(CSS['eyedee.me'].createAccountButton)
.wwin()
@@ -111,7 +112,8 @@ runner.run(module, {
.wclick(CSS['dialog'].addNewEmailButton)
// sometimes the verifyWithPrimaryButton needs to be clicked twice
.wclick(CSS['dialog'].verifyWithPrimaryButton)
- .wclickIfExists(CSS['dialog'].verifyWithPrimaryButton)
+ // Give eyedee.me a bit of time to load itself up.
+ .delay(timeouts.DEFAULT_LOAD_PAGE_MS)
.wtype(CSS['eyedee.me'].newPassword, secondPrimaryPassword)
.wclick(CSS['eyedee.me'].createAccountButton)
.wwin()
@@ -153,7 +155,7 @@ runner.run(module, {
.wwin(CSS['dialog'].windowName)
.wclick(CSS['dialog'].emailPrefix + getEmailIndex(secondPrimaryEmail))
.wclick(CSS['dialog'].signInButton)
- .wclickIfExists(CSS['dialog'].myComputerButton)
+ .wclickIfExists(CSS['dialog'].notMyComputerButton)
.wwin()
.wtext(CSS['123done.org'].currentlyLoggedInEmail, function(err, text) {
done(err || assert.equal(text, secondPrimaryEmail))
@@ -167,7 +169,7 @@ runner.run(module, {
.wwin(CSS['dialog'].windowName)
.wclick(CSS['dialog'].emailPrefix + getEmailIndex(secondaryEmail))
.wclick(CSS['dialog'].signInButton)
- .wclickIfExists(CSS['dialog'].myComputerButton)
+ .wclickIfExists(CSS['dialog'].notMyComputerButton)
.wwin()
.wtext(CSS['myfavoritebeer.org'].currentlyLoggedInEmail, function(err, text) {
done(err || assert.equal(text, secondaryEmail))
@@ -212,7 +214,7 @@ runner.run(module, {
.wclick(CSS['persona.org'].signInForm.nextButton)
.wfind(CSS['persona.org'].signInForm.verifyPrimaryButton, done);
}
-},
+},
{
suiteName: path.basename(__filename),
cleanup: function(done) { testSetup.teardown(done) }
@@ -13,7 +13,8 @@ persona_urls = require('../lib/urls.js'),
CSS = require('../pages/css.js'),
dialog = require('../pages/dialog.js'),
testSetup = require('../lib/test-setup.js'),
-runner = require('../lib/runner.js');
+runner = require('../lib/runner.js'),
+timeouts = require('../lib/timeouts.js');
var browser, primary, secondary;
/*
@@ -44,6 +45,8 @@ runner.run(module, {
.wclick(CSS['persona.org'].signInForm.nextButton)
.wclick(CSS['persona.org'].signInForm.verifyPrimaryButton)
.wwin(CSS['persona.org'].verifyPrimaryDialogName)
+ // Give eyedee.me a bit of time to load itself up.
+ .delay(timeouts.DEFAULT_LOAD_PAGE_MS)
.wtype(CSS['eyedee.me'].newPassword, primary.split('@')[0])
.wclick(CSS['eyedee.me'].createAccountButton)
.wwin()
@@ -112,7 +115,7 @@ runner.run(module, {
done(err || assert.ok(!val));
});
}
-},
+},
{
suiteName: path.basename(__filename),
cleanup: function(done) { testSetup.teardown(done) }

0 comments on commit 7a96b46

Please sign in to comment.