This commit is contained in:
@@ -93,16 +93,28 @@ namespace raven_integration
|
||||
d.listKey = "nonexistant";
|
||||
|
||||
//"[{fld:"name",op:"!=",value:"Notequaltothis"},{fld:"tags",op:"Eq",value:"[23,456,54]"}]
|
||||
dynamic dfilter = new JArray();
|
||||
dynamic df = new JObject();
|
||||
df.fld = "name";
|
||||
df.op = "%-";
|
||||
df.value = "Generic";//lots of seed widgets start with Generic
|
||||
dfilter.Add(df);
|
||||
// dynamic dfilter = new JArray();
|
||||
// dynamic df = new JObject();
|
||||
// df.fld = "name";
|
||||
// df.op = "%-";
|
||||
// df.value = "Generic";//lots of seed widgets start with Generic
|
||||
// dfilter.Add(df);
|
||||
|
||||
d.filter = dfilter.ToString();//it expects it to be a json string, not actual json
|
||||
// d.filter = dfilter.ToString();//it expects it to be a json string, not actual json
|
||||
|
||||
ApiResponse a = await Util.PostAsync("DataListView", await Util.GetTokenAsync("BizAdminFull"), d.ToString());
|
||||
// ApiResponse a = await Util.PostAsync("DataListView", await Util.GetTokenAsync("BizAdminFull"), d.ToString());
|
||||
|
||||
dynamic dListView = new JArray();
|
||||
// dynamic df = new JObject();
|
||||
// df.fld = "widgetname";
|
||||
// df.op = "%-";
|
||||
// df.value = "Generic";//lots of seed widgets start with Generic
|
||||
// dListView.Add(df);
|
||||
// d.filter = dListView.ToString();//it expects it to be a json string, not actual json
|
||||
dListView.Add(Util.BuildSimpleFilterDataListViewColumn("widgetname", Util.OpStartsWith, "Generic"));
|
||||
d.listView=dListView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
ApiResponse a = await Util.PostAsync("DataListView", await Util.GetTokenAsync("BizAdminFull"), d.ToString(Newtonsoft.Json.Formatting.None));
|
||||
Util.ValidateErrorCodeResponse(a, 2200, 400);
|
||||
Util.ShouldContainValidationError(a, "ListKey", "2203");
|
||||
|
||||
@@ -123,18 +135,29 @@ namespace raven_integration
|
||||
d.listKey="TestWidgetDataList";
|
||||
|
||||
//"[{fld:"name",op:"!=",value:"Notequaltothis"},{fld:"tags",op:"Eq",value:"[23,456,54]"}]
|
||||
dynamic dfilter = new JArray();
|
||||
dynamic df = new JObject();
|
||||
df.fld = "doesntexist";
|
||||
df.op = "%-";
|
||||
df.value = "Generic";//lots of seed widgets start with Generic
|
||||
dfilter.Add(df);
|
||||
// dynamic dfilter = new JArray();
|
||||
// dynamic df = new JObject();
|
||||
// df.fld = "doesntexist";
|
||||
// df.op = "%-";
|
||||
// df.value = "Generic";//lots of seed widgets start with Generic
|
||||
// dfilter.Add(df);
|
||||
|
||||
d.filter = dfilter.ToString();//it expects it to be a json string, not actual json
|
||||
// d.filter = dfilter.ToString();//it expects it to be a json string, not actual json
|
||||
|
||||
ApiResponse a = await Util.PostAsync("DataListView", await Util.GetTokenAsync("BizAdminFull"), d.ToString());
|
||||
// ApiResponse a = await Util.PostAsync("DataListView", await Util.GetTokenAsync("BizAdminFull"), d.ToString());
|
||||
dynamic dListView = new JArray();
|
||||
// dynamic df = new JObject();
|
||||
// df.fld = "widgetname";
|
||||
// df.op = "%-";
|
||||
// df.value = "Generic";//lots of seed widgets start with Generic
|
||||
// dListView.Add(df);
|
||||
// d.filter = dListView.ToString();//it expects it to be a json string, not actual json
|
||||
dListView.Add(Util.BuildSimpleFilterDataListViewColumn("doesntexist", Util.OpStartsWith, "Generic"));
|
||||
d.listView=dListView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
|
||||
ApiResponse a = await Util.PostAsync("DataListView", await Util.GetTokenAsync("BizAdminFull"), d.ToString(Newtonsoft.Json.Formatting.None));
|
||||
Util.ValidateErrorCodeResponse(a, 2200, 400);
|
||||
Util.ShouldContainValidationError(a, "Filter", "2203");
|
||||
Util.ShouldContainValidationError(a, "ListView", "2203");
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user