From 3ec304f1c8e645d0706652e0a50e0ef48c4f2330 Mon Sep 17 00:00:00 2001 From: EmmaYuan1015 Date: Thu, 28 May 2026 11:25:56 +0800 Subject: [PATCH 1/2] fix(smoke): assert action bar wait result to avoid false positives --- test/smoke/suites/actionBar.test.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/smoke/suites/actionBar.test.ts b/test/smoke/suites/actionBar.test.ts index f6ee4cc07..ec77303c9 100644 --- a/test/smoke/suites/actionBar.test.ts +++ b/test/smoke/suites/actionBar.test.ts @@ -58,7 +58,7 @@ export function startActionBarTests(): void { ); await actionButton.click(); - await WaitHelper.waitIsTrue(async () => { + const isPackagerStateUpdated = await WaitHelper.waitIsTrue(async () => { const packager = await ComponentHelper.getReactNativePackager(); const currentState = await packager.getAttribute("aria-label"); try { @@ -71,6 +71,11 @@ export function startActionBarTests(): void { return false; } }); + + assert.ok( + isPackagerStateUpdated, + "Packager state did not update to include 'primitive-square' within timeout", + ); }); }); } From fee7642846040b6345fcfe636ddb9130e0b335f2 Mon Sep 17 00:00:00 2001 From: EmmaYuan1015 Date: Tue, 9 Jun 2026 17:53:46 +0800 Subject: [PATCH 2/2] test(smoke): optimize action bar wait assertion flow --- test/smoke/suites/actionBar.test.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/smoke/suites/actionBar.test.ts b/test/smoke/suites/actionBar.test.ts index 891b8b6b6..2f5e17574 100644 --- a/test/smoke/suites/actionBar.test.ts +++ b/test/smoke/suites/actionBar.test.ts @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. -import { Page } from "playwright"; import { SmokeTestLogger } from "./helper/smokeTestLogger"; import { app, screenshots } from "./main"; import { ElementHelper } from "./helper/elementHelper"; @@ -12,9 +11,9 @@ import assert = require("assert"); export function startActionBarTests(): void { describe("ActionBarTest", () => { - async function initApp(): Promise { + async function initApp(): Promise { await app.launch(); - return app.getMainPage(); + await app.getMainPage(); } async function dispose(this: Mocha.Context): Promise { @@ -57,7 +56,6 @@ export function startActionBarTests(): void { Element.debugActionItemButtonSelector, ); await actionButton.click(); - await ComponentHelper.waitPackagerStateIncludes( "primitive-square", TimeoutConstants.PACKAGER_STATE_TIMEOUT,