Dropdown Test Cases
Sr No. | Case Description | Data | Expected Output |
---|---|---|---|
1 | No items | items = '' | Message will display 'No data to display!' |
2 | Bad items | items = { dropdown:{ id: 1, label: 'Poor' },..} | Message will display 'No data to display!' |
items = [{ label: 'Poor' },..] | dropdown will display but click functionality will not work without id. If label is there, label will display. | ||
3 | Good items | items = [{ id: 1, label: 'Poor' },..] | Number of dropdown options = items length. |
4 | Wrong inputId | inputId = { label: 'poor' } | It should be int or string as per options.propId type, dropdown selected item should not be select |
5 | Good inputId | inputId = 3 | As per id, dropdown will set selected item |
6 | Css property without !important | .cst-dropdown-element-override{ margin-right : 10px } | Default margin will apply |
7 | Css property with !important | .cst-dropdown-element-override{ margin-right : 10px !important; } | margin-right = 10px |
8 | If items object's property is not label and options.propLabel is not there | !options.propLabel or options.propLabel = '' | Label will not display, Id will display |
9 | If items object's property is not label and options.propLabel is key value which is consider as label | items = [{ key:1, value:'poor' }] options.propLabel = 'value' | Label will display |
10 | extDisabled | extDisabled = true | Dropdown will disabled |
11 | Screen size | Large | It will take parent container height and width with min-height: 35px and min-width:150px |
Small | It will take parent container height and width with min-height: 35px and min-width:150px |