Hello friends! In this post, we will see some positive and negative test cases for the date field or Calendar widget. Please be informed that these are test scenarios and not test cases. Since the focus here is to understand the different functionalities to be tested instead of actual test cases, so, we have added test scenarios here for faster readability.
Positive Test Cases for Date Field
- Verify that on clicking the date field, a calendar widget should open.
- Verify that the default width of the calendar should be displayed as per the specification.
- Verify that the calendar widget’s dimensions should be responsive as per the device and screen size.
- Verify that the user can select a date in the calendar and after selecting the date the same gets displayed in the date field.
- Verify that by default the current month’s calendar should be displayed.
- Verify that the user can move to the previous and next month’s calendars by choosing the left and right icons over the calendar.
- Verify that the user can check the calendar of a particular month of any year.
- Verify that the user can enter a date manually on the date following the date format.
- Verify the date format supported by the calendar e.g. – dd/mm/yy, mm/dd/yy, etc.
- Verify that the user can also edit a date that is already set in the calendar.
- Verify that values other than numerics should not be allowed in the date field (apart from the characters used in the date format like ‘/’ or ‘-‘.
- Verify that invalid dates are not allowed in the date field (like date value exceeding 31, month value exceeding 12, etc).
- Verify the oldest possible date that can be set on the calendar.
- Verify the last possible date that can be set on the calendar.
Negative Test Cases for Date Field
- Verify the state of the calendar widget on entering special characters, either the special characters should not be allowed and in the case allowed, they should get discarded while setting a date.
- Verify the state of the calendar widget on entering foreign language characters on the editable date field.
- Check the UI of the calendar widget on extremely small and extremely large screen sizes.