JunCheng98 / pe

0 stars 0 forks source link

Tab function gives different error messages #1

Open JunCheng98 opened 3 years ago

JunCheng98 commented 3 years ago

When typing in 'tab -1' or 'tab 0', the error message is:

Invalid command format! tab: Switches to the specified tab by index. Parameters: INDEX (must be a positive integer between 1 to 4 inclusive)

But when 'tab 5' is typed:

The specified tab does not exist.

The above message is shown. Maybe standardise the error messages?

nus-se-bot commented 3 years ago

Team's Response

This behaviour is replicated in AB3, as shown below:

Screenshot 2020-11-15 at 1.49.09 AM.png

The root cause is the way AB3 parses commands that include INDEX as a parameter.

Hence, we will be rejecting it as per the following conversation:

image.png

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Not too sure what the developers' response meant. My idea was that 'tab 5' should have showed the same error message as 'tab 0' and 'tab -1' which shows the following:

Invalid command format! tab: Switches to the specified tab by index. Parameters: INDEX (must be a positive integer between 1 to 4 inclusive)

The last line of the error, which clearly indicates that the integer should be positive and between 1 to 4, enforces my idea that 'tab 5' should have the error message above, instead of showing:

The specified tab does not exist.

Having different error messages for the same type of error (i.e. invalid index number) could throw off users since the resulting behaviour differs from normal expectations.