When the Commerce anonymous registration checkout pane is enabled, the login pane should show a nice message near the guest checkout option.

Our login with email checkout pane does not. To do so, we need to implement the canRegisterAfterCheckout method on the pane.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | login-checkout-pane-description-3081857-2.patch | 1.01 KB | lkacenja |
| Screen Shot 2019-09-17 at 2.17.36 PM.png | 13.15 KB | lkacenja |
Issue fork email_registration-3081857
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
lkacenjaHere is a patch that checks for either the original Commerce pane or our email registration pane.
Comment #3
gregglesLooks good to me, though I don't see anything calling that function. Is this patch the whole change?
Comment #4
gregglesAh, I see now this is overriding a method on the parent.
OK, seems reasonable. Leaving this in needs review for a bit to get any feedback from any other users/contributors.
Comment #5
rhovlandThanks for the patch. This fixes the issue where the guest registration message is missing after updating to 1.0.0 and switching to using the email_registration pane.
Comment #6
andypostIs there a way to add testing steps?
Comment #7
lkacenja@andypost did you want steps to reproduce or automated testing steps? I'm happy to provide the former. I could be wrong, but the latter seems difficult to me. This is a fairly deeply embedded Commerce plugin and would require quite a bit of config to test. However, I agree that some test coverage would be really good, as this plugin is not likely to receive ongoing attention. Thanks.
Comment #8
3ssom commentedI'm trying to test this here and I'm hoping I'm doing the step right!
So I've noticed this show happen when the (anonymous registration checkout pane is enabled) so here are the steps and correct me if I'm wrong:
Couldn't see the nice message disappear at all! I also tried to put the Login with email registration or continue as guest which was under the Disabled section instead of the default login one but still the same.
am I missing something here?
Comment #9
anybodyLet's automate that tests to ensure it works now and in the future.
Comment #10
anybody@greggles what do you think, the tests might be quite heavy due to the Drupal Commerce dependencies and configuration. Should we merge it as-is or better invest the time for the test?
@Grevil what do you think?
Comment #11
anybodyComment #12
gregglesI don't have a strong opinion on it. If someone doing the work is willing to do it then that seems great, but I agree it could be hard to get to testing this.
Comment #13
andypostI bet it's not a hard job to add testing,
composer req --dev drupal/commerceshould work now instead oftest_dependencies(used by DrupalCI)Comment #14
anybodyAs of #13
Comment #17
grevil commentedAlright all done! @Anybody, should we show the message only if the "Email registration guest registration after checkout" pane is enabled, or also when the "Guest registration after checkout" is enabled?
Comment #18
grevil commentedComment #19
grevil commentedChecking both panes makes only sense. Creating tests now.
Comment #20
grevil commentedAlright, I refactored some of the existing test helping methods, adjusted Testclass names / folder structure and added the required test! Please review! 😊
EDIT: I also moved the helper methods to the top of the class.
Comment #21
grevil commentedTests fail.
Comment #22
grevil commentedAll green now, please review!
Comment #23
anybodyThanks @Grevil for taking the time! :)
Comment #25
anybody