You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In v7, baseElement is no longer returned from render.
I do wonder if it would be better to just deprecate this and include a notice in the migration guide. Looking over our tests at Root, most of them seemed to be misunderstand what baseElement did anyway, and so our tests were written in a way that could never fail. For example I see a lot of cases like:
expect(baseElement).toBeEnabled()
but with v6's implementation, that would always return true -- since baseElement was a View rendered by the AppContainer and couldn't be disabled. In our internal PR migrating to v7 we replaced baseElement with the results of more specific queries and didn't have any problem.
The text was updated successfully, but these errors were encountered:
In v6, the result of calling
render
included abaseElement
property (see https://www.native-testing-library.com/docs/next/api-main#baseelement).baseElement
was the root element of the render result.In v7,
baseElement
is no longer returned fromrender
.I do wonder if it would be better to just deprecate this and include a notice in the migration guide. Looking over our tests at Root, most of them seemed to be misunderstand what
baseElement
did anyway, and so our tests were written in a way that could never fail. For example I see a lot of cases like:but with v6's implementation, that would always return true -- since baseElement was a View rendered by the AppContainer and couldn't be disabled. In our internal PR migrating to v7 we replaced baseElement with the results of more specific queries and didn't have any problem.
The text was updated successfully, but these errors were encountered: