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

Enhancement/875 Transition from WP Acceptance to Cypress E2E tests #900

Merged
merged 49 commits into from
Aug 2, 2022

Conversation

faisal-alvi
Copy link
Member

@faisal-alvi faisal-alvi commented Jun 23, 2022

Description of the Change

Adding Cypress E2E tests and removing WP Acceptance tests.

Added the following tests:

  • Settings test.

Closes #875

Alternate Designs

n/a

Possible Drawbacks

n/a

Verification Process

Check if all Cypress tests are running locally + at Github actions.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Changelog Entry

Added - Cypress E2E tests.

Credits

Props @faisal-alvi

@faisal-alvi faisal-alvi added this to the 1.7.0 milestone Jun 23, 2022
@faisal-alvi faisal-alvi self-assigned this Jun 23, 2022
.wp-env.json Outdated Show resolved Hide resolved
@peterwilsoncc
Copy link
Collaborator

I'll move this to the 2.0.0 milestone as 1.7.0 likely to be released early next week.

@peterwilsoncc peterwilsoncc modified the milestones: 1.7.0, 2.0.0 Jul 21, 2022
faisal-alvi and others added 2 commits July 22, 2022 16:45
to fix:
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
@peterwilsoncc
Copy link
Collaborator

We discussed this issue in the 10up APAC call today.

It appears that Cypress is not building either because:

  • different users have different versions of node/npm
  • Cypress requires a specific version range of node/npm

To ensure users are using the same version of node, it would be good to add an .nvmrc file to this plugin and document that development requires https://github.com/nvm-sh/nvm -- there are docs in Gutenberg that may be useful inspiration.

If Cypress requires a specific version of node, then let's aim for 16, 14 or 12 in order of preference -- each of them being LTS versions.

@jeffpaul
Copy link
Member

I'm wildly opinionated that we should do what is necessary to ensure we can utilize Cypress for e2e tests on Distributor since we're spending time on building up our Cypress utilities across other 10up OSS projects and would be sub-optimal to have a different e2e testing framework just with Distributor. So if that means adding an .nvmrc file here, then so be it please proceed (also check to see if that should somehow be called out in the release instructions or if its a one-time addition).

@dkotter dkotter self-requested a review August 2, 2022 15:19
@dkotter
Copy link
Collaborator

dkotter commented Aug 2, 2022

As discussed today, the failing Dependency Review check is already solved in #916, so that doesn't need addressed here.

In addition, it was decided that we should proceed with merging this and any additional changes need (like additional test coverage, removing WP Acceptance tests, etc) can be handled in follow up PRs.

@dkotter dkotter marked this pull request as ready for review August 2, 2022 19:39
@dkotter dkotter merged commit 5377e02 into develop Aug 2, 2022
@dkotter dkotter deleted the enhancement/875 branch August 2, 2022 19:39
@peterwilsoncc peterwilsoncc modified the milestones: 2.0.0, 1.7.1 Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setup Cypress for E2E testing
7 participants