diff --git a/test/commands/package/install.nut.ts b/test/commands/package/install.nut.ts index afc460db..0b3d0e29 100644 --- a/test/commands/package/install.nut.ts +++ b/test/commands/package/install.nut.ts @@ -23,6 +23,8 @@ import { Duration } from '@salesforce/kit'; type PackageInstallRequest = PackagingSObjects.PackageInstallRequest; type PackageUninstallRequest = PackagingSObjects.SubscriberPackageVersionUninstallRequest; +const DREAMHOUSE = { id: '04tKY000000MF7uYAG', name: 'DreamHouseLWC' }; + describe('package install', () => { let session: TestSession; before(async () => { @@ -42,15 +44,15 @@ describe('package install', () => { await session?.clean(); }); - it('should install ElectronBranding package with polling', () => { - const command = 'package:install -p 04t6A000002zgKSQAY -w 20'; + it('should install DreamHouseLWC package with polling', () => { + const command = `package:install -p ${DREAMHOUSE.id} -w 20`; const output = execCmd(command, { ensureExitCode: 0, timeout: Duration.minutes(20).milliseconds }).shellOutput .stdout; expect(output).to.contain('Successfully installed package'); }); - it('should install DFXP Escape Room package (async) and report', () => { - const installCommand = 'package:install -p 04t6A000002zgKSQAY --json'; + it('should install DreamHouseLWC package (async) and report', () => { + const installCommand = `package:install -p ${DREAMHOUSE.id} --json`; const installJson = execCmd(installCommand, { ensureExitCode: 0 }).jsonOutput?.result; expect(installJson).to.have.property('Status', 'IN_PROGRESS'); @@ -61,7 +63,7 @@ describe('package install', () => { }); it('should start an uninstall request, and report on it', () => { - const uninstallCommand = 'package:uninstall -p 04t6A000002zgKSQAY --json -w 0'; + const uninstallCommand = `package:uninstall -p ${DREAMHOUSE.id} --json -w 0`; const uninstallRequest = execCmd(uninstallCommand, { ensureExitCode: 0, }).jsonOutput?.result; diff --git a/test/commands/package/install.test.ts b/test/commands/package/install.test.ts index cb2598ea..4a299024 100644 --- a/test/commands/package/install.test.ts +++ b/test/commands/package/install.test.ts @@ -24,7 +24,7 @@ import { SfCommand, stubPrompter } from '@salesforce/sf-plugins-core'; import { Install } from '../../../src/commands/package/install.js'; import InstallValidationStatus = PackagingSObjects.InstallValidationStatus; -const myPackageVersion04t = '04t6A000002zgKSQAY'; +const myPackageVersion04t = '04tKY000000MF7uYAG'; const pkgInstallRequest = { attributes: { @@ -225,7 +225,7 @@ describe('package:install', () => { const result = await cmd.run(); expect(uxLogStub.calledOnce).to.be.true; - const msg = 'Successfully installed package [04t6A000002zgKSQAY]'; + const msg = 'Successfully installed package [04tKY000000MF7uYAG]'; expect(uxLogStub.args[0][0]).to.equal(msg); expect(result).to.deep.equal(request); expect(installStub.args[0][0]).to.deep.equal(pkgInstallCreateRequest); diff --git a/test/commands/package/installReport.test.ts b/test/commands/package/installReport.test.ts index 297a1db2..a4ed7c33 100644 --- a/test/commands/package/installReport.test.ts +++ b/test/commands/package/installReport.test.ts @@ -34,7 +34,7 @@ const pkgInstallRequest = { LastModifiedDate: '2022-08-09T05:13:14.000+0000', LastModifiedById: '0051h000009NugzAAC', SystemModstamp: '2022-08-09T05:13:14.000+0000', - SubscriberPackageVersionKey: '04t6A000002zgKSQAY', + SubscriberPackageVersionKey: '04tKY000000MF7uYAG', NameConflictResolution: 'Block', SecurityType: 'None', PackageInstallSource: 'U', @@ -89,7 +89,7 @@ describe('package:install:report', () => { const result = await new Report(['-i', pkgInstallRequest.Id, '--target-org', testOrg.username], config).run(); expect(result).to.deep.equal(request); expect(uxLogStub.calledOnce).to.be.true; - expect(uxLogStub.args[0][0]).to.equal('Successfully installed package [04t6A000002zgKSQAY]'); + expect(uxLogStub.args[0][0]).to.equal('Successfully installed package [04tKY000000MF7uYAG]'); }); it('should report IN_PROGRESS status', async () => { diff --git a/test/commands/package/version.delete.test.ts b/test/commands/package/version.delete.test.ts index 24096c06..55983c3d 100644 --- a/test/commands/package/version.delete.test.ts +++ b/test/commands/package/version.delete.test.ts @@ -95,7 +95,7 @@ describe('package:version:delete', () => { } as PackageSaveResult); uxConfirmStub.resolves(true); - const command = new PackageVersionDeleteCommand(['-p', '04t6A000002zgKSQAY', '-v', 'foor@bar.org'], config); + const command = new PackageVersionDeleteCommand(['-p', '04tKY000000MF7uYAG', '-v', 'foor@bar.org'], config); command.project = SfProject.getInstance(); const results: PackageSaveResult = await command.run(); expect(results.id).to.equal('testId'); @@ -112,7 +112,7 @@ describe('package:version:delete', () => { } as PackageSaveResult); uxConfirmStub.resolves(true); const command = new PackageVersionDeleteCommand( - ['-p', '04t6A000002zgKSQAY', '-v', 'foor@bar.org', '--undelete'], + ['-p', '04tKY000000MF7uYAG', '-v', 'foor@bar.org', '--undelete'], config ); command.project = SfProject.getInstance();