diff --git a/test/nuts/trackingCommands/consts.ts b/test/nuts/trackingCommands/consts.ts index 6cacf43d2..ca0690bd7 100644 --- a/test/nuts/trackingCommands/consts.ts +++ b/test/nuts/trackingCommands/consts.ts @@ -4,4 +4,4 @@ * Licensed under the BSD 3-Clause license. * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -export const itemsInEBikesPush = 211; +export const itemsInEBikesPush = 209; diff --git a/test/nuts/trackingCommands/remoteChanges.nut.ts b/test/nuts/trackingCommands/remoteChanges.nut.ts index f029e85e2..231068cb5 100644 --- a/test/nuts/trackingCommands/remoteChanges.nut.ts +++ b/test/nuts/trackingCommands/remoteChanges.nut.ts @@ -11,7 +11,7 @@ import path from 'node:path'; import fs from 'node:fs'; -import { expect } from 'chai'; +import { expect, config } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { AuthInfo, Connection } from '@salesforce/core'; @@ -24,7 +24,15 @@ import { itemsInEBikesPush } from './consts.js'; let session: TestSession; let conn: Connection; +config.truncateThreshold = 0; + const filterIgnored = (r: StatusResult): boolean => r.ignored !== true; +const noReportTypes = (r: PullResponse['pulledSource'][number]): boolean => r.type !== 'ReportType'; + +// ebikes ignore file doesn't catch this somehow on windows (probably that slash) +// https://github.com/trailheadapps/ebikes-lwc/blob/3e5baf83d97bc71660feaa9922f8fed2e686f5f8/.forceignore#L136-L137 +const noPRMReports = (r: PullResponse['pulledSource'][number]): boolean => + !r.fullName.includes('prm_channel_reports_folder'); describe('remote changes', () => { before(async () => { @@ -106,12 +114,10 @@ describe('remote changes', () => { }); it('can pull the delete', () => { const result = execCmd('force:source:pull --json', { ensureExitCode: 0 }).jsonOutput?.result; - // ebikes ignore file doesn't catch this somehow on windows (probably that slash) - // https://github.com/trailheadapps/ebikes-lwc/blob/3e5baf83d97bc71660feaa9922f8fed2e686f5f8/.forceignore#L136-L137 - const filteredSource = result?.pulledSource.filter((r) => !r.fullName.includes('prm_channel_reports_folder')); + + const filteredSource = result?.pulledSource.filter(noPRMReports).filter(noReportTypes); // the 2 files for the apexClass, and possibly one for the Profile (depending on whether it got created in time) - expect(filteredSource).to.have.length.greaterThanOrEqual(2); - expect(filteredSource).to.have.length.lessThanOrEqual(4); + expect(filteredSource).to.have.length.greaterThanOrEqual(2).and.lessThanOrEqual(4); result?.pulledSource .filter((r) => r.fullName === 'TestOrderController') .map((r) => expect(r.state).to.equal('Deleted'));