This restriction is being enforced by locker service with details on why described in the linked post already.
In context of testing, I believe its actually saving us from writing brittle tests which could fail in future (maintenance cost) as the components belonging to other namespaces evolve (DOM shape is not part of API/interface). That said, I do agree that it may impact the upfront cost by having component/test author think harder about asserts.
For Example: What does your code/component do that results in component from another namespace hide an element it was rendering. May be we could focus on having the test assert on the action taken by your code.
I need to find if a
How else do I do such tests?
This restriction is being enforced by locker service with details on why described in the linked post already.
In context of testing, I believe its actually saving us from writing brittle tests which could fail in future (maintenance cost) as the components belonging to other namespaces evolve (DOM shape is not part of API/interface). That said, I do agree that it may impact the upfront cost by having component/test author think harder about asserts.
For Example: What does your code/component do that results in component from another namespace hide an element it was rendering. May be we could focus on having the test assert on the action taken by your code.