diff --git a/apps/automated/src/ui/image/image-tests.ts b/apps/automated/src/ui/image/image-tests.ts index 20e129e235..50edc44da2 100644 --- a/apps/automated/src/ui/image/image-tests.ts +++ b/apps/automated/src/ui/image/image-tests.ts @@ -268,10 +268,8 @@ export const test_SettingImageSourceWhenSizedToParentDoesNotRequestLayout = ios( let mainPage = helper.getCurrentPage(); mainPage.content = host; - const nativeHostView = host.nativeViewProtected as UIView; - - // Check if native view layer is still marked as dirty before proceeding - TKUnit.waitUntilReady(() => host.isLoaded && nativeHostView?.layer && !nativeHostView.layer.needsLayout()); + // Check if view is loaded and layout is valid + TKUnit.waitUntilReady(() => host.isLoaded && host.isLayoutValid); let called = false; image.requestLayout = () => (called = true); @@ -290,10 +288,8 @@ export const test_SettingImageSourceWhenFixedWidthAndHeightDoesNotRequestLayout let mainPage = helper.getCurrentPage(); mainPage.content = host; - const nativeHostView = host.nativeViewProtected as UIView; - - // Check if native view layer is still marked as dirty before proceeding - TKUnit.waitUntilReady(() => host.isLoaded && nativeHostView?.layer && !nativeHostView.layer.needsLayout()); + // Check if view is loaded and layout is valid + TKUnit.waitUntilReady(() => host.isLoaded && host.isLayoutValid); let called = false; image.requestLayout = () => (called = true); diff --git a/apps/automated/src/ui/label/label-tests.ts b/apps/automated/src/ui/label/label-tests.ts index 9696aca3fe..508e0f7d87 100644 --- a/apps/automated/src/ui/label/label-tests.ts +++ b/apps/automated/src/ui/label/label-tests.ts @@ -602,10 +602,8 @@ export class LabelTest extends testModule.UITest