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

Comprehensive tests for `ManagedNumberField` #639

Open
knod opened this issue Jul 9, 2018 · 4 comments
Labels
Projects

Comments

@knod
Copy link
Collaborator

@knod knod commented Jul 9, 2018

This is what I've got so far for <ManagedNumberField> desired behavior.

Valid number: A positive decimal or whole number, 0, or a blank field.
Permitted invalid input: Numbers with multiple decimal points.

  • User clicks on field with '0' in it:
    • Field goes blank, ready for input
  • User clicks on field with valid number in it:
    • Nothing changes
  • User types a valid number in the field:
    • Typing shows up as entered
  • User types a valid number in the field and then leaves the field:
    • Valid value is shown as decimal value
    • (Valid value is stored permanently)
  • User types an INVALID number in the field:
    • Typing shows up as entered
    • Field gives 'invalid value' feedback (turns red)
  • User types in an INVALID number and then leaves the field
    • The last valid field value previously entered is shown (last valid value typed, or last valid value left there?)
    • (Invalid value is discarded)
  • User types 0 in a field:
    • Typing shows up as entered
  • User deletes all items in the field
    • Input does not turn red
  • User deletes all numbers in the field then leaves the field
    • Field shows '0'
    • (0 is stored permanently as the value)

Which of these are done already?

@knod knod added the testing label Jul 9, 2018
@knod knod added this to To do in 2:4 Testing via automation Jul 9, 2018
@snyderc

This comment has been minimized.

Copy link
Collaborator

@snyderc snyderc commented Jul 11, 2018

Of what's currently here, the dev branch currently contains this functionality, except for:

User types an INVALID number in the field
User types in an INVALID number and then leaves the field

For the above two -- per the most recent PRs, when the user attempts to enter an invalid value (e.g. a negative sign or a letter), the last field value previously entered does not change. The negative sign/letter does not get put into the input at all.

I'll work on making sure there are complete tests for these behaviors.

@snyderc snyderc self-assigned this Jul 11, 2018
@knod

This comment has been minimized.

Copy link
Collaborator Author

@knod knod commented Jul 11, 2018

@snyderc : Thanks! Also, if you have a sec, if you could put check marks in the ones that are already done, it would show it in the issue list view so others can quickly know where it's at.

@snyderc

This comment has been minimized.

Copy link
Collaborator

@snyderc snyderc commented Jul 11, 2018

Do you want me to use the checkboxes for when the tests are completed, or just when the code exhibits these behaviors? I will assume the first one.

@knod

This comment has been minimized.

Copy link
Collaborator Author

@knod knod commented Jul 11, 2018

Yeah, @snyderc, the first one - check them off when the tests for that behavior have been completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
2:4 Testing
  
To do
2 participants
You can’t perform that action at this time.