From a3f85d31025031deaefd6cfb711a09b417b780c0 Mon Sep 17 00:00:00 2001 From: Helly Zhang <49181894+hellyzh@users.noreply.github.com> Date: Fri, 11 Oct 2024 13:57:02 +0800 Subject: [PATCH] test: update local debug task result (#12508) --- .../ui-test/localdebug/localdebug-dashboard-tab-ts.test.ts | 5 +++-- .../src/ui-test/localdebug/localdebug-dashboard-tab.test.ts | 5 +++-- packages/tests/src/utils/constants.ts | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab-ts.test.ts b/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab-ts.test.ts index 978005f085..363743fcd4 100644 --- a/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab-ts.test.ts +++ b/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab-ts.test.ts @@ -15,6 +15,7 @@ import { Timeout, LocalDebugTaskLabel, DebugItemSelect, + LocalDebugTaskResult, } from "../../utils/constants"; import { Env } from "../../utils/env"; import { it } from "../../utils/it"; @@ -49,13 +50,13 @@ describe("Local Debug Tests", function () { localDebugTestContext.testRootFolder, localDebugTestContext.appName ); - validateFileExist(projectPath, "src/index.tsx"); + validateFileExist(projectPath, "src/main.tsx"); await startDebugging(DebugItemSelect.DebugInTeamsUsingChrome); await waitForTerminal( LocalDebugTaskLabel.StartFrontend, // [BUG] warning error message block the frontend validation - "Compiled with warnings" + LocalDebugTaskResult.FrontendReady ); const teamsAppId = await localDebugTestContext.getTeamsAppId(); diff --git a/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab.test.ts b/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab.test.ts index 11d97aa3c8..52f2588a54 100644 --- a/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab.test.ts +++ b/packages/tests/src/ui-test/localdebug/localdebug-dashboard-tab.test.ts @@ -15,6 +15,7 @@ import { Timeout, LocalDebugTaskLabel, DebugItemSelect, + LocalDebugTaskResult, } from "../../utils/constants"; import { Env } from "../../utils/env"; import { it } from "../../utils/it"; @@ -49,14 +50,14 @@ describe("Local Debug Tests", function () { localDebugTestContext.testRootFolder, localDebugTestContext.appName ); - validateFileExist(projectPath, "src/index.jsx"); + validateFileExist(projectPath, "src/main.jsx"); await startDebugging(DebugItemSelect.DebugInTeamsUsingChrome); await waitForTerminal( LocalDebugTaskLabel.StartFrontend, // [BUG] warning error message block the frontend validation - "Compiled with warnings" + LocalDebugTaskResult.FrontendReady ); const teamsAppId = await localDebugTestContext.getTeamsAppId(); diff --git a/packages/tests/src/utils/constants.ts b/packages/tests/src/utils/constants.ts index ed3a23ce48..488d805815 100644 --- a/packages/tests/src/utils/constants.ts +++ b/packages/tests/src/utils/constants.ts @@ -406,6 +406,7 @@ export enum LocalDebugTaskLabel { export class LocalDebugTaskResult { static readonly FrontendSuccess = "Compiled successfully"; + static readonly FrontendReady = "ready"; static readonly StartSuccess = "started successfully"; static readonly AzuriteSuccess = "Azurite Table service is successfully"; static readonly CompiledSuccess = "Found 0 errors";