Missing testId and accessibilityId when writing UI tests in XCUItest

The test props were added correctly in react native code. After running expo prebuild -p ios,
the app runs in Xcode simulator without any problems but when writing UI tests, none of the elements have the testId and/or accessibilityId when trying to locate elements.
Anyone had a similar problem?

  • working in managed workflow
    eas-cli/0.48.2
    darwin-arm64
    node-v16.14.2