From 622b49f017d9ef7ab535573483af9cc7ea7b7624 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Tue, 24 Feb 2026 10:30:04 -0800 Subject: [PATCH] 4648 --- PickList/PickListAllTests.cs | 58 +++--------------------------------- 1 file changed, 4 insertions(+), 54 deletions(-) diff --git a/PickList/PickListAllTests.cs b/PickList/PickListAllTests.cs index 606105e..b1bf4a9 100644 --- a/PickList/PickListAllTests.cs +++ b/PickList/PickListAllTests.cs @@ -67,45 +67,6 @@ namespace raven_integration templateArray.Count.Should().Be(3); templateArray[2]["fld"].Value().Should().Be("CustomerAccountNumber"); - - - // { - // "id": 0, - // "concurrency": 0, - // "name": "ATestCustomer", - // "active": true, - // "notes": null, - // "wiki": null, - // "customFields": "{}", - // "tags": [], - // "webAddress": null, - // "alertNotes": null, - // "billHeadOffice": false, - // "headOfficeId": null, - // "techNotes": null, - // "accountNumber": "AUniqueAccountNumber", - // "contractId": null, - // "contractExpires": null, - // "phone1": null, - // "phone2": null, - // "phone3": null, - // "phone4": null, - // "phone5": null, - // "emailAddress": null, - // "postAddress": null, - // "postCity": null, - // "postRegion": null, - // "postCountry": null, - // "postCode": null, - // "address": null, - // "city": null, - // "region": null, - // "country": null, - // "addressPostal": null, - // "latitude": null, - // "longitude": null - // } - //CONFIRM THE CUSTOM PICKLIST TEMPLATE WORKS PROPERLY //MAKE THE TEST Customer //make a unique string for this iteration of this test only @@ -114,22 +75,13 @@ namespace raven_integration d.name = Util.Uniquify("CustomerPickListTemplatesOps") + UniquePhrase; d.active = true; d.accountNumber = UniquePhrase; - // d.login = Util.Uniquify("LOGIN"); - // d.password = Util.Uniquify("PASSWORD"); - // d.roles = 0;//norole - - // d.userType = 3;//non scheduleable - // //Required by form custom rules - // d.notes = "notes"; - //d.customFields = Util.UserRequiredCustomFieldsJsonString(); a = await Util.PostAsync("Customer", await Util.GetTokenAsync("superuser", "l3tm3in"), d.ToString()); Util.ValidateDataReturnResponseOk(a); long ExpectedObjectId = a.ObjectResponse["data"]["id"].Value(); - //GET PICKLIST FOR unique phrase query sb only employee number due to custom template - a = await Util.PostAsync("pick-list/list", await Util.GetTokenAsync("BizAdmin"),$"{{\"ayaType\":8,\"query\":\"{UniquePhrase}\"}}"); + a = await Util.PostAsync("pick-list/list", await Util.GetTokenAsync("BizAdmin"), $"{{\"ayaType\":8,\"query\":\"{UniquePhrase}\"}}"); Util.ValidateDataReturnResponseOk(a); var pickList = ((JArray)a.ObjectResponse["data"]); pickList.Count.Should().Be(1); @@ -139,7 +91,6 @@ namespace raven_integration a = await Util.DeleteAsync("User/" + ExpectedObjectId.ToString(), await Util.GetTokenAsync("superuser", "l3tm3in")); Util.ValidateHTTPStatusCode(a, 204); - // RESET TEMPLATE TO DEFAULT //Note deleting causes server to replace with default a = await Util.DeleteAsync($"pick-list/template/{AY_OBJECT_TYPE_CUSTOMER}/", await Util.GetTokenAsync("BizAdmin")); @@ -208,7 +159,6 @@ namespace raven_integration Util.ValidateErrorCodeResponse(a, 2200, 400); Util.ShouldContainValidationError(a, "Template", "2201"); - //MALFORMED TEMPLATE JSON ERROR d = new JObject(); d.Id = AY_OBJECT_TYPE_CUSTOMER; @@ -234,10 +184,10 @@ namespace raven_integration //RETRIEVE ApiResponse a = await Util.GetAsync("pick-list/template/list", await Util.GetTokenAsync("BizAdmin")); Util.ValidateDataReturnResponseOk(a); - //assert contains at least two records (as we only have two at time of writing this test) + //assert contains at least 16 records at time of writing this test var templateList = ((JArray)a.ObjectResponse["data"]); - templateList.Count.Should().BeGreaterThan(1); - templateList[0]["id"].Value().Should().Be(2);//first one should be a user + templateList.Count.Should().BeGreaterThan(16); + templateList[0]["id"].Value().Should().Be(10);//first one should be a contract }