This commit is contained in:
@@ -26,7 +26,7 @@ namespace raven_integration
|
||||
D.usertype = 1;
|
||||
D.notes = "This record will match in notes: The quick brown and simple fox jumped over the six lazy dogs!";
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchWidgetInNotesId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace raven_integration
|
||||
D.usertype = 1;
|
||||
D.notes = "This Widget matches in name";
|
||||
|
||||
a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchWidgetInNameId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace raven_integration
|
||||
D.usertype = 1;
|
||||
D.notes = "This Widget should not be returned in the search as it only contains a single keyword in the name not both";
|
||||
|
||||
a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchNothingWidgetId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace raven_integration
|
||||
D.notes = "This record will match in notes: The quick brown and hapless goose";
|
||||
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchWidgetInNotesId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -224,7 +224,7 @@ namespace raven_integration
|
||||
D.usertype = 1;
|
||||
D.notes = "This record will match in notes: react to the goose";
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchWidgetInNotesId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -290,7 +290,7 @@ namespace raven_integration
|
||||
D.usertype = 1;
|
||||
D.notes = "This record will match in notes: broadcasting to the goose";
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchWidgetInNotesId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -378,7 +378,7 @@ namespace raven_integration
|
||||
D.notes = "This record will match in notes and tag: elementary my dear aardvark";
|
||||
D.tags = TagsArray;
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchWidgetInNotesId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -395,7 +395,7 @@ namespace raven_integration
|
||||
D.notes = "This record will match in tag but no search phrase";
|
||||
D.tags = TagsArray;
|
||||
|
||||
a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long NoPhraseMatchWidgetInTagId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -539,7 +539,7 @@ namespace raven_integration
|
||||
D.usertype = 1;
|
||||
D.notes = "Test for serial number search";
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchWidgetInSerialId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
var MatchWidgetSerial = a.ObjectResponse["data"]["serial"].Value<uint>();
|
||||
@@ -619,7 +619,7 @@ Likely fix is to force order to most recent or simply to delete after test so th
|
||||
D.usertype = 1;
|
||||
D.notes = "This record will match in custom field";
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), D.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long MatchingWidgetId = a.ObjectResponse["data"]["id"].Value<long>();
|
||||
|
||||
@@ -650,7 +650,7 @@ Likely fix is to force order to most recent or simply to delete after test so th
|
||||
|
||||
//Now delete the newly created one so the list doesn't build up and prevent this test from working in big runs...
|
||||
//DELETE
|
||||
ApiResponse DELETETestResponse = await Util.DeleteAsync("Widget/" + MatchingWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||
ApiResponse DELETETestResponse = await Util.DeleteAsync("widget/" + MatchingWidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||
Util.ValidateHTTPStatusCode(DELETETestResponse, 204);
|
||||
|
||||
|
||||
@@ -673,7 +673,7 @@ Likely fix is to force order to most recent or simply to delete after test so th
|
||||
d.usertype = 1;
|
||||
d.notes = $"This record will match in notes: {TEST_SEARCH_PHRASE} there";
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Widget", await Util.GetTokenAsync("manager", "l3tm3in"), d.ToString());
|
||||
ApiResponse a = await Util.PostAsync("widget", await Util.GetTokenAsync("manager", "l3tm3in"), d.ToString());
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
long WidgetId = (long)a.ObjectResponse["data"]["id"];
|
||||
|
||||
@@ -688,7 +688,7 @@ Likely fix is to force order to most recent or simply to delete after test so th
|
||||
((JArray)a.ObjectResponse["data"]["searchResults"]).Count.Should().Be(1);
|
||||
|
||||
//Now delete the widget and re-run the search
|
||||
a = await Util.DeleteAsync("Widget/" + WidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||
a = await Util.DeleteAsync("widget/" + WidgetId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
|
||||
a = await Util.PostAsync("search", await Util.GetTokenAsync("manager", "l3tm3in"), SearchParameters.ToString());
|
||||
|
||||
Reference in New Issue
Block a user