This commit is contained in:
2018-11-30 18:40:32 +00:00
parent 6b35039827
commit c886fa8815
2 changed files with 5 additions and 2 deletions

View File

@@ -39,8 +39,7 @@ NOTE: determined it would be too much trouble for too little gain to validate th
LIST FILTERING TODO
- DONE test for fetching widget filter options (localized, so have two users test each for expected response)
Add test for excercising all of DataFilterController route including rights to non personal alternative owner etc
- Add test for excercising all of DataFilterController route including rights to non personal alternative owner etc
Add test for correctly validated Widget datafilter when saved or updated via datafiltercontroller (sanity check of the filter settings and options IFilterableObject implemented)
Add test for providing saved filter id to widgetlist and recieving correct filtered / paged / sorted results (test all those)

View File

@@ -270,6 +270,10 @@ namespace AyaNova.Biz
var fld = filterItem["fld"].Value<string>();
if (string.IsNullOrWhiteSpace(fld))
AddError(ValidationErrorType.RequiredPropertyEmpty, "Filter", $"Filter array item {i}, \"fld\" property is empty and required");
//NOTE: have decided not to validate the field names are actually valid as that would involve a lot of fuckery that would probably be unproductive at this point
//as this datafilter normally would come straight from our client software that recieves its' list of fields directly from the object anyway
//maybe in future it will be more of an issue when it comes to modifications to objects or fields dropped but those errors should be caught by integration tests anyway
//and the rest are just outside users
}
if (filterItem["op"] == null)