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

Added code to display error message from grapqhl response in form #4346

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

del22123
Copy link
Collaborator

@del22123 del22123 commented Oct 17, 2024

Description

This PR contains the fix for customer login flow when require email confirmation is enabled.
Appropriate error message response from the graphql on customer creation will be shown in the form

This change requires few changes in Magento backend code.
Backend PR:
https://github.com/magento-commerce/magento2-pwa/pull/61

Closes #PWA-3367
https://jira.corp.adobe.com/browse/PWA-3367

Acceptance

Verification Stakeholders

Specification

Verification Steps

Step 1: Enable customer email confirmation from Magento Admin panel -> Stores -> Customer -> Customer Configuration -> Create New Account Options -> Require Emails Confirmation -> Yes and save the config
Step 2: In PWA store view add a product to cart and the go to Checkout page -> Sign In-> Create an account or Header -> Sign in -> Create an account
Step 3: Enter all the necessary details for the new customer account (Email should not exist already in the website)
Step 4: Click create an account button

Current result:
General error is thrown instead of more relevant error
(Error: An error has occurred. Please check the input and try again.)

Fix result:
Actual message from Magento graphql will be shown.
(Your account is created, You must confirm your account. Please check your email for the confirmation link.)

Screenshots / Screen Captures (if appropriate)

Breaking Changes (if any)

Checklist

  • I have added tests to cover my changes, if necessary.
  • I have added translations for new strings, if necessary.
  • I have updated the documentation accordingly, if necessary.

@del22123 del22123 added bug Something isn't working pkg:peregrine version: Minor This changeset includes functionality added in a backwards compatible manner. Progress: ready for review labels Oct 17, 2024
@del22123 del22123 self-assigned this Oct 17, 2024
@pwa-studio-bot
Copy link
Collaborator

pwa-studio-bot commented Oct 17, 2024

Fails
🚫

node failed.

🚫

GraphQL queries did not pass. Make sure to execute yarn run validate-queries locally prior to committing.

🚫

Unit tests in the following files did not pass 😔. All tests must pass before this PR can be merged

  • packages/peregrine/lib/talons/FormError/__tests__/useFormError.spec.js
Messages
📖

Associated JIRA tickets: PWA-3367.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next pr-test build run (assuming they are fixed).
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

Log

ERROR ON TASK: unitTests


ERROR ON TASK: validateQueries


Error:  Danger had errors running. See message(s) above for more details.
danger-results://tmp/danger-results.json

Generated by 🚫 dangerJS against 5963e11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working pkg:peregrine pkg:venia-ui Progress: approved version: Minor This changeset includes functionality added in a backwards compatible manner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants