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

Prefix Form ID in Settings #57

Merged
merged 10 commits into from
Jul 31, 2024
Merged

Prefix Form ID in Settings #57

merged 10 commits into from
Jul 31, 2024

Conversation

n7studios
Copy link
Contributor

Summary

Similar to the WooCommerce Plugin, prefixes the settings in Contact Form 7 with form:, so we know the IDs specified relate to ConvertKit Forms.

This allows adding Tags and Sequences to the dropdown options to assign to the subscriber in a later PR.

Testing

  • testCreateFormToConvertKitFormMapping: Renamed test to reflect this checks subscribing works when defining a ConvertKit Form ID
  • testCreateFormSubscribeOnly: Test that subscribing works when the Subscribe option is selected, instead of a ConvertKit Form
  • testFormSettingsPrefixAddedToSettingsOnUpgrade: Test that settings are migrated to the form:id format on Plugin update/upgrade.

Checklist

@n7studios n7studios added the enhancement New feature or request label Jul 30, 2024
@n7studios n7studios self-assigned this Jul 30, 2024
With the introduction of <optgroup>, whilst the form order is correct, the assertions fail
@n7studios n7studios requested review from a team, noelherrick and corydhmiller and removed request for a team July 30, 2024 07:56
@n7studios n7studios marked this pull request as ready for review July 30, 2024 07:56
@@ -372,9 +372,6 @@ public function configureConvertKitSettingsOnForm($I, $wpFormID, $formName, $nam
$I->waitForElementVisible('div[data-connection_id="' . $connectionID . '"] .wpforms-provider-fields');

if ($formName) {
// Confirm that Forms are in ascending alphabetical order.
$I->checkSelectFormOptionOrder($I, '[name="providers[convertkit][' . $connectionID . '][list_id]"]');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Introducing optgroup to the dropdown selector makes this test fail, as it can't seem to grab the right option value to perform the assertion with. It's the only place used so don't think it's vital to keep checking this.

@n7studios n7studios merged commit 2f7df19 into main Jul 31, 2024
27 checks passed
@n7studios n7studios deleted the prefix-form-id-settings branch October 4, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants