Skip to content
This repository has been archived by the owner on Feb 18, 2021. It is now read-only.

Jetpack tests: Multiple fixes #1741

Merged
merged 9 commits into from
Dec 27, 2018
Merged

Jetpack tests: Multiple fixes #1741

merged 9 commits into from
Dec 27, 2018

Conversation

brbrr
Copy link
Contributor

@brbrr brbrr commented Dec 27, 2018

This PR fixes a bunch of small issues which causes jetpack e2e tests to fail.

To test: Check CI job, maybe re-run it.

@brbrr brbrr self-assigned this Dec 27, 2018
@brbrr brbrr requested a review from a team December 27, 2018 05:11
// TODO: remove `a.jp-jetpack-connect__button,` after Jetpack 6.9 release
const selector = By.css(
"a.jp-jetpack-connect__button,.jp-connect-full__button-container a[href*='register']"
);
Copy link
Contributor

@juliaamosova juliaamosova Dec 27, 2018

Choose a reason for hiding this comment

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

@brbrr have you tried to fix the problem with the button not always being clickable here? Or was it something else? I wonder if I overcomplicated it here #1739 where I've tried to solve the button click issue and remove the sleep statement. Can you please take a look when you get a chance? Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No. Jetpack 6.9 will introduce new connection splash screen which introduces new connection button.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the clarification @brbrr 👍

By.css( '.checkout__secure-payment-form,.secure-payment-form' ),
null,
2 * config.get( 'explicitWaitMS' )
);
Copy link
Contributor

Choose a reason for hiding this comment

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

@brbrr here it looks like you've tried to solve the following error: TimeoutError: Timed out waiting for element with css selector of '.checkout__secure-payment-form,.secure-payment-form' to be present and displayed Wait timed out after 20496ms Is it correct? If so, I think it is being caused by the button click issue here instead:
https://github.com/Automattic/wp-e2e-tests/blob/master/lib/pages/plans-page.js#L52

I tested it by placing waitTillNotPresent after clicking on the upgrade to Business Plan button and it showed that after the button is clicked, the test stays on the plans page for some time waiting for the button not to be present. This in turn causes the payment page not to show up on time causing the initial error. I am working on addressing the sleep statement there which should resolve the button click issue. I am yet to find the solution for it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I think I saw the same error. I wasn't quite sure what the root of the problem, but during visual monitoring, I thought that the problem is that some data weren't loaded in 20sec due to the fact that Jetpack(WPORG) site might not perform as fast as WPCOM sites.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for confirming @brbrr! I thought of the same reason originally but after testing with waitTillNotPresent, I could see that the test doesn't leave the plans page. I am still working on figuring out what could be going on there.

Copy link
Contributor

@JavonDavis JavonDavis left a comment

Choose a reason for hiding this comment

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

Thanks for patching this up @brbrr! Will merge this to fix failing Jetpack tests

@JavonDavis JavonDavis merged commit 522c405 into master Dec 27, 2018
@brbrr brbrr deleted the temp/fix-jetpack-tests branch March 26, 2019 12:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants