diff --git a/sdk/playwrighttesting/create-microsoft-playwright-testing/src/initialize.ts b/sdk/playwrighttesting/create-microsoft-playwright-testing/src/initialize.ts index b70f8a87af9e..8350ea50d318 100644 --- a/sdk/playwrighttesting/create-microsoft-playwright-testing/src/initialize.ts +++ b/sdk/playwrighttesting/create-microsoft-playwright-testing/src/initialize.ts @@ -53,6 +53,7 @@ export class PlaywrightServiceInitialize { }; private promptOnCancel = (): never => { + // eslint-disable-next-line n/no-process-exit process.exit(0); }; @@ -71,6 +72,13 @@ export class PlaywrightServiceInitialize { console.log("\nPlaywright Service Portal - https://playwright.microsoft.com/"); console.log("Getting Started - https://aka.ms/mpt/quickstart\n"); + + console.log( + "If you're already using the Microsoft Playwright Testing service, please review the quickstart guide [https://aka.ms/mpt/quickstart] to ensure your tests continue running smoothly.", + ); + console.log( + "We've introduced changes related to authentication. You'll need to update the new config file to align with these changes.", + ); }; private installServicePackage = async (): Promise => { diff --git a/sdk/playwrighttesting/create-microsoft-playwright-testing/test/initialize.spec.ts b/sdk/playwrighttesting/create-microsoft-playwright-testing/test/initialize.spec.ts index ca10e41e8445..35462791dda7 100644 --- a/sdk/playwrighttesting/create-microsoft-playwright-testing/test/initialize.spec.ts +++ b/sdk/playwrighttesting/create-microsoft-playwright-testing/test/initialize.spec.ts @@ -142,7 +142,7 @@ describe("PlaywrightServiceInitialize", () => { const consoleLogStub = sandbox.stub(console, "log"); playwrightServiceInitialize["displayAdditionalInformation"](); - expect(consoleLogStub.callCount).to.equal(4); + expect(consoleLogStub.callCount).to.equal(6); expect(consoleLogStub.getCall(1).args[0]).to.equal(`\t${npmRunCommandParallelWorkers}\n`); }); @@ -158,7 +158,7 @@ describe("PlaywrightServiceInitialize", () => { const consoleLogStub = sandbox.stub(console, "log"); playwrightServiceInitialize["displayAdditionalInformation"](); - expect(consoleLogStub.callCount).to.equal(4); + expect(consoleLogStub.callCount).to.equal(6); expect(consoleLogStub.getCall(1).args[0]).to.equal(`\t${npmRunCommandParallelWorkers}\n`); }); @@ -174,7 +174,7 @@ describe("PlaywrightServiceInitialize", () => { const consoleLogStub = sandbox.stub(console, "log"); playwrightServiceInitialize["displayAdditionalInformation"](); - expect(consoleLogStub.callCount).to.equal(4); + expect(consoleLogStub.callCount).to.equal(6); expect(consoleLogStub.getCall(1).args[0]).to.equal(`\t${npmRunCommandParallelWorkers}\n`); }); }); diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts b/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts index bf16f2c78e50..0b9b3459973a 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/src/common/constants.ts @@ -83,9 +83,9 @@ export class Constants { ]; // Error messages public static readonly CONFLICT_409_ERROR_MESSAGE = - "Test run with id {runId} already exists. Please provide a unique run id."; + "Test run with id {runId} already exists. Provide a unique run id."; public static readonly FORBIDDEN_403_ERROR_MESSAGE = - "Reporting is not enabled for your workspace {workspaceId}. Please enable the Reporting feature under Feature management settings using the Playwright portal: https://playwright.microsoft.com/workspaces/{workspaceId}/settings/general"; + "Reporting is not enabled for your workspace {workspaceId}. Enable the Reporting feature under Feature management settings using the Playwright portal: https://playwright.microsoft.com/workspaces/{workspaceId}/settings/general"; // API Endpoints public static readonly testRunsEndpoint: string = "workspaces/{workspaceId}/test-runs"; public static readonly testRunsShardEndpoint: string = @@ -204,7 +204,7 @@ export const TestResultErrorConstants = [ { key: "QuotaLimitError_Scalable", message: - "It is possible that the maximum number of concurrent sessions allowed for your workspace has been exceeded.", + "It is possible that the maximum number of concurrent sessions allowed for your workspace has been exceeded. Check the quota at https://aka.ms/mpt/resource-quota.", pattern: /browserType.connect: Timeout .* exceeded/i, type: TestErrorType.Scalable, }, diff --git a/sdk/playwrighttesting/microsoft-playwright-testing/src/common/messages.ts b/sdk/playwrighttesting/microsoft-playwright-testing/src/common/messages.ts index 33910cd5485d..803fb051a496 100644 --- a/sdk/playwrighttesting/microsoft-playwright-testing/src/common/messages.ts +++ b/sdk/playwrighttesting/microsoft-playwright-testing/src/common/messages.ts @@ -7,11 +7,9 @@ export const ServiceErrorMessageConstants = { NO_SERVICE_URL_ERROR: "The value for the PLAYWRIGHT_SERVICE_URL variable is not set correctly. Please verify the URL and try again.", INVALID_MPT_PAT_ERROR: - "The authentication token provided is invalid. Please check the token and try again.", - EXPIRED_MPT_PAT_ERROR: "Your authentication token has expired. Please create a new token.", + "The authentication token provided is invalid. Check the token and try again.", + EXPIRED_MPT_PAT_ERROR: "Your authentication token has expired. Create a new token.", INVALID_GLOBAL_FUNCTION: "file must export a single function", - DUPLICATE_REPORTER: - "Another reporter with the same name already exists. Please resolve the duplicate and try again.", INVALID_PLAYWRIGHT_VERSION_ERROR: - "The Playwright version you are using is not supported. Please upgrade to Playwright 1.47 or above.", + "The Playwright version you are using is not supported. See the list of supported versions at https://aka.ms/mpt/supported-versions.", };