From cde4108594cb94fcef67eaefffd1b137637c05ca Mon Sep 17 00:00:00 2001 From: chinmay-browserstack <92926953+chinmay-browserstack@users.noreply.github.com> Date: Wed, 14 Aug 2024 18:34:06 +0530 Subject: [PATCH] Update messaging for storing logs (#1690) --- packages/cli-exec/test/exec.test.js | 2 +- packages/cli-exec/test/start.test.js | 2 +- packages/core/src/percy.js | 2 +- packages/core/test/percy.test.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/cli-exec/test/exec.test.js b/packages/cli-exec/test/exec.test.js index b2d33b2bc..9fef56ca2 100644 --- a/packages/cli-exec/test/exec.test.js +++ b/packages/cli-exec/test/exec.test.js @@ -185,7 +185,7 @@ describe('percy exec', () => { '[percy] Suggestion: Try using percy snapshot command to take snapshots', '[percy] Refer to the below Doc Links for the same', '[percy] * https://www.browserstack.com/docs/percy/take-percy-snapshots/', - '[percy] Notice: Percy collects CI logs for service improvement, stored for 30 days. Opt-out anytime with export PERCY_CLIENT_ERROR_LOGS=false' + '[percy] Notice: Percy collects CI logs to improve service and enhance your experience. These logs help us debug issues and provide insights on your dashboards, making it easier to optimize the product experience. Logs are stored securely for 30 days. You can opt out anytime with export PERCY_CLIENT_ERROR_LOGS=false, but keeping this enabled helps us offer the best support and features.' ])); expect(logger.stdout).toEqual(jasmine.arrayContaining([ diff --git a/packages/cli-exec/test/start.test.js b/packages/cli-exec/test/start.test.js index 7b0949e31..fe6bd123c 100644 --- a/packages/cli-exec/test/start.test.js +++ b/packages/cli-exec/test/start.test.js @@ -106,7 +106,7 @@ describe('percy exec:start', () => { }); expect(logger.stderr).toEqual(jasmine.arrayContaining([ - '[percy] Notice: Percy collects CI logs for service improvement, stored for 30 days. Opt-out anytime with export PERCY_CLIENT_ERROR_LOGS=false', + '[percy] Notice: Percy collects CI logs to improve service and enhance your experience. These logs help us debug issues and provide insights on your dashboards, making it easier to optimize the product experience. Logs are stored securely for 30 days. You can opt out anytime with export PERCY_CLIENT_ERROR_LOGS=false, but keeping this enabled helps us offer the best support and features.', '[percy] Error: Percy is already running or the port 5338 is in use', '[percy] Error: Percy is already running or the port 5338 is in use' ])); diff --git a/packages/core/src/percy.js b/packages/core/src/percy.js index 9a7e7149e..56f9ef9da 100644 --- a/packages/core/src/percy.js +++ b/packages/core/src/percy.js @@ -162,7 +162,7 @@ export class Percy { try { if (process.env.PERCY_CLIENT_ERROR_LOGS !== 'false') { - this.log.warn('Notice: Percy collects CI logs for service improvement, stored for 30 days. Opt-out anytime with export PERCY_CLIENT_ERROR_LOGS=false'); + this.log.warn('Notice: Percy collects CI logs to improve service and enhance your experience. These logs help us debug issues and provide insights on your dashboards, making it easier to optimize the product experience. Logs are stored securely for 30 days. You can opt out anytime with export PERCY_CLIENT_ERROR_LOGS=false, but keeping this enabled helps us offer the best support and features.'); } // Not awaiting proxy check as this can be asyncronous when not enabled const detectProxy = detectSystemProxyAndLog(this.config.percy.useSystemProxy); diff --git a/packages/core/test/percy.test.js b/packages/core/test/percy.test.js index 7632f54e1..7e452b8d1 100644 --- a/packages/core/test/percy.test.js +++ b/packages/core/test/percy.test.js @@ -235,7 +235,7 @@ describe('Percy', () => { await expectAsync(percy.start()).toBeResolved(); expect(logger.stderr).toEqual([ - '[percy] Notice: Percy collects CI logs for service improvement, stored for 30 days. Opt-out anytime with export PERCY_CLIENT_ERROR_LOGS=false' + '[percy] Notice: Percy collects CI logs to improve service and enhance your experience. These logs help us debug issues and provide insights on your dashboards, making it easier to optimize the product experience. Logs are stored securely for 30 days. You can opt out anytime with export PERCY_CLIENT_ERROR_LOGS=false, but keeping this enabled helps us offer the best support and features.' ]); expect(logger.stdout).toEqual([ '[percy] Percy has started!'