Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ public class ContentV3Scenario {
"testCreateResourceWithInvalidConceptId";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_ECML_BODY =
"testCreateResourceWithEcmlBody";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_TYPE =
"testCreateResourceWithInvalidLicenseType";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_FRAMEWORK_INVALID_SUBJECT =
"testCreateResourceWithValidFrameworkInvalidSubject";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_FRAMEWORK_INVALID_CATEGORY =
Expand All @@ -47,6 +45,17 @@ public class ContentV3Scenario {
"testCreateResourceWithInvalidFramework";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_RESOURCE_TYPE =
"testCreateResourceWithInvalidResourceType";

//Content with license
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_LICENSE =
"testCreateResourceWithValidLicense";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITHOUT_LICENSE =
"testCreateResourceWithoutLicense";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_VALUE =
"testCreateResourceWithInvalidLicenseValue";
public static final String TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_TYPE =
"testCreateResourceWithInvalidLicenseType";

//Plugin
public static final String TEST_CREATE_PLUGIN_CONTENT_WITH_VALID_REQUEST =
"testCreatePluginContentWithValidRequest";
Expand Down Expand Up @@ -283,6 +292,14 @@ public class ContentV3Scenario {
"testUpdateWithImageId";
//Get Content Should expect lastSubmittedOn if allowUpdate is true

//update content with license
public static final String TEST_UPDATE_CONTENT_WITH_VALID_LICENSE =
"testUpdateContentWithValidLicense";
public static final String TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_VALUE =
"testUpdateContentWithInvalidLicenseValue";
public static final String TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_TYPE =
"testUpdateContentWithInvalidLicenseType";

public static final String TEST_UPDATE_WITH_SYSTEM_PROPERTY =
"testUpdateContentWithSystemProperty";
public static final String TEST_UPDATE_WITH_INVALID_FORMAT_RESERVED_DIALCODES =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ public Object[][] createResourceContentWithValidRequest() {
},
new Object[]{
ContentV3Scenario.TEST_CREATE_RESOURCE_WITH_CONCEPTS
},
new Object[]{
ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_LICENSE
},
new Object[]{
ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITHOUT_LICENSE
}
};
}
Expand Down Expand Up @@ -210,6 +216,9 @@ public Object[][] createResourceContentWithInvalidRequest() {
},
new Object[]{
ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITH_VALID_FRAMEWORK_INVALID_CATEGORY
},
new Object[]{
ContentV3Scenario.TEST_CREATE_RESOURCE_CONTENT_WITH_INVALID_LICENSE_VALUE
}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ public Object[][] updateValidResourceContent() {
new Object[]{
ContentV3Scenario.TEST_UPDATE_WITH_VALID_ECML_BODY, "application/pdf", "contentInDraft"
},
new Object[]{
ContentV3Scenario.TEST_UPDATE_CONTENT_WITH_VALID_LICENSE, "application/pdf", "contentInDraft"
}
};
}

Expand Down Expand Up @@ -233,6 +236,12 @@ public Object[][] updateInvalidResourceContent() {
// new Object[]{
// ContentV3Scenario.TEST_UPDATE_WITH_INVALID_ECML_BODY, "application/pdf", "contentInDraft"
// },
new Object[]{
ContentV3Scenario.TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_TYPE, "application/pdf", "contentInDraft"
},
new Object[]{
ContentV3Scenario.TEST_UPDATE_CONTENT_WITH_INVALID_LICENSE_VALUE, "application/pdf", "contentInDraft"
}
};
}

Expand Down Expand Up @@ -263,8 +272,7 @@ public Object[][] updateImageResourceContent() {
},
new Object[]{
ContentV3Scenario.TEST_UPDATE_CONTENT_IN_LIVE_WITH_IMAGE, "application/pdf", "contentInLiveImageDraft"
},

}
};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"request": {
"content": {
"identifier":"${contentIdVal}",
"name": "Course",
"contentType": "Resource",
"code": "citrus:Code",
"mimeType": "application/pdf",
"license": "InvalidOther"
"license": ["CC BY 4.0"]
}
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
{
"id": "api.content.create",
"id": "api.content.update",
"ver": "3.0",
"ts": "@matchesDatePattern('yyyy-MM-dd')@",
"params": {
"resmsgid": "@ignore@",
"msgid": null,
"err": "ERR_INVALID_EDGE_PROPERTY",
"err": "CLIENT_ERROR",
"status": "failed",
"errmsg": "@ignore@"
"errmsg": "Validation Errors"
},
"responseCode": "CLIENT_ERROR",
"result": {
"messages": null
"messages": [
"Metadata license should be a/an String value"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"request": {
"content": {
"identifier":"${contentIdVal}",
"name": "Course",
"contentType": "Resource",
"code": "citrus:Code",
"mimeType": "application/pdf",
"license": "InvalidValue"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "api.content.create",
"ver": "3.0",
"ts": "@matchesDatePattern('yyyy-MM-dd')@",
"params": {
"resmsgid": "@ignore@",
"msgid": null,
"err": "ERR_INVALID_EDGE_PROPERTY",
"status": "failed",
"errmsg": "@startsWith('license value should be one of List')@"
},
"responseCode": "CLIENT_ERROR",
"result": {
"messages": null
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"request": {
"content": {
"identifier":"${contentIdVal}",
"name": "KP Integration Test Content",
"code": "kp.ft.resource.pdf",
"mimeType": "application/pdf",
"contentType":"Resource",
"license": "CC BY 4.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "api.content.create",
"ver": "3.0",
"ts": "@matchesDatePattern('yyyy-MM-dd')@",
"params": {
"resmsgid": "@ignore@",
"msgid": null,
"err": null,
"status": "successful",
"errmsg": null
},
"responseCode": "OK",
"result": {
"node_id": "${contentIdVal}",
"identifier": "${contentIdVal}",
"versionKey": "@isNumber()@"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"id" : "api.content.read",
"ver" : "3.0",
"ts" : "@matchesDatePattern('yyyy-MM-dd')@",
"params" : {
"resmsgid" : "@ignore@",
"msgid" : null,
"err" : null,
"status" : "successful",
"errmsg" : null
},
"responseCode" : "OK",
"result" : {
"content" : {
"ownershipType" : [ "createdBy" ],
"code" : "kp.ft.resource.pdf",
"channel" : "channel-01",
"language" : [ "English" ],
"mimeType" : "application/pdf",
"idealScreenSize" : "normal",
"createdOn" : "@matchesDatePattern('yyyy-MM-dd')@",
"appId" : "@ignore@",
"contentDisposition" : "inline",
"lastUpdatedOn" : "@matchesDatePattern('yyyy-MM-dd')@",
"contentEncoding" : "identity",
"contentType" : "Resource",
"dialcodeRequired" : "No",
"identifier" : "${contentIdVal}",
"lastStatusChangedOn" : "@matchesDatePattern('yyyy-MM-dd')@",
"audience" : [ "Learner" ],
"os" : [ "All" ],
"visibility" : "Default",
"consumerId" : "@ignore@",
"mediaType" : "content",
"osId" : "org.ekstep.quiz.app",
"languageCode" : [ ],
"version" :"@isNumber()@",
"versionKey" : "@ignore@",
"license" : "CC BY 4.0",
"idealScreenDensity" : "hdpi",
"framework" : "NCF",
"compatibilityLevel" :"@isNumber()@",
"name" : "KP Integration Test Content",
"status" : "Draft"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"request": {
"content": {
"identifier":"${contentIdVal}",
"name": "KP Integration Test Content",
"code": "kp.ft.resource.pdf",
"mimeType": "application/pdf",
"contentType":"Resource"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "api.content.create",
"ver": "3.0",
"ts": "@matchesDatePattern('yyyy-MM-dd')@",
"params": {
"resmsgid": "@ignore@",
"msgid": null,
"err": null,
"status": "successful",
"errmsg": null
},
"responseCode": "OK",
"result": {
"node_id": "${contentIdVal}",
"identifier": "${contentIdVal}",
"versionKey": "@isNumber()@"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"id" : "api.content.read",
"ver" : "3.0",
"ts" : "@matchesDatePattern('yyyy-MM-dd')@",
"params" : {
"resmsgid" : "@ignore@",
"msgid" : null,
"err" : null,
"status" : "successful",
"errmsg" : null
},
"responseCode" : "OK",
"result" : {
"content" : {
"ownershipType" : [ "createdBy" ],
"code" : "kp.ft.resource.pdf",
"channel" : "channel-01",
"language" : [ "English" ],
"mimeType" : "application/pdf",
"idealScreenSize" : "normal",
"createdOn" : "@matchesDatePattern('yyyy-MM-dd')@",
"appId" : "@ignore@",
"contentDisposition" : "inline",
"lastUpdatedOn" : "@matchesDatePattern('yyyy-MM-dd')@",
"contentEncoding" : "identity",
"contentType" : "Resource",
"dialcodeRequired" : "No",
"identifier" : "${contentIdVal}",
"lastStatusChangedOn" : "@matchesDatePattern('yyyy-MM-dd')@",
"audience" : [ "Learner" ],
"os" : [ "All" ],
"visibility" : "Default",
"consumerId" : "@ignore@",
"mediaType" : "content",
"osId" : "org.ekstep.quiz.app",
"languageCode" : [ ],
"version" :"@isNumber()@",
"versionKey" : "@ignore@",
"license" : "CC BY 4.0",
"idealScreenDensity" : "hdpi",
"framework" : "NCF",
"compatibilityLevel" :"@isNumber()@",
"name" : "KP Integration Test Content",
"status" : "Draft"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"request": {
"content": {
"name": "KP-Updated-pdf",
"versionKey": "${versionKeyVal}",
"license": ["CC BY 4.0"]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "api.content.update",
"ver": "3.0",
"ts": "@matchesDatePattern('yyyy-MM-dd')@",
"params": {
"resmsgid": "@ignore@",
"msgid": null,
"err": "CLIENT_ERROR",
"status": "failed",
"errmsg": "Validation Errors"
},
"responseCode": "CLIENT_ERROR",
"result": {
"messages": [
"Metadata license should be a/an String value"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"request": {
"content": {
"name": "KP-Updated-pdf",
"versionKey": "${versionKeyVal}",
"license": "Invalid License"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "api.content.update",
"ver": "3.0",
"ts": "@matchesDatePattern('yyyy-MM-dd')@",
"params": {
"resmsgid": "@ignore@",
"msgid": null,
"err": "ERR_INVALID_EDGE_PROPERTY",
"status": "failed",
"errmsg": "@startsWith('license value should be one of List')@"
},
"responseCode": "CLIENT_ERROR",
"result": {
"messages": null
}
}
Loading