keystonejs / keystone-nightwatch-e2e

⚠️ Archived - Legacy end-to-end test framework for KeystoneJS applications.
https://keystonejs.github.io/keystone-nightwatch-e2e/javadoc/
MIT License
17 stars 7 forks source link

Should be able to override timeout on signin? #16

Open jstockwin opened 7 years ago

jstockwin commented 7 years ago

Currently, if you want to extend the default signin wait time you need to do the following:

browser.adminUISignin.signin({ user: 'user@keystonejs.com', password: 'admin', wait: false });
browser.adminUIApp.waitForHomeScreen({ timeout: 60000 });

since by default we only wait for 10000. We could add an optional timeout parameter, so that you can call

browser.adminUISignin.signin({ user: 'user@keystonejs.com', password: 'admin', wait: false, timout: 60000 });

@webteckie What do you think? It seems useful to me, but perhaps we don't want to just add everything we can think of?

webteckie commented 7 years ago

@jstockwin if anything I'd rather have it like this:

browser.adminUISignin.signin({ user: 'user@keystonejs.com', password: 'admin', wait: false }); or browser.adminUISignin.signin({ user: 'user@keystonejs.com', password: 'admin', wait: 60000 });

In other words, if you don't want the default wait then override it with the same wait parameter. The target function would need to test whether a typeof(wait) === 'boolean' or typeof(wait) === 'number' and do relevant logic.