This commit is contained in:
@@ -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("Translation/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("Translation/TranslationKeyCoverage", await Util.GetTokenAsync("CustomerLimited"));
|
||||
a = await Util.GetAsync("translation/TranslationKeyCoverage", await Util.GetTokenAsync("CustomerLimited"));
|
||||
Util.ValidateDataReturnResponseOk(a);
|
||||
Util.ValidateHTTPStatusCode(a, 200);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace raven_integration
|
||||
public async void TranslationListWorks()
|
||||
{
|
||||
//Get all
|
||||
ApiResponse a = await Util.GetAsync("Translation/list", 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/list", 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 translations
|
||||
@@ -35,7 +35,7 @@ namespace raven_integration
|
||||
public async void GetFullTranslationWorks()
|
||||
{
|
||||
//Get all
|
||||
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
|
||||
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("Translation/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
|
||||
@@ -71,7 +71,7 @@ namespace raven_integration
|
||||
d.id = 1;
|
||||
d.name = Util.Uniquify("INTEGRATION-TEST-LOCALE");
|
||||
|
||||
ApiResponse a = await Util.PostAsync("Translation/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
|
||||
@@ -90,11 +90,11 @@ namespace raven_integration
|
||||
d2.id = NewId;
|
||||
d2.newText = Util.Uniquify("INTEGRATION-TEST-LOCALE NAME UPDATE");
|
||||
d2.concurrency = a.ObjectResponse["data"]["concurrency"].Value<uint>();
|
||||
ApiResponse PUTTestResponse = await Util.PutAsync("Translation/UpdateTranslationName", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
|
||||
ApiResponse PUTTestResponse = await Util.PutAsync("translation/UpdateTranslationName", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
|
||||
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
|
||||
|
||||
|
||||
ApiResponse checkPUTWorked = await Util.GetAsync("Translation/" + 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 concurrency = PUTTestResponse.ObjectResponse["data"]["concurrency"].Value<uint>();
|
||||
@@ -109,7 +109,7 @@ namespace raven_integration
|
||||
|
||||
string UpdatedTranslationKey = FirstTranslationKey["key"].Value<string>();
|
||||
|
||||
PUTTestResponse = await Util.PutAsync("Translation/UpdateTranslationItemDisplayText", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
|
||||
PUTTestResponse = await Util.PutAsync("translation/UpdateTranslationItemDisplayText", await Util.GetTokenAsync("BizAdminFull"), d2.ToString());
|
||||
Util.ValidateHTTPStatusCode(PUTTestResponse, 200);
|
||||
|
||||
//create user that is set to new translation so can use getSubset
|
||||
@@ -161,7 +161,7 @@ namespace raven_integration
|
||||
|
||||
d3 = JToken.FromObject(keys);
|
||||
|
||||
checkPUTWorked = await Util.PostAsync("Translation/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);
|
||||
@@ -174,7 +174,7 @@ namespace raven_integration
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
|
||||
//DELETE TEMP LOCALE
|
||||
a = await Util.DeleteAsync("Translation/" + NewId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
a = await Util.DeleteAsync("translation/" + NewId.ToString(), await Util.GetTokenAsync("BizAdminFull"));
|
||||
Util.ValidateHTTPStatusCode(a, 204);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user