From 25e9b22361ee629adfe707ced216ddcc205e768b Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 14 Feb 2024 11:27:54 -0600 Subject: [PATCH 1/2] test: ebikes removed 2 files --- test/nuts/tracking/constants.ts | 2 +- yarn.lock | 42 +++++++-------------------------- 2 files changed, 10 insertions(+), 34 deletions(-) diff --git a/test/nuts/tracking/constants.ts b/test/nuts/tracking/constants.ts index f628cda1..f7f9318f 100644 --- a/test/nuts/tracking/constants.ts +++ b/test/nuts/tracking/constants.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 eBikesDeployResultCount = 215; +export const eBikesDeployResultCount = 213; diff --git a/yarn.lock b/yarn.lock index f53dedc8..d22e3789 100644 --- a/yarn.lock +++ b/yarn.lock @@ -879,7 +879,7 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" -"@aws-sdk/types@3.496.0", "@aws-sdk/types@^3.222.0": +"@aws-sdk/types@3.496.0": version "3.496.0" resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.496.0.tgz#cdde44a94a57cf8f97cf05e4d0bdce2f56ce4eeb" integrity sha512-umkGadK4QuNQaMoDICMm7NKRI/mYSXiyPjcn3d53BhsuArYU/52CebGQKdt4At7SwwsiVJZw9RNBHyN5Mm0HVw== @@ -887,7 +887,7 @@ "@smithy/types" "^2.9.1" tslib "^2.5.0" -"@aws-sdk/types@3.502.0": +"@aws-sdk/types@3.502.0", "@aws-sdk/types@^3.222.0": version "3.502.0" resolved "https://registry.yarnpkg.com/@aws-sdk/types/-/types-3.502.0.tgz#c23dda4df7fdbe32642d4f5ab23516f455fb6aba" integrity sha512-M0DSPYe/gXhwD2QHgoukaZv5oDxhW3FfvYIrJptyqUq3OnPJBcDbihHjrE0PBtfh/9kgMZT60/fQ2NVFANfa2g== @@ -2892,12 +2892,7 @@ "@types/minimatch" "*" "@types/node" "*" -"@types/http-cache-semantics@*": - version "4.0.1" - resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.1.tgz#0ea7b61496902b95890dc4c3a116b60cb8dae812" - integrity sha512-SZs7ekbP8CN0txVG2xVRH6EgKmEm31BOxA07vkFaETzZz1xh+cbt8BcI0slpymvwhx5dlFnQG2rTlPVQn+iRPQ== - -"@types/http-cache-semantics@^4.0.2": +"@types/http-cache-semantics@*", "@types/http-cache-semantics@^4.0.2": version "4.0.4" resolved "https://registry.yarnpkg.com/@types/http-cache-semantics/-/http-cache-semantics-4.0.4.tgz#b979ebad3919799c979b17c72621c0bc0a31c6c4" integrity sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA== @@ -2985,10 +2980,10 @@ dependencies: "@types/node" "*" -"@types/node@*": - version "20.10.6" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.10.6.tgz#a3ec84c22965802bf763da55b2394424f22bfbb5" - integrity sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw== +"@types/node@*", "@types/node@^20.10.7": + version "20.11.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.17.tgz#cdd642d0e62ef3a861f88ddbc2b61e32578a9292" + integrity sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw== dependencies: undici-types "~5.26.4" @@ -3009,13 +3004,6 @@ dependencies: undici-types "~5.26.4" -"@types/node@^20.10.7": - version "20.11.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.17.tgz#cdd642d0e62ef3a861f88ddbc2b61e32578a9292" - integrity sha512-QmgQZGWu1Yw9TDyAP9ZzpFJKynYNeOvwMJmaxABfieQoVoiVOS6MN1WSpqpRcbeA5+RW82kraAVxCCJg+780Qw== - dependencies: - undici-types "~5.26.4" - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -5971,12 +5959,7 @@ ignore-walk@^6.0.0: dependencies: minimatch "^9.0.0" -ignore@^5.1.4, ignore@^5.2.0, ignore@^5.2.4: - version "5.3.0" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.0.tgz#67418ae40d34d6999c95ff56016759c718c82f78" - integrity sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg== - -ignore@^5.3.1: +ignore@^5.1.4, ignore@^5.2.0, ignore@^5.2.4, ignore@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef" integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw== @@ -6666,14 +6649,7 @@ jws@^3.2.2: jwa "^1.4.1" safe-buffer "^5.0.1" -keyv@^4.0.0: - version "4.5.2" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.2.tgz#0e310ce73bf7851ec702f2eaf46ec4e3805cce56" - integrity sha512-5MHbFaKn8cNSmVW7BYnijeAVlE4cYA/SVkifVgrh7yotnfhKmjuXpDKjrABLnT0SfHWV21P8ow07OGfRrNDg8g== - dependencies: - json-buffer "3.0.1" - -keyv@^4.5.3: +keyv@^4.0.0, keyv@^4.5.3: version "4.5.4" resolved "https://registry.yarnpkg.com/keyv/-/keyv-4.5.4.tgz#a879a99e29452f942439f2a405e3af8b31d4de93" integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== From bf787f8507e4d6f23dcd2f854ee7119a12a1f6ee Mon Sep 17 00:00:00 2001 From: mshanemc Date: Wed, 14 Feb 2024 11:44:11 -0600 Subject: [PATCH 2/2] test: filter irrelevant reportTypes --- test/nuts/tracking/remoteChanges.nut.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/nuts/tracking/remoteChanges.nut.ts b/test/nuts/tracking/remoteChanges.nut.ts index f47acb45..6418ee30 100644 --- a/test/nuts/tracking/remoteChanges.nut.ts +++ b/test/nuts/tracking/remoteChanges.nut.ts @@ -7,7 +7,7 @@ import * as path from 'node:path'; import * as fs from 'node:fs'; -import { expect, assert } from 'chai'; +import { expect, assert, config } from 'chai'; import { execCmd, TestSession } from '@salesforce/cli-plugins-testkit'; import { AuthInfo, Connection } from '@salesforce/core'; @@ -20,8 +20,11 @@ import { eBikesDeployResultCount } from './constants.js'; let session: TestSession; let conn: Connection; +config.truncateThreshold = 0; + const filterIgnored = (r: StatusResult): boolean => r.ignored !== true; const noAudience = (pf: PreviewFile | FileResponse) => pf.type !== 'Audience'; +const noReportType = (pf: PreviewFile | FileResponse) => pf.type !== 'ReportType'; describe('remote changes', () => { before(async () => { @@ -142,9 +145,11 @@ describe('remote changes', () => { ?.result; assert(result); assert(Array.isArray(result.files)); + const filteredResult = result.files.filter(noAudience).filter(noReportType); // the 2 files for the apexClass, and possibly one for the Profile (depending on whether it got created in time) - expect(result.files.filter(noAudience), JSON.stringify(result)).to.have.length.greaterThanOrEqual(2); - expect(result.files.filter(noAudience), JSON.stringify(result)).to.have.length.lessThanOrEqual(4); + + expect(filteredResult).to.have.length.greaterThanOrEqual(2).and.lessThanOrEqual(4); + result.files.filter((r) => r.fullName === 'TestOrderController').map((r) => expect(r.state).to.equal('Deleted')); }); it('local file was deleted', () => {