Block Group Test Cases
| Sr No. | Case Description | Data | Expected Output | 
|---|---|---|---|
| 1 | No items | items = '' | Message will display 'No data to display!' | 
| 2 | Bad items | items = { block:{ id: 1, label: 'Poor' },..} | Message will display 'No data to display!' | 
| items = [{ label: 'Poor' },..] | Block 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 blocks = length of items array. On click it gives the selected item object. | 
| 4 | Wrong inputId | inputId = { label: 'poor' } | It should be int or string as per options.propId type, block selected item should not be select | 
| 5 | Good inputId | inputId = 3 | As per id, block will set selected item | 
| 6 | No elementClass | !elementClass or elementClass = '' | Default css will apply on block. | 
| 7 | Css property without !important | .cst-class{ margin-right : 10px } | Default margin will apply | 
| 8 | Css property with !important | .cst-class{ margin-right : 10px !important; } | margin-right = 10px | 
| 9 | If items object's property is not id and options.propId is not there | !options.propId or options.propId = '' | Block will display but click functionality will not work | 
| 10 | If items object's property is not id and options.propId is key value which is consider as id | items = [{ key:1, value:'poor' }] options.propId = 'key' | It will work properly | 
| 11 | 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 | 
| 12 | 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 | 
| 13 | disabled | disabled = true | Click functionality will not work | 
| 16 | Screen size | Large | depends on direction which we give | 
| Small | If screen size is <= 480 px, direction will be top to bottom |