aboutsummaryrefslogtreecommitdiffstats
path: root/cps-ri/src
AgeCommit message (Expand)AuthorFilesLines
2023-08-18CPS-Core : Expose a java interface to update schema setsourabh_sourabh2-0/+16
2023-08-17Update of top-level data node fails with SQL errordanielhanrahan1-1/+1
2023-08-16Fixing sonar issuesdanielhanrahan3-6/+3
2023-08-03Merge "Support pagination in query across all anchors(ep4)"Luke Gleeson7-21/+159
2023-08-02Support pagination in query across all anchors(ep4)rajesh.kumar7-21/+159
2023-07-27Allow getDataNodes to read whole lists(ep 1)danielhanrahan3-31/+53
2023-07-20Apostrophe handling in CpsPathParserdanielhanrahan8-9/+84
2023-07-17Allow duplicate leaf names in Cps Path leaf conditiondanielhanrahan1-12/+9
2023-07-13Upgrade to Java 17egernug1-3/+4
2023-07-11Combine alreadyDefinedException classesdanielhanrahan1-7/+7
2023-07-10Handle special characters in CpsPath queries (CPS-1760 #2)danielhanrahan2-29/+7
2023-07-06Escape SQL LIKE wildcards in queries (CPS-1760 #1)danielhanrahan4-5/+75
2023-06-21Improve performance of updateDataLeavesdanielhanrahan1-12/+9
2023-06-19Move integration test (clean-up, last phase)ToineSiebelink14-677/+82
2023-06-14Lower memory usage in FragmentRepositorydanielhanrahan6-238/+174
2023-06-13Merge "Move integration test (DataService)"Toine Siebelink4-747/+17
2023-06-12Fix for recursive SQL returning extra level of descendantsdanielhanrahan1-2/+2
2023-06-12Move integration test (DataService)ToineSiebelink4-747/+17
2023-05-30Add <,> operators support to cps-pathRudrangi Anupriya1-17/+32
2023-05-17Entity ID types do not match types in database definitionToineSiebelink17-36/+86
2023-05-17Move integration test for adminServiceToineSiebelink2-267/+2
2023-05-16Fixing minor compilationwaqas.ikram1-1/+1
2023-05-12Remove dataspace_id column from Fragment tabledanielhanrahan12-91/+243
2023-05-11Move integration test for moduleServiceToineSiebelink2-354/+23
2023-05-10Move integration test (DataService)ToineSiebelink2-8/+1
2023-05-09Migrate cps-ri performance tests to integration-test moduledanielhanrahan5-571/+0
2023-05-09Support for Patch across multiple data nodes--global4-65/+82
2023-05-08Merge "Use recursive SQL to fetch descendants in CpsPath queries (CPS-1664 #4)"Sourabh Sourabh3-99/+37
2023-05-08Merge "Fix and refactor query across anchors (CPS-1664 #3)"Sourabh Sourabh7-68/+154
2023-05-08Merge "[CPS] RI: Code Refactoring # Replace '[\s\S]' to '.' as it is same as ...Toine Siebelink4-31/+17
2023-05-08Merge "Don't handle ancestor-axis using regex quickfind (CPS-1664 #2)"Sourabh Sourabh2-10/+6
2023-05-05[CPS] RI: Code Refactoringraviteja.karumuri4-31/+17
2023-05-04Fragment Entity does not represent the correct relationship with Anchordanielhanrahan1-2/+1
2023-05-04Use recursive SQL to fetch descendants in CpsPath queries (CPS-1664 #4)danielhanrahan3-99/+37
2023-05-04Fix and refactor query across anchors (CPS-1664 #3)danielhanrahan7-68/+154
2023-05-04Don't handle ancestor-axis using regex quickfind (CPS-1664 #2)danielhanrahan2-10/+6
2023-05-04Merge "Sensible equals and hashCode for FragmentEntity (CPS-1664 #1)"Toine Siebelink4-12/+19
2023-05-04Fix for quickfind with descendants incl. list entriesToineSiebelink2-24/+38
2023-05-04Sensible equals and hashCode for FragmentEntity (CPS-1664 #1)danielhanrahan4-12/+19
2023-05-03canUseRegexQuickfind does not test for contains-conditiondanielhanrahan1-1/+2
2023-04-26[CPS] RI, Service: Code Refactoringraviteja.karumuri7-100/+27
2023-04-24Remove 32K limit from queries with collection parametersdanielhanrahan8-161/+114
2023-04-21Merge "Add contains condition support to cps-path"Luke Gleeson1-0/+11
2023-04-21Add contains condition support to cps-pathRudrangi Anupriya1-0/+11
2023-04-20Migrate hibernate-types to hypersistence-utilsdanielhanrahan1-1/+1
2023-04-17Remove CollectionUtils dependencylukegleeson1-2/+1
2023-04-14Use cascade delete in fragments tabledanielhanrahan4-30/+40
2023-04-14Remove @NotNull from repository methodsdanielhanrahan4-29/+23
2023-04-14Add OR operator to cps-pathRudrangi Anupriya1-16/+22
2023-04-13Migrate query tests to integration-test module #6danielhanrahan2-178/+0
>toLowerCase() == "true"); }); /** * @module ResponseData * @description Will check the output data for a property and a boolean. property can be a path (example: results[0].id) * @exampleFile Example_ResponseData_CheckAndManipulation.feature * @step I want to check property {string} to have length {int} **/ Then('I want to check property {string} to have length {int}', function(string, intLength) { let arrayProp = _.get(this.context.responseData, string); assert.equal(arrayProp.length, intLength); }); /** * @module ResponseData * @description Will check the output data for a property and make sure it exists * @exampleFile Example_ResponseData_CheckAndManipulation.feature * @step I want to check property {string} exists **/ Then('I want to check property {string} exists', function(string) { assert.equal(_.has(this.context.responseData, string), true); }); /** * @module ResponseData * @description Will check the output data for a property and make sure it does not exist * @exampleFile Example_ResponseData_CheckAndManipulation.feature * @step I want to check property {string} does not exist **/ Then('I want to check property {string} does not exist', function(string) { assert.equal(_.has(this.context.responseData, string), false); }); /** * @module ContextData * @description Use during development to see what is on the context * @exampleFile Example_ResponseData_CheckAndManipulation.feature * @step I want to print context data **/ Then('I want to print the context data', function() { console.log('------------ context ---------------'); console.log(JSON.stringify(this.context, null, 2)); console.log('--------------------------------------'); }); /** * @module ContextData * @description Set this in order to check that the following Rest call will not have response code 200 * @exampleFile Example_Rest_Calls.feature * @step I want the following to fail **/ Then('I want the following to fail', function() { this.context.shouldFail = true; }); /** * @module ContextData * @description Set this in order to check that the following Rest call will have the error code on the return data * @exampleFile Example_VSP.feature * @step I want the following to fail with error code {string} **/ Then('I want the following to fail with error code {string}', function(string) { this.context.shouldFail = true; this.context.errorCode = string; }); /** * @module ContextData * @description Set this in order to check that the following Rest call will have the error message on the return data * @exampleFile DeleteVLMCertified.feature * @step I want the following to fail with error message {string} **/ Then('I want the following to fail with error message {string}', function(string) { this.context.shouldFail = true; let errorMessage = getPath(string, this.context); this.context.errorMessage = errorMessage; }); /** * @module ZipData * @description Use this in order to extract a file from a zip file and to compare it to a local file (string comparison). * @exampleFile Example_VSP.feature * @step I want to compare the content of the entry {string} in the zip {string} with file {string} **/ Then ('I want to compare the content of the entry {string} in the zip {string} with file {string}', function (string, string2, string3) { let zipFile = fs.readFileSync(string2, 'binary'); let zip = new JSZip(zipFile, {base64: false, checkCRC32: true}); let fileData = zip.files[string]._data; let compareFileData = fs.readFileSync(string3, {encoding: 'ascii'}); assert.equal(normalizeNewline(compareFileData), normalizeNewline(fileData)); }); /** * @module ZipData * @description Loads the yaml from zip file onto the context responseData as JSON for running checks on the output * @exampleFile Example_VSP.feature * @step I want to load the yaml content of the entry {string} in the zip {string} to context **/ Then ('I want to load the yaml content of the entry {string} in the zip {string} to context', function (string, string2, callback) { let zipFile = fs.readFileSync(string2, 'binary'); let zip = new JSZip(zipFile, {base64: false, checkCRC32: true}); let fileData = zip.files[string]._data; let nativeObject = YAML.parse(fileData); this.context.responseData = nativeObject; callback(); }); /** * @module ZipData * @description Loads the json from zip file onto the context responseData for running check son the output * @exampleFile Example_VSP.feature * @step I want to load the json content of the entry {string} in the zip {string} to context **/ When('I want to load the json content of the entry {string} in the zip {string} to context', function (string, string2, callback) { let zipFile = fs.readFileSync(string2, 'binary'); let zip = new JSZip(zipFile, {base64: false, checkCRC32: true}); let str = zip.files[string]._data; this.context.responseData = JSON.parse(str); callback(); }); /** * @module ResponseData * @description Check that the result list doesn't contain an element with property x which has value * equals to saved property y * @exampleFile ListItemsFilters.feature * @step I want to check that element in the response list with {string} equals to value of saved property {string} does not exist **/ Then('I want to check that element in the response list with {string} equals to value of saved property {string} does not exist', function (propertyPath, valueProperty) { const results = this.context.responseData.results; assert.equal(results.find(result => this.context[valueProperty] === _.get(result, propertyPath)), undefined); }); /** * @module ResponseData * @description Check that the result list contains an element with property x which has value * equals to saved property y * @exampleFile ListItemsFilters.feature * @step I want to check that element in the response list with {string} equals to value of saved property {string} exists **/ Then('I want to check that element in the response list with {string} equals to value of saved property {string} exists', function(propertyPath, valueProperty) { const results = this.context.responseData.results; assert.notEqual(results.find(result => this.context[valueProperty] === _.get(result, propertyPath)), undefined); }); /** * @module ResponseData * @description Check that the itemId from context exits in result of responseData * exampleFile ArchiveItem.feature * step I want to check that item exits in response **/ Then('I want to check that item exits in response', function() { const id = this.context.item.id; const results = this.context.responseData.results; var testResult = false; for(var i=0; i< results.length; i++){ if ( id == results[i].id){ testResult = true; } } assert.equal(testResult,true); }); /** * @module ResponseData * @description Check that the itemId from context does NOT exits in result of responseData * exampleFile ArchiveItem.feature * step I want to check that item does not exits in response **/ Then('I want to check that item does not exits in response', function() { const id = this.context.item.id; const results = this.context.responseData.results; var testResult = false; for(var i=0; i< results.length; i++){ if ( id == results[i].id){ testResult = true; } } assert.equal(testResult,false); });