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

Update e2e tests for #2487 #2521

Conversation

joemcgill
Copy link
Collaborator

Changes proposed in this Pull Request:

See #2487. This is meant to be added to the existing PR prior to final code review/merging. Opening this as a separate PR to ease internal review.

This updates the e2e tests following the removal of the WP.com account.

First, this moves the test for confirming that the WP.com card is not shown after it's connected to a new test described by "Connected WordPress.com account", which mocks the Jetpack connection before loading the page.

Second, one the WP.com account card is no longer shown, many of the following e2e tests that relied on nth-locators to find elements in the DOM needed to be refactored so that they work regardless of whether the WP.com card was present.

To do so, this updates the getAccountCards() method to accept options that get passed to the locator locator (see docs) to find a specific account card, which can then be used in other helper methods when trying to locate a specific title or description.

Detailed test instructions:

  1. If using wp-env locally, run npm run test:e2e -- setup-mc

@github-actions github-actions bot added the changelog: update Big changes to something that wasn't broken. label Aug 13, 2024
Copy link

codecov bot commented Aug 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.5%. Comparing base (e2f2420) to head (7523a05).
Report is 3 commits behind head on update/2487-hide-jetpack-if-already-connected-onboarding.

Additional details and impacted files

Impacted file tree graph

@@                                    Coverage Diff                                     @@
##           update/2487-hide-jetpack-if-already-connected-onboarding   #2521     +/-   ##
==========================================================================================
- Coverage                                                      63.7%   63.5%   -0.2%     
==========================================================================================
  Files                                                           326     322      -4     
  Lines                                                          5084    5043     -41     
  Branches                                                       1228    1220      -8     
==========================================================================================
- Hits                                                           3240    3204     -36     
+ Misses                                                         1677    1672      -5     
  Partials                                                        167     167             
Flag Coverage Δ
js-unit-tests 63.5% <ø> (-0.2%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 6 files with indirect coverage changes

@dsawardekar dsawardekar merged commit 9e606c1 into update/2487-hide-jetpack-if-already-connected-onboarding Aug 14, 2024
7 checks passed
@dsawardekar dsawardekar deleted the update/2487-hide-jetpack-e2e-tests branch August 14, 2024 05:05
@eason9487 eason9487 added changelog: none Skip changelog entry for this PR and removed changelog: update Big changes to something that wasn't broken. labels Aug 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: none Skip changelog entry for this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants