diff --git a/test/mock/type-constants/decomposedPermissionSetConstant.ts b/test/mock/type-constants/decomposedPermissionSetConstant.ts index 0f69039067..05886241c9 100644 --- a/test/mock/type-constants/decomposedPermissionSetConstant.ts +++ b/test/mock/type-constants/decomposedPermissionSetConstant.ts @@ -384,137 +384,3 @@ export const ONLY_PS_PARENT = new SourceComponent( }, ]) ); - -// export const THREE_CUSTOM_LABELS_CMP = new SourceComponent( -// { -// name: 'CustomLabels', -// type: permissionSet, -// xml: join('labels', MDAPI_XML_NAME), -// }, -// new VirtualTreeContainer([ -// { -// dirPath: 'permissionSet', -// children: [ -// { -// name: MDAPI_XML_NAME, -// data: Buffer.from(` -// -// -// DeleteMe -// en_US -// true -// DeleteMe -// Test -// -// -// KeepMe1 -// en_US -// true -// KeepMe1 -// Test -// -// -// KeepMe2 -// en_US -// true -// KeepMe2 -// Test -// -// `), -// }, -// ], -// }, -// ]) -// ); -// -// const ONLY_LABEL_CONTENTS = ` -// -// OnlyLabel -// en_US -// true -// OnlyLabel -// OnlyLabel -// `; -// -// export const ONLY_LABEL_CMP_IN_DEFAULT_DIR_CMP = new SourceComponent( -// { -// name: 'OnlyLabel', -// type: customLabelType, -// xml: join('main', 'default', 'labels', 'OnlyLabel.label-meta.xml'), -// }, -// new VirtualTreeContainer([ -// { -// dirPath: join('main', 'default', 'labels'), -// children: [ -// { -// name: 'OnlyLabel.label-meta.xml', -// data: Buffer.from(ONLY_LABEL_CONTENTS), -// }, -// ], -// }, -// ]) -// ); -// -// export const ONLY_LABEL_CMP_IN_ANOTHER_DIR_CMP = new SourceComponent( -// { -// name: 'OnlyLabel', -// type: customLabelType, -// xml: join('other', 'dir', 'labels', 'OnlyLabel.label-meta.xml'), -// }, -// new VirtualTreeContainer([ -// { -// dirPath: join('other', 'dir', 'labels'), -// children: [ -// { -// name: 'OnlyLabel.label-meta.xml', -// data: Buffer.from(ONLY_LABEL_CONTENTS), -// }, -// ], -// }, -// ]) -// ); -// -// export const ONLY_LABEL_NO_DIR_CMP = new SourceComponent( -// { -// name: 'OnlyLabel', -// type: customLabelType, -// xml: 'OnlyLabel.label-meta.xml', -// }, -// new VirtualTreeContainer([ -// { -// dirPath: '', -// children: [ -// { -// name: 'OnlyLabel.label-meta.xml', -// data: Buffer.from(ONLY_LABEL_CONTENTS), -// }, -// ], -// }, -// ]) -// ); -// -// export const OTHER_LABEL_CMP = new SourceComponent( -// { -// name: 'OtherLabel', -// type: customLabelType, -// xml: join('labels', 'OtherLabel.label-meta.xml'), -// }, -// new VirtualTreeContainer([ -// { -// dirPath: 'permissionSet', -// children: [ -// { -// name: 'OtherLabel.label-meta.xml', -// data: Buffer.from(` -// -// OtherLabel -// en_US -// true -// OtherLabel -// OtherLabel -// `), -// }, -// ], -// }, -// ]) -// ); diff --git a/test/snapshot/sampleProjects/customTranslationProject/snapshots.test.ts b/test/snapshot/sampleProjects/customTranslationProject/snapshots.test.ts index 9dd9ca2eb4..157cc4c387 100644 --- a/test/snapshot/sampleProjects/customTranslationProject/snapshots.test.ts +++ b/test/snapshot/sampleProjects/customTranslationProject/snapshots.test.ts @@ -34,7 +34,7 @@ describe('COT / COFT snapshots', () => { await fileSnap(file, testDir); } - await dirsAreIdentical( + dirsAreIdentical( path.join(testDir, FORCE_APP), path.join(testDir, '__snapshots__', 'verify-source-files.expected', FORCE_APP) ); diff --git a/test/snapshot/sampleProjects/mpdWithLabels/snapshots.test.ts b/test/snapshot/sampleProjects/mpdWithLabels/snapshots.test.ts index 206bb2f164..6aa2b807d2 100644 --- a/test/snapshot/sampleProjects/mpdWithLabels/snapshots.test.ts +++ b/test/snapshot/sampleProjects/mpdWithLabels/snapshots.test.ts @@ -79,21 +79,21 @@ describe('recompose/decompose mpd project with labels', () => { // painfully repetitive, but the async nature makes dynamic testing even uglier it(`verify ${pkgDirs[0]}`, async () => { await validateSourceDir(pkgDirs[0]); - await dirsAreIdentical( + dirsAreIdentical( path.join(testDir, pkgDirs[0]), path.join(testDir.replace(tmpFolder, folder), '__snapshots__', pkgNameToTestName(pkgDirs[0]), pkgDirs[0]) ); }); it(`verify ${pkgDirs[1]}`, async () => { await validateSourceDir(pkgDirs[1]); - await dirsAreIdentical( + dirsAreIdentical( path.join(testDir, pkgDirs[1]), path.join(testDir.replace(tmpFolder, folder), '__snapshots__', pkgNameToTestName(pkgDirs[1]), pkgDirs[1]) ); }); it(`verify ${pkgDirs[2]}`, async () => { await validateSourceDir(pkgDirs[2]); - await dirsAreIdentical( + dirsAreIdentical( path.join(testDir, pkgDirs[2]), path.join(testDir.replace(tmpFolder, folder), '__snapshots__', pkgNameToTestName(pkgDirs[2]), pkgDirs[2]) ); diff --git a/test/snapshot/sampleProjects/preset-decomposedPS2/snapshots.test.ts b/test/snapshot/sampleProjects/preset-decomposedPS2/snapshots.test.ts index e071327470..53a3dff51a 100644 --- a/test/snapshot/sampleProjects/preset-decomposedPS2/snapshots.test.ts +++ b/test/snapshot/sampleProjects/preset-decomposedPS2/snapshots.test.ts @@ -42,6 +42,11 @@ describe('fully decomposed permission set via decomposePermissionSetBeta2', () = } }); it('round trip of metadata format is equivalent', async () => { + // eslint-disable-next-line no-console + console.log(fs.readdirSync(path.join(testDir))); + // eslint-disable-next-line no-console + console.log(fs.readdirSync(path.join(testDir, MDAPI_OUT))); // eslint-disable-next-line no-console + console.log(fs.readdirSync(path.join(testDir, MDAPI_OUT, 'permissionsets'))); const [old, updated] = await Promise.all([ fs.promises.readFile(path.join(testDir, 'originalMdapi', 'permissionsets', 'dreamhouse.permissionset'), 'utf8'), fs.promises.readFile(path.join(testDir, MDAPI_OUT, 'permissionsets', 'dreamhouse.permissionset'), 'utf8'),