US1: Body Mass Index - Klushechka/HealthyShape GitHub Wiki

US1: Body Mass Index

1. User Story

As a User

I would like the application to calculate my Body Mass Index according to my data, including Weight and Height (which I’ll enter into the fields) and to give me a resume according to the calculated BMI and the gender, which I’ll select (Man or Woman).

So that I could understand if my weight is normal for my height or I am underweighted/overweighted.

2. Acceptance Criteria

Verify that there are 2 text fields on the first screen:

  • Weight (value from 0.0 to 650.0, with separate which depends on current local settings).
  • Height (value from 0 to 300 without any separators).
  1. Verify that under the text fields there is segmented control with 2 values:
  • Man
  • Woman

Default value is Man.

  1. Verify that there is Calculate button under the text fields and segmented control.
  2. Verify that tapping the Calculate button opens a second screen with healthy numbers about shape:
  • info about BMI

Formula for BMI: BMI = height (weight * weight)

  • resume which is different for same BMI depending on gender:

    It seems that your data is wrong. Please check the entered values." - (Man and Woman: 0..<1)

    You are dangerously underweighted - (Man: 1.0..<16.0, Woman: 1.0..<16.0)

    You are underweighted - (Man: 16..<18.5, Woman: 16..<18.0)

    You have a healthy weight - (Man: 18.5..<25.0, Woman: 18.0..<25.0)

    You are overweighted - (Man: 25.0..<30.0, Woman: 25.0..<30.0)

    You have an obese (Class I) - (Man: 30.0..<35.0, Woman: 30.0..<35.0)

    You have an obese (Class II) - (Man: 35.0..<40.0, Woman: 35.0..<40.0)

    You have a morbid obese (Class III) - (Man: more than 40.0, Woman: more than 40.0)

  1. Verify that there is Back button on the top left corner of the screen.
  2. Verify that tapping Back button leads to the previous screen with Heigh, Weight fields + segmented control and Calculate button, where All the data, which was set by my before, is still shown.
  3. Verify that numeric keyboard without text or special symbols is shown while focus is on the Height field.
  4. Verify that numeric keyboard with separator (, or . depending on local settings) is shown while focus is on the Weight field.
  5. Verify that it’s impossible to set/paste text, special symbols to Weight and Height text fields.
  6. Verify that alert with header "Need Info", text "Please enter both weight and height values.» and OK button is shown after pressing Calculate button if:
  • Weight field is empty
  • Height field is empty
  • both Weight and Height fields are empty
  • 0/0.0/0,0/,/. is set for Weight or Height