Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Shows Error on invalid Product Quantity #2196

Merged
merged 13 commits into from
Mar 3, 2020
Merged

Conversation

supernova-at
Copy link
Contributor

@supernova-at supernova-at commented Feb 26, 2020

Description

This PR pops up an error toast when a user enters a number into the product quantity stepper on the cart page that results in a graphQL error, usually occurring when the number entered exceeds the available stock of the product.

Related Issue

Closes PWA-377.

Acceptance

Verification Stakeholders

@schensley @sirugh

Specification

Verification Steps

  1. Ensure an item is in your cart
  2. Go to the /cart page
  3. Manually enter a very large number into the quantity stepper input text field
  4. Remove focus from the quantity stepper input text field
  5. See that an error toast appears with a sensible error message

Screenshots / Screen Captures (if appropriate)

Screen Shot 2020-02-26 at 12 02 50 PM

Screen Shot 2020-02-26 at 12 02 55 PM

Checklist

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

Notes / Risks

The error message comes straight from the GraphQL backend. "Qty" isn't a great thing to show an end user, but we don't want to be in the business of massaging these error strings.

@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Feb 26, 2020

Messages
📖

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

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

Associated JIRA tickets: PWA-377.

Generated by 🚫 dangerJS against be29c6e

@supernova-at supernova-at added the version: Patch This changeset includes backwards compatible bug fixes. label Feb 26, 2020
sirugh
sirugh previously approved these changes Feb 27, 2020
Copy link
Contributor

@sirugh sirugh left a comment

Choose a reason for hiding this comment

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

I approve!

@dpatil-magento dpatil-magento merged commit e9489f0 into develop Mar 3, 2020
@dpatil-magento dpatil-magento deleted the supernova/377_quantity branch March 3, 2020 03:38
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
pkg:peregrine pkg:venia-ui version: Patch This changeset includes backwards compatible bug fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants