Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[e2e] Add tests for launching a site #42513

Merged
merged 3 commits into from
May 27, 2020
Merged

Conversation

razvanpapadopol
Copy link

@razvanpapadopol razvanpapadopol commented May 21, 2020

Changes proposed in this Pull Request

  • Add an e2e test to verify that we can launch a site for free starting from My Home.
  • Add a test to verify that accounts with multiple sites can switch to a new site and launch it.
  • Add LaunchSiteFlow to lib.
  • Add CreateSiteFlow to lib.
  • Add an extra step to existing canary signup test to cover launch flow.

Testing instructions

  • New test should pass
  • Canary signup test should pass

Fixes #40135

@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

@sirreal sirreal requested a review from a team May 21, 2020 07:57
@sirreal sirreal added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Blocked / Hold labels May 21, 2020
@Stojdza
Copy link
Contributor

Stojdza commented May 21, 2020

@razvanpapadopol, according to #40135, did you want to add some of the new tests to canaries?

@razvanpapadopol
Copy link
Author

@razvanpapadopol, according to #40135, did you want to add some of the new tests to canaries?

In my opinion this would be mostly redundant, covering a large part of the flow tested already by the signup tests. What do you think about adding this step to an existing canary signup test?

@Stojdza
Copy link
Contributor

Stojdza commented May 21, 2020

Full e2e suite is running two times every day. If you think it's enough for testing launch flow then I would skip adding it to canaries. If launch is important and prone to changes, then feel free to add it to signup canary.

@sirreal
Copy link
Member

sirreal commented May 21, 2020

Running this against PRs (with needs review label) and on scheduled runs seems good for now. Adding and removing it from canaries is pretty trivial, right?

@gwwar any reason you wanted this specifically for canaries? #40135

@Stojdza
Copy link
Contributor

Stojdza commented May 21, 2020

Adding and removing it from canaries is pretty trivial, right?

Yup. Just mark test with @canary tag. For example:

describe( 'Launch a free site @canary', function ()

@razvanpapadopol
Copy link
Author

Yes, but that will add the whole test preparation and cleanup as well to canaries (create account, create site, delete account) so I suggested instead to just add a single step to the complete signup flow that we already have:

step( 'Can launch a site', async function () {
    return await new LaunchSiteFlow( driver ).launchFreeSite();
} );

here: https://github.com/Automattic/wp-calypso/blob/master/test/e2e/specs/wp-signup-spec.js#L488

@gwwar
Copy link
Contributor

gwwar commented May 21, 2020

@gwwar any reason you wanted this specifically for canaries?

Because it broke before :D If it's too heavy, it's fine to leave it on the full suite.

@sirreal sirreal added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 22, 2020
Razvan Papadopol added 3 commits May 26, 2020 14:06
@razvanpapadopol
Copy link
Author

@Stojdza Added the extra step to canary signup in 1a1587c

Is there anything I can do about the remaining failing e2e tests? (Rebased and re-run tests a couple of times).

@Stojdza
Copy link
Contributor

Stojdza commented May 27, 2020

@razvanpapadopol I tried failed tests locally, against WP.com and live branch, and they passed. You're good to go 👍

Copy link
Contributor

@Stojdza Stojdza left a comment

Choose a reason for hiding this comment

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

🚀

@razvanpapadopol razvanpapadopol merged commit 3547b37 into master May 27, 2020
@razvanpapadopol razvanpapadopol deleted the add/e2e/launch-site branch May 27, 2020 10:53
@razvanpapadopol razvanpapadopol removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

My Home: Add canary E2E test for launching a site
5 participants