Automattic / wp-e2e-tests

Automated end-to-end tests for WordPress.com
https://github.com/Automattic/wp-calypso
GNU General Public License v2.0
110 stars 20 forks source link

Remove and address sleep statements in `wp-jetpack-plans-spec.js` #1737

Closed juliaamosova closed 5 years ago

juliaamosova commented 5 years ago

Removed 2 sleep statements and addressed it by using waitTillPresentAndDislplayed in respective functions:

waitTillPresentAndDislplayed adds the necessary check to make sure that both buttons are displayed and ready to be clicked on.

To test:

The change affects wp-jetpack-plans-spec.js.

juliaamosova commented 5 years ago

The comments tests that are failing in CI are more than likely unrelated but Can create wporg site and connect Jetpack - [PRESSABLE] Gutenberg Markdown block: (desktop) @jetpack Publish a simple post with Markdown block is failing in CI and could be related... Did you test with that host?

Thanks @JavonDavis! The explanation of the failing tests is below:

Failing Jetpack tests:

Failing CI test:

Can create wporg site and connect Jetpack - [PRESSABLE] Gutenberg Markdown block: (desktop) @jetpack Publish a simple post with Markdown block:

Timed out waiting for element with css selector of 'a.jp-jetpack-connect__button' to be clickable

The code that doesn't work is here:

https://github.com/Automattic/wp-e2e-tests/blob/b342aa586ac4bb4b939309603c5b5500fb973bd8/lib/pages/wp-admin/wp-admin-jetpack-page.js#L14

There is yet another sleep statement that needs to be addressed. I am already working on it :) It will be addressed in a separate PR since it is a different issue.