This commit is contained in:
2020-03-18 19:09:53 +00:00
parent c7fba41692
commit a915d224d1
4 changed files with 18 additions and 18 deletions

View File

@@ -45,7 +45,7 @@ namespace raven_integration
var BuildMode = a.ObjectResponse["data"]["buildMode"].Value<string>();
if (BuildMode == "DEBUG")
{
a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "EXPIRED"));//lowest level test user because there are no limits on this route except to be authenticated
a = await Util.GetAsync("Translation/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "EXPIRED"));//lowest level test user because there are no limits on this route except to be authenticated
Util.ValidateHTTPStatusCode(a, 401);
}
}
@@ -60,7 +60,7 @@ namespace raven_integration
var BuildMode = a.ObjectResponse["data"]["buildMode"].Value<string>();
if (BuildMode == "DEBUG")
{
a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "WRONG_ISSUER"));//lowest level test user because there are no limits on this route except to be authenticated
a = await Util.GetAsync("Translation/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "WRONG_ISSUER"));//lowest level test user because there are no limits on this route except to be authenticated
Util.ValidateHTTPStatusCode(a, 401);
}
}
@@ -75,7 +75,7 @@ namespace raven_integration
var BuildMode = a.ObjectResponse["data"]["buildMode"].Value<string>();
if (BuildMode == "DEBUG")
{
a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "NO_ALGORITHM"));
a = await Util.GetAsync("Translation/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "NO_ALGORITHM"));
Util.ValidateHTTPStatusCode(a, 401);
}
}
@@ -90,7 +90,7 @@ namespace raven_integration
var BuildMode = a.ObjectResponse["data"]["buildMode"].Value<string>();
if (BuildMode == "DEBUG")
{
a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "WRONG_SECRET"));
a = await Util.GetAsync("Translation/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "WRONG_SECRET"));
Util.ValidateHTTPStatusCode(a, 401);
}
}
@@ -106,7 +106,7 @@ namespace raven_integration
var BuildMode = a.ObjectResponse["data"]["buildMode"].Value<string>();
if (BuildMode == "DEBUG")
{
a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "TRUNCATED_SIGNATURE"));
a = await Util.GetAsync("Translation/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "TRUNCATED_SIGNATURE"));
Util.ValidateHTTPStatusCode(a, 401);
}
}
@@ -122,7 +122,7 @@ namespace raven_integration
var BuildMode = a.ObjectResponse["data"]["buildMode"].Value<string>();
if (BuildMode == "DEBUG")
{
a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "TRANSPOSE_SIGNATURE"));
a = await Util.GetAsync("Translation/picklist", await Util.GetTokenAsync("INTEGRATION_TEST", "TRANSPOSE_SIGNATURE"));
Util.ValidateHTTPStatusCode(a, 401);
}
}

View File

@@ -23,7 +23,7 @@ namespace raven_integration
public async void LocalePickListWorks()
{
//Get all
ApiResponse a = await Util.GetAsync("Locale/picklist", await Util.GetTokenAsync("CustomerLimited"));//lowest level test user because there are no limits on this route except to be authenticated
ApiResponse a = await Util.GetAsync("Translation/picklist", await Util.GetTokenAsync("CustomerLimited"));//lowest level test user because there are no limits on this route except to be authenticated
Util.ValidateDataReturnResponseOk(a);
Util.ValidateHTTPStatusCode(a, 200);
//there should be at least 4 of them as there are 4 stock locales
@@ -35,7 +35,7 @@ namespace raven_integration
public async void GetFullLocaleWorks()
{
//Get all
ApiResponse a = await Util.GetAsync("Locale/1", await Util.GetTokenAsync("CustomerLimited"));//lowest level test user because there are no limits on this route except to be authenticated
ApiResponse a = await Util.GetAsync("Translation/1", await Util.GetTokenAsync("CustomerLimited"));//lowest level test user because there are no limits on this route except to be authenticated
Util.ValidateDataReturnResponseOk(a);
Util.ValidateHTTPStatusCode(a, 200);
//there should be dozens of keys but at times there might only be a few during development so at least verify there is more than one
@@ -54,7 +54,7 @@ namespace raven_integration
d = JToken.FromObject(keys);
ApiResponse a = await Util.PostAsync("Locale/subset", await Util.GetTokenAsync("CustomerLimited"), d.ToString());
ApiResponse a = await Util.PostAsync("Translation/subset", await Util.GetTokenAsync("CustomerLimited"), d.ToString());
Util.ValidateDataReturnResponseOk(a);
Util.ValidateHTTPStatusCode(a, 200);
//there should be dozens of keys but at times there might only be a few during development so at least verify there is more than one
@@ -77,7 +77,7 @@ namespace raven_integration
d.id = 1;
d.name = Util.Uniquify("INTEGRATION-TEST-LOCALE");
ApiResponse a = await Util.PostAsync("Locale/Duplicate", await Util.GetTokenAsync("BizAdminFull"), d.ToString());
ApiResponse a = await Util.PostAsync("Translation/Duplicate", await Util.GetTokenAsync("BizAdminFull"), d.ToString());
Util.ValidateDataReturnResponseOk(a);
Util.ValidateHTTPStatusCode(a, 201);
//verify the object returned is as expected
@@ -105,11 +105,11 @@ namespace raven_integration
d2.id = NewId;
d2.newText = Util.Uniquify("INTEGRATION-TEST-LOCALE NAME UPDATE");
d2.concurrencyToken = a.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
ApiResponse PUTTestResponse = await Util.PutAsync("Locale/UpdateLocaleName", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
ApiResponse PUTTestResponse = await Util.PutAsync("Translation/UpdateLocaleName", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
ApiResponse checkPUTWorked = await Util.GetAsync("Locale/" + NewId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
ApiResponse checkPUTWorked = await Util.GetAsync("Translation/" + NewId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
Util.ValidateNoErrorInResponse(checkPUTWorked);
checkPUTWorked.ObjectResponse["data"]["name"].Value<string>().Should().Be(d2.newText.ToString());
//uint concurrencyToken = PUTTestResponse.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
@@ -124,7 +124,7 @@ namespace raven_integration
string UpdatedLocaleKey = FirstLocaleKey["key"].Value<string>();
PUTTestResponse = await Util.PutAsync("Locale/UpdateLocaleItemDisplayText", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
PUTTestResponse = await Util.PutAsync("Translation/UpdateLocaleItemDisplayText", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
//create user that is set to new locale so can use getSubset
@@ -154,7 +154,7 @@ namespace raven_integration
d3 = JToken.FromObject(keys);
checkPUTWorked = await Util.PostAsync("Locale/subset", await Util.GetTokenAsync(Login, Password), d3.ToString());
checkPUTWorked = await Util.PostAsync("Translation/subset", await Util.GetTokenAsync(Login, Password), d3.ToString());
Util.ValidateDataReturnResponseOk(checkPUTWorked);
Util.ValidateHTTPStatusCode(checkPUTWorked, 200);
((JArray)checkPUTWorked.ObjectResponse["data"]).Count.Should().Be(1);
@@ -167,7 +167,7 @@ namespace raven_integration
Util.ValidateHTTPStatusCode(a, 204);
//DELETE TEMP LOCALE
a = await Util.DeleteAsync("Locale/" + NewId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
a = await Util.DeleteAsync("Translation/" + NewId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
Util.ValidateHTTPStatusCode(a, 204);

View File

@@ -34,14 +34,14 @@ namespace raven_integration
d = JToken.FromObject(keys);
//Fetch the values to force RAVEN to track at least these two
a = await Util.PostAsync("Locale/subset", await Util.GetTokenAsync("CustomerLimited"), d.ToString());
a = await Util.PostAsync("Translation/subset", await Util.GetTokenAsync("CustomerLimited"), d.ToString());
Util.ValidateDataReturnResponseOk(a);
Util.ValidateHTTPStatusCode(a, 200);
//there should be dozens of keys but at times there might only be a few during development so at least verify there is more than one
((JArray)a.ObjectResponse["data"]).Count.Should().Be(2);
//Now ensure there are at least two keys in the fetched keys array
a = await Util.GetAsync("Locale/LocaleKeyCoverage", await Util.GetTokenAsync("CustomerLimited"));
a = await Util.GetAsync("Translation/LocaleKeyCoverage", await Util.GetTokenAsync("CustomerLimited"));
Util.ValidateDataReturnResponseOk(a);
Util.ValidateHTTPStatusCode(a, 200);

View File

@@ -40,7 +40,7 @@ namespace raven_integration
R = await Util.GetAsync("UserOptions/" + UserId.ToString(), await Util.GetTokenAsync("manager", "l3tm3in"));
Util.ValidateDataReturnResponseOk(R);
//ensure the default value is set
R.ObjectResponse["data"]["uiColor"].Value<int>().Should().Be(0);
R.ObjectResponse["data"]["uiColor"].Value<string>().Should().Be("#000000");
uint concurrencyToken = R.ObjectResponse["data"]["concurrencyToken"].Value<uint>();
//UPDATE