When I was integrating this subscription service to one of the projects I found this missing use cases:

1. Anonymous subscription of already subscribed email.

As anonymous if I click subscription form with the same email that was previously confirmed:

expected behaviour: I should have subscribe button toggled to unsubscribe & see message something like - your mail was already subscribed, if you need unsubscribe it please click unsubcribe

actual behaviour: button is toggled (which is correct) but there is message : "bla bla bla please confirm submission" which is incorrect as this mailbox already was confirmed & confuses users, it happens coz of wrong requiresConfirmation processing

2. Anonymous unsubscribe.

As anonymous if I click unsubscribe on a previously opened form while somebody e.g. admin or me over email confirmed unsubscribe:

expected behaviour: I should see your mail was unsubscribed.

actual behaviour: there is message : "bla bla bla please confirm submission cancellation" which is incorrect as this mailbox already was confirmed & unsubscribed & confuses users, it happens coz of wrong requiresConfirmation processing

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Pavel Ruban created an issue. See original summary.

Pavel Ruban’s picture

Pavel Ruban’s picture

Assigned: Pavel Ruban » Unassigned
Status: Active » Needs review

Status: Needs review » Needs work
Pavel Ruban’s picture

Issue summary: View changes
jonathanshaw’s picture

Title: Anonym users subscription / unsubscription worflow » Better UX for anonymous subscriptions edge cases
Component: Code » User interface
Priority: Minor » Normal
Status: Needs work » Needs review
Issue tags: -anonymous subscribe +Needs tests

Great catches Pavel.
This is going to need tests.

AdamPS’s picture

Status: Needs review » Needs work

Confirm that normal policy for this module is that tests are needed - in the long run it's the best way to get a stable module.

There can be exceptions for example if you are fixing a small bug in a certain feature, and there are no existing tests to adapt.