This pull request adds a selector on the In-Depth Comparison
page to change the billing interval. It also refines the copy of the header. Finally, this pull request adds Select
buttons to redirect users to the Email Comparison
page with the right billing interval selected, and the right email provider expanded:

Note this pull request also:
- Moves the
BillingIntervalToggle
to its own folder
- Fixes a wrong component name
The following are out-of-scope:
- Using an
Enum
for the email provider slugs
- Handling Google Workspace properly when monthly billing is selected
Regarding the latter I think one option could be to hide the Select
button and display unavailable
for now.
Testing instructions
Note you will have to append ?flags=emails/in-depth-comparison
to the url of the page (and reload it) if you’re testing those changes on a live branch as this feature has not been enabled on this environment yet:
- Run
git checkout update/in-depth-comparison-page-with-billing-interval
and start your server, or access a live branch
- Log into a WordPress.com account with a domain but no email
- Open the
Emails
page
- Click the
Add Email
button of that domain to access the Email Comparison
page
- Change the billing interval
- Click the
See how they compare
link to access the In-Depth Comparison
page
- Assert that the page shows the billing interval you have selected
- Change the billing interval
- Click any
Select
button
- Assert that you are presented with the
Email Comparison
page
- Assert that the page shows the billing interval you have selected
- Assert that the form of the email provider selected is expanded (if it exists)
You should also make sure that reloading the page, or going back to a previous page doesn’t result in displaying inconsistent information. Here is an example using part of the test instructions from above:
- Change the billing interval to monthly
- Click the
See how they compare
link to access the In-Depth Comparison
page
- Assert that the page shows the monthly billing interval
- Click your browser’s back button
- Assert that the billing interval is still monthly
Unfortunately, no screenshots were provided by the developer.