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

[PE-D][Tester B] Failed add command still adds transaction on invalid category input #119

Closed
nus-se-script opened this issue Apr 6, 2024 · 0 comments · Fixed by #131
Closed
Assignees
Milestone

Comments

@nus-se-script
Copy link

Failed add command still adds transaction on invalid category input

  • After a specific invalid input, subsequent valid inputs will still keep outputting the same null error message
  • High severity since it is really easy for a user to accidentally enter a wrong category and corrupt their entire balance, humans are prone to errors.

Steps to reproduce

In screenshot: An earlier step shows a valid add command usage and the balance as

 Your updated account balance is $160000.0
  • Enter an invalid category input: 10
  • When asked for a valid number within the range [1 to 9], enter 0
  • Command will exit with null error:
    •   An error occurred with the message: null
        Please check your command Syntax.
         If you need assistance use `help` command to know further about each command syntax.
      
    • Null error message has an additional space before If you need assistance
    • Command has exited and now accepts other commands
  • Entering a subsequent valid command will print the updated account balance

In screenshot: A subsequent valid add command add /a/6474 /t/Income /n/March Salary /$/10000 /d/01-03-2024 /c/9 shows the balance as

    Your updated account balance is $180000.0

Expected

Command works as intended with no errors. add only updates the balance on valid and successful add command usage. In the case of the screenshot, the updated account balance
should display as:

    Your updated account balance is $170000.0

Since only 1 instance of adding $10,000 should have succeeded with the prior first one before failing as an error.

Actual

add updates the balance on invalid and unsuccessful add command usage, resulting in erroneous updated account balance From the previous balance at $160,000 and running

  1. The failed command to add $10,000 that printed an error
  2. The correct command to add $10,000
    Resulting in a updated balance of $180,000 instead of $170,000 from the original $160,000

Screenshots

image.png


Labels: severity.High type.FunctionalityBug
original: L5-Z/ped#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants