Skip to content

chore(core): updated layout tests to wait for native layer layout#11143

Merged
NathanWalker merged 1 commit intoNativeScript:mainfrom
CatchABus:chore/automated-test-changes
Mar 19, 2026
Merged

chore(core): updated layout tests to wait for native layer layout#11143
NathanWalker merged 1 commit intoNativeScript:mainfrom
CatchABus:chore/automated-test-changes

Conversation

@CatchABus
Copy link
Contributor

@CatchABus CatchABus commented Mar 19, 2026

PR Checklist

What is the current behavior?

Right now, a couple of iOS automated layout tests are randomly failing.
The problem seems to be the timing as core does not expect for the native layout to complete. In the past, we attempted to get rid of the problem using OS version checks but that doesn't seem to be 100% accurate.

What is the new behavior?

Check if UIView layer is still marked as layout dirty before proceeding. This will give the tests enough time to run properly.
I'm not sure if it's the best approach, we could definitely force the layout to finish earlier using layoutIfNeeded but I think it's also good to make use of the TKUnit waitUntilReady call.

@nx-cloud
Copy link

nx-cloud bot commented Mar 19, 2026

View your CI Pipeline Execution ↗ for commit 8c50286

Command Status Duration Result
nx test apps-automated -c=ios ✅ Succeeded 2s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-19 17:14:10 UTC

@NathanWalker NathanWalker merged commit 80f3120 into NativeScript:main Mar 19, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants