Test Cases for Date field or Calendar
Hello friends! in this post, we will see some positive and negative test scenarios for the date field or Calendar widget.
Positive Test Cases for DateField
- 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 previous and next month’s calendar by choosing the left and right icon 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 DateField
- 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.