Giter Club home page Giter Club logo

keystone-nightwatch-e2e's People

Contributors

bladey avatar epihacker avatar jstockwin avatar stennie avatar webteckie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

keystone-nightwatch-e2e's Issues

SauceLabs error: The test with session id null has already finished, and can't receive further commands.

The keystone e2e tests sometimes failed with the following error. Need to figure out why NightwatchJS is not getting notified and/or it is not notifying KNE of any errors.

Running:  Date field should show correctly in the edit form
 ✔ Expected element <.EditForm-container .field-type-text[for="name"] input[name="name"]> to be visible - condition was met in 305ms
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldA"] label[for="fieldA"]> to be visible - condition was met in 299ms
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldA"] label[for="fieldA"]> text to equal: "Field A" - condition was met in 292ms
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldA"] input[name="fieldA"]> to be visible - condition was met in 297ms
13:49:21:641 Sauce Connect: Closing Sauce Connect Tunnel
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldA"] button> to be visible - condition was met in 296ms
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldB"] label[for="fieldB"]> to be visible - condition was met in 295ms
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldB"] label[for="fieldB"]> text to equal: "Field B" - condition was met in 295ms
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldB"] input[name="fieldB"]> to be visible - condition was met in 317ms
 ✔ Expected element <.EditForm-container .field-type-date[for="fieldB"] button> to be visible - condition was met in 309ms
OK. 9 assertions passed. (2.714s)
Running:  Date field can be filled via the edit form
 ✔ Element <div[data-screen-id="item"]> was visible after 287 milliseconds.
 ✖ Expected element <div[data-alert-type="success"]> text to equal: "Your changes have been saved successfully" - element was not found  - expected "present" but got: "not present"
    at Object.Date field can be filled via the edit form (/home/travis/build/keystonejs/keystone/test/e2e/adminUI/tests/group006Fields/testDateField.js:84:29)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
FAILED:  1 assertions failed and 1 passed (1m 4s / 64966ms)
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 
 ERROR The test with session id null has already finished, and can't receive further commands.
You can learn more at https://saucelabs.com/jobs/null
For help, please check https://wiki.saucelabs.com/display/DOCS/Common+Error+Messages
Error processing the server response: 

Add basic unit testing to KNE

KNE works with different environments and platforms and browsers and configures a lot of that for the upstream Nightwatch runner. Some of the current functionality may currently be untestable thus may need to be refactored for testability.

Should be able to override timeout on signin?

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

browser.adminUISignin.signin({ user: '[email protected]', 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: '[email protected]', 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?

Can't run tests for `wysiwyg` fields

Currently, our html fieldTestObject is not smart enough to deal with wysiwyg fields. We should add a config option to cope with this, as it's a very common use case.

My old PR is very stale and out of date, so I'll try to look at this again. @webteckie Can you think of any better ways of doing this other than passing in a wysiwyg: true in the modelTestConfig, and that triggers the fieldTestObject to use different selectors?

Move the nightwatch config from keystone to this repo

The nightwatch config should really be part of this repo and not the system under test(SUT). The SUT should pass any required custom options to the keystone-nightwatch-e2e repo.

NOTE: the browser drivers should also be part of this repo and not the SUT.

Upgrade to Nightwatch 1.x

Consider upgrading to Nightwatch 1.0:

A significant update from previous 0.x versions featuring a complete rewrite of the entire codebase and also including some new features. The main focus has been on improving the underlying architecture, therefore this release includes mostly fixes and improvements, but also a few brand new features.

KNE uses too many global environment variables

KNE uses to many global environment variables making the code hard to reason about. A possible alternative may be to gather all settings that are required by the Nightwatch runner into a kneSettings export and require that in nightwatch.conf.js to apply directly to the settings. For example:

export kneSettings = {
  startSeleniumProcess: [true/false],
  browserName: <name>,
  browserVersion: <version>,
  etc.
}

Then in nightwatch.conf.js:

var kneSettings = require('.').kneSettings;

if (kneSettings.browserName) {
	settings.test_settings[process.env.KNE_TEST_ENV].desiredCapabilities.browserName = kneSettings.browserName;
}

...

`assertFieldInputs` docs are slightly misleading?

The docs are here: https://keystonejs.github.io/keystone-nightwatch-e2e/javadoc/module-adminUIItemScreen.html#~assertFieldInputs

However, what we actually call is this: https://github.com/keystonejs/keystone/blob/master/test/e2e/adminUI/tests/group006Fields/testEmailField.js#L81

Specifically, we call
{ name: 'name', input: { value: 'Email Field Test 1' }, },
whereas the docs make it seems like this should be
{ name: 'name', input: 'Email Field Test 1' },
They make no mention of value.

@webteckie What do you think?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.