tanlk99 / pe

0 stars 0 forks source link

Entering a large quantity at checkout displays strange value #4

Open tanlk99 opened 4 years ago

tanlk99 commented 4 years ago

When I enter a large amount at checkout, treasurerPro tells me that the change is infinity. I think it would be better to reject unrealistic amounts when checking out transactions.

To replicate: Enter a sufficiently large checkout amount when checking out.

image.png

nus-pe-bot commented 4 years ago

Team's Response

Thank you for your effort.

First of all, I believe you must have inputted an enormous amount into the input to get that output. I would like to clarify that I designed this feature imitating a real-life scenario. Let's say if you are buying a $3 item at a store and you only have 5 $1000 notes with you. Would you pay 4 $1000 notes to the cashier or would you pay a $1000 note? Clearly, anyone will pay only one $1000 note to the cashier. Similarly, if this app is used in real-life, who would pay the customer an amount that is more than 200 digits long?

Furthermore, it is also clearly stated in the user guide that the maximum amount of all the total prices in the cart would never exceed $999999.99 as the system will not allow it. So, the customers would never be in a situation where they have to pay an amount that is more than 200 digits long.

Screenshot 2019-11-16 at 9.55.38 PM.png

Hence, this is not a bug. It is designed to be used in a real-life where the users (cashier) and customers are rational beings and they would not pay an amount that is of hundreds of digits larger than the actual amount.

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Based on my understanding, the issue was rejected as said payment can "never" happen. However, based on the strict limitations imposed on all other input values, I would assume that if your application does not reject large amounts of payment, it should be able to handle them properly. While this is certainly a rare instance, note that under the module page, this is exactly what a low severity issue is.

Also, at no point in the response was the intended behavior mentioned. Was it intended to display infinity (despite it being clearly wrong), display the correct value somehow, or reject the input with an error message? This was not made clear. Instead, the response took to mansplaining the mechanics of actual realistic payment, as if I did not understand that payment usually takes place in reasonable amounts. I feel like the developer response was overly defensive and meant more to preserve marks than to give a genuine reason behind the rejection.