Skip to content

Commit

Permalink
fix: convert sharingRules by child
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Sep 13, 2024
1 parent f4db6ef commit 4c2ca8d
Show file tree
Hide file tree
Showing 9 changed files with 4,205 additions and 37 deletions.
16 changes: 8 additions & 8 deletions src/registry/metadataRegistry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3984,10 +3984,10 @@
"sharingrules": {
"children": {
"directories": {
"sharingCriteriaRules": "sharingcriteriarule",
"sharingGuestRules": "sharingguestrule",
"sharingOwnerRules": "sharingownerrule",
"sharingTerritoryRules": "sharingterritoryrule"
"sharingCriteriaRules": "sharingRules",
"sharingGuestRules": "sharingRules",
"sharingOwnerRules": "sharingRules",
"sharingTerritoryRules": "sharingRules"
},
"suffixes": {
"sharingCriteriaRule": "sharingcriteriarule",
Expand All @@ -3997,31 +3997,31 @@
},
"types": {
"sharingcriteriarule": {
"directoryName": "sharingCriteriaRules",
"directoryName": "sharingRules",
"id": "sharingcriteriarule",
"name": "SharingCriteriaRule",
"suffix": "sharingCriteriaRule",
"uniqueIdElement": "fullName",
"xmlElementName": "sharingCriteriaRules"
},
"sharingguestrule": {
"directoryName": "sharingGuestRules",
"directoryName": "sharingRules",
"id": "sharingguestrule",
"name": "SharingGuestRule",
"suffix": "sharingGuestRule",
"uniqueIdElement": "fullName",
"xmlElementName": "sharingGuestRules"
},
"sharingownerrule": {
"directoryName": "sharingOwnerRules",
"directoryName": "sharingRules",
"id": "sharingownerrule",
"name": "SharingOwnerRule",
"suffix": "sharingOwnerRule",
"uniqueIdElement": "fullName",
"xmlElementName": "sharingOwnerRules"
},
"sharingterritoryrule": {
"directoryName": "sharingTerritoryRules",
"directoryName": "sharingRules",
"id": "sharingterritoryrule",
"name": "SharingTerritoryRule",
"suffix": "sharingTerritoryRule",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre1'), pre1TestOutputDir);
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre1'), pre1TestOutputDir);
});

it('2 pre-destructive and 2 deployments', async () => {
Expand All @@ -82,7 +82,7 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre2'), pre2TestOutputDir);
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'pre2'), pre2TestOutputDir);
});

it('1 post-destructive and 1 deployment', async () => {
Expand All @@ -107,7 +107,7 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1'), postTestOutputDir);
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1'), postTestOutputDir);
});

it('2 post-destructive and 2 deployments', async () => {
Expand All @@ -132,7 +132,7 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post2'), post2TestOutputDir);
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post2'), post2TestOutputDir);
});

it('1 post-destructive and no deployment', async () => {
Expand All @@ -157,7 +157,7 @@ describe('Creating and converting ComponentSets with destructive changes', () =>
for (const file of convertedFiles) {
await fileSnap(file, testDir);
}
dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1-solo'), postTestOutputDir);
await dirsAreIdentical(path.join(snapshotsDir, 'testOutput', 'post1-solo'), postTestOutputDir);
});

it('throws when wildcards are used in destructive changes', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>account.AcctCBS_toAllInternal</members>
<name>SharingCriteriaRule</name>
</types>
<version>52.0</version>
</Package>
Loading

0 comments on commit 4c2ca8d

Please sign in to comment.