-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature-Request: Add body()
method
#57
Comments
+1 |
@jonathanadler what's your use case? |
@GabiGrin !! how are you feeling?? 😁 So yeah, actually we're using this pattern, but as I understand we need to pass "theOuterWorld" driver ourselves. |
The use-case for this is when one driver uses another driver that accepts an For instance, if we have an input component that has a tooltip, and we want to have a To put it in code, it would look like this: export const inputDriver = (wrapper: UniDriver, theOuterWorld: UniDriver) => {
const tooltipDriver = createTooltipDriver(wrapper.$('tooltipSelector').getNative(), theOuterWorld);
return {
...
getTooltipContent() {
return tooltipDriver.getContent();
}
...
}
} This means our consumers will need to create a "body" unidriver when they use our testkits. I think the In addition, these types of components usually use a portal which is outside of the wrapper element passed to the driver. |
In all platforms (adapter), there is a body.
But in each platform getting the body element is different.
Some component, render stuff to the body (Modals, Popovers with Portal), and need to expose drivers that can query the body, and abstract inner implementation.
@GabiGrin Is this legitimate?
The text was updated successfully, but these errors were encountered: