From 021b91c3a5abf89286ee02ad65ff856bed722ffe Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 5 Dec 2018 22:56:45 +0000 Subject: [PATCH] --- devdocs/todo.txt | 2 +- test/raven-integration/Widget/WidgetCrud.cs | 29 +++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/devdocs/todo.txt b/devdocs/todo.txt index 5754ffa9..1cad786a 100644 --- a/devdocs/todo.txt +++ b/devdocs/todo.txt @@ -8,7 +8,7 @@ Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOiIxNTQyNjY5Njc3IiwiZXhwIjoi filter to SQL / Widget list filtered with tests - see core-list-graph-datatable-filtering-paging.txt doc SON OF TAGS - - How to set GIN index? is it automatic? Do I need to specify it? + //done - How to set GIN index? is it automatic? Do I need to specify it? - Test setting a widget tag collection to see it works with ef core - Seed widget with predictable tags (Maybe colour names "red", "green", "blue" etc) - Update tag count / cloud maybe if that's a feature? Or fuck it it can be added any time diff --git a/test/raven-integration/Widget/WidgetCrud.cs b/test/raven-integration/Widget/WidgetCrud.cs index 6855c4b9..c6c56d7b 100644 --- a/test/raven-integration/Widget/WidgetCrud.cs +++ b/test/raven-integration/Widget/WidgetCrud.cs @@ -32,6 +32,35 @@ namespace raven_integration w1.roles = 0; w1.notes = "The quick brown fox jumped over the six lazy dogs!"; + //Tags test + dynamic dTagsArray = new JArray(); + + //name starts with filter to constrict to widgets that this test block created only + // dynamic DataFilterNameStart = new JObject(); + // DataFilterNameStart.fld = "name"; + // DataFilterNameStart.op = OpStartsWith; + // DataFilterNameStart.value = WidgetNameStart; + // dTagsArray.Add(DataFilterNameStart); + + // //## INCLUSIVE FILTER + // dynamic FilterItem = new JObject(); + // FilterItem.fld = "startdate"; + // FilterItem.op = OpEquality; + // FilterItem.value = FilterToken; + //dTagsArray.Add(FilterItem); + dTagsArray.Add("red"); + dTagsArray.Add("orange"); + dTagsArray.Add("yellow"); + dTagsArray.Add("green"); + dTagsArray.Add("blue"); + dTagsArray.Add("indigo"); + dTagsArray.Add("violet"); + + w1.tags = dTagsArray;//.ToString();//it expects it to be a json string, not actual json + // + + + ApiResponse r1 = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), w1.ToString()); Util.ValidateDataReturnResponseOk(r1); long w1Id = r1.ObjectResponse["data"]["id"].Value();