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/update critical flows with e2e test coverage #87

Draft
wants to merge 46 commits into
base: develop
Choose a base branch
from

Conversation

MaxwellGarceau
Copy link
Collaborator

@MaxwellGarceau MaxwellGarceau commented Dec 23, 2024

Description of the Change

‼️ Still in progress ‼️
Update E2E Cypress tests to cover all critical testing flows.

Enhancement/add mailchimp api client - #99

  • Add a FE Mailchimp client to Cypress tests to verify Mailchimp account interactions. Ensures successful form submission and full integration testing.
  • Use .env.test for env variables
  • Add health check for tests if Mailchimp client is unable to make requests
  • Modularize Cypress commands

‼️ Environment changes needed ‼️

  • Need to generate an API key for the test Mailchimp user in the CI/CD pipeline.
  • Need to attach that API key to CYPRESS_MAILCHIMP_API_KEY as a Github secret
  • Need to attach the server prefix to CYPRESS_MAILCHIMP_API_SERVER_PREFIX as a Github secret
  • Need a second user that never selects any lists or options
    • CYPRESS_MAILCHIMP_USERNAME_NO_LIST
    • CYPRESS_MAILCHIMP_PASSWORD_NO_LIST

Closes #61 #86

How to test the Change

Follow the E2E testing instructions in the readme to run the Cypress tests. In addition, these tests should run automatically as part of the projects CI/CD flow.

Changelog Entry

Added - New tests to cover E2E critical flows
Changed - Existing tests to more robustly cover E2E critical flows. Modularized reusable testing code.

Credits

Props @MaxwellGarceau

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@github-actions github-actions bot added this to the 1.7.0 milestone Dec 23, 2024
Highlights
- Add a FE Mailchimp client to Cypress tests to verify Mailchimp account interactions. Ensures successful form submission and full integration testing.
- Use .env.test for env variables
- Add health check for tests if Mailchimp client is unable to make requests
- Modularize Cypress commands

‼️ Environment changes needed ‼️
- Need to generate an API key for the test Mailchimp user in the CI/CD pipeline.
- Need to attach that API key to CYPRESS_MAILCHIMP_API_KEY as a Github secret
- Need to attach the server prefix to CYPRESS_MAILCHIMP_API_SERVER_PREFIX as a Github secret

Commits

* Add Mailchimp API package

* Add cypress-dotenv

* Add Mailchimp API client to Cypress

Necessary to interact with the test user account to verify contacts, make deletions, etc.

* Update documentation for env setup

* Remove outdated E2E notes

* Remove log to fix bug. Skip unfinished tests.

* Remove outdated readme note

* Add test to verify lists in WP admin match lists in Mailchimp account

* Add assertion that contacts in Mailchimp account match email submitted

* Simplify mailchimp commands

* Add mailchimp commands to command folder

* Organize commands into modular files

* Rename mailchimpApiConfig to more clearly state purpose

* Fix grammar mistake

* Add scaffolding for gmail api

* Switch to gabi-script for FE requests

* Update .env.test.sample with example of google creds

* Remove gmail api client

Too complicated to set up for our purposes. We're better off with Mailhog

* Remove gapi-script
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.

Update critical flows with e2e test coverage
1 participant