You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: README.md
+1-7Lines changed: 1 addition & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -99,20 +99,14 @@ The `tests` directory contains end-to-end tests for the project, utilizing Cypre
99
99
1. Run `npm install`.
100
100
2. Run `npm run build`.
101
101
3. Run `npm run env:start`.
102
-
4. Set Mailchimp credentials as environment variables:
103
-
- run `export CYPRESS_MAILCHIMP_USERNAME="your mailchimp username"`
104
-
- run `export CYPRESS_MAILCHIMP_PASSWORD="your mailchimp password"`
105
-
- Do not forget to escape any special characters with `\`. `echo $CYPRESS_MAILCHIMP_PASSWORD` to ensure the password is set correctly.
102
+
4. Duplicate the `.env.test.sample` file and rename `.env.test`. Populate this file with your own Mailchimp account credentials.
106
103
-**NOTE:** Use a test account that does not require 2FA. 2FA will fail some of the tests.
107
104
5. Set your Mailchimp account up
108
105
- Name the audience in your Mailchimp test account "10up". Required for `settings.test.js`.
109
106
- Enable all merge fields. From your Mailchimp account home page -> `/audience/settings/` -> Edit merge fields/tags -> Set all merge fields to "visible". Required for `settings.test.js`.
110
107
111
108
6. Run `npm run cypress:run`. You can also run `npm run cypress:open` to run tests in UI mode.
112
109
113
-
#### E2E tests notes
114
-
- You must run `connect.test.js` before `settings.test.js` in order to log the user in. Otherwise, all settings tests will fail.
115
-
116
110
## Support Level
117
111
118
112
**Active:** Mailchimp is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.
0 commit comments