Skip to content

Commit

Permalink
Test Case Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
manas-sf committed May 17, 2021
1 parent 61a3bee commit 5f2dc1b
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 9 deletions.
8 changes: 4 additions & 4 deletions dataPacksJobs/TestJob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ expansionPath: testJobRunning
buildFile: testJobRunning/testBuildFile.resource
autoUpdateSettings: true
queries:
- VlocityDataPackType: VlocityUITemplate
query: Select Id, Name from %vlocity_namespace%__VlocityUITemplate__c where Name LIKE 'datapacktest-%' AND %vlocity_namespace%__Active__c = true
- VlocityDataPackType: VlocityUILayout
query: Select Id, Name from %vlocity_namespace%__VlocityUILayout__c where Name LIKE 'datapacktest-%'
- VlocityDataPackType: IntegrationProcedure
query: Select Id, %vlocity_namespace%__Type__c, %vlocity_namespace%__SubType__c from %vlocity_namespace%__OmniScript__c WHERE %vlocity_namespace%__IsActive__c = true AND %vlocity_namespace%__IsProcedure__c = true AND %vlocity_namespace%__ProcedureKey__c LIKE 'dataPackTest_%'
- VlocityDataPackType: VlocityCard
query: SELECT Id, Name FROM %vlocity_namespace%__VlocityCard__c WHERE Name LIKE 'datapacktest_%' AND %vlocity_namespace%__Active__c = true
preJobApex:
Deploy: TestJob.cls
preStepApex:
Expand Down
22 changes: 22 additions & 0 deletions lib/datapacksexpanddefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1456,6 +1456,28 @@ SObjects:
UnhashableFields:
- Author__c
- GlobalKey__c
OmniUiCard:
DataPackReferences:
- Type: VlocityUILayout
Field: PropertySetConfig.states.flyout.layout
- Type: DataRaptor
Field: PropertySetConfig.dataSource.value.bundle
- Type: ApexClass
Field: PropertySetConfig.dataSource.value.remoteClass
- Type: VlocityUITemplate
Field: PropertySetConfig.states.templateUrl
- Type: VlocityAction
Field: PropertySetConfig.states.definedActions.actions.id
PropertySetConfig: json
FilterFields:
- IsActive
JsonFields:
- DataSourceConfig
SourceKeyDefinition:
- Name
UnhashableFields:
- AuthorName
- OmniUiCardKey
VlocityDataStore__c:
SourceKeyDefinition:
- Name
Expand Down
6 changes: 4 additions & 2 deletions lib/deltacheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,9 @@ DeltaCheck.prototype.getSObjectMetadata = async function(sObjectType) {
this.sObjectInfo[sObjectType].sObjectDescribe = await this.sObjectInfo[sObjectType].sObjectDescribe;

if (!this.sObjectInfo[sObjectType].sObjectDescribe) {
VlocityUtils.error('Error', 'SObject Does Not Exist', sObjectType);
if (!this.vlocity.isOmniStudioInstalled) {
VlocityUtils.error('Error', 'SObject Does Not Exist', sObjectType);
}
return null;
}

Expand Down Expand Up @@ -1045,7 +1047,7 @@ DeltaCheck.prototype.buildUniqueKey = async function(sObjectType, vlocityDataPac
var sObjectRecord = {};

for (var matchingKeyField of matchingKeyFields) {
if (this.sObjectInfo[sObjectType].fieldsDefinitionsMap[matchingKeyField]) {
if (this.sObjectInfo[sObjectType].fieldsDefinitionsMap && this.sObjectInfo[sObjectType].fieldsDefinitionsMap[matchingKeyField]) {
var referenceSObject = sObject[matchingKeyField];

if (referenceSObject instanceof Object) {
Expand Down
2 changes: 1 addition & 1 deletion lib/queryservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ QueryService.prototype.buildWhereClause = function(fieldsValuesMap, fieldsDefini

if (fieldName == 'OrderBy') {
orderBy = ' ' + fieldsValuesMap[fieldName];
} else if (fieldsDefinition[fieldName]) {
} else if (fieldsDefinition && fieldsDefinition[fieldName]) {
var type = fieldsDefinition[fieldName].type;
var value = fieldsValuesMap[fieldName];

Expand Down
4 changes: 2 additions & 2 deletions lib/utilityservice.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ UtilityService.prototype.getDRMatchingKeys = async function() {
}

if (!this.matchingKeys) {
if (this.vlocity.namespace) {
if (this.vlocity.namespace && (!this.vlocity.isOmniStudioInstalled || this.vlocity.isOmniStudioIndustryInstalled)) {
try {
this.matchingKeyQueryInProgress = true;
var queryResult = await this.vlocity.queryservice.query('SELECT Id,Label,NamespacePrefix,%vlocity_namespace%__ObjectAPIName__c,%vlocity_namespace%__MatchingKeyFields__c FROM %vlocity_namespace%__DRMatchingKey__mdt');
Expand Down Expand Up @@ -591,7 +591,7 @@ UtilityService.prototype.describeSObject = async function(sObjectName) {
var self = this;
return await new Promise(function(resolve, reject) {
self.vlocity.jsForceConnection.sobject(self.setNamespaceToOrg(sObjectName)).describe(function(err, result) {
if (err) {
if (err && !self.vlocity.isOmniStudioInstalled) {
VlocityUtils.verbose('Describe Not found', sObjectName, err.message);
}

Expand Down

0 comments on commit 5f2dc1b

Please sign in to comment.