Skip to content
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

ExpandableOverlay testkit driver #2917

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

nitzanyiz
Copy link
Contributor

Description

Testkit driver for the ExpandableOverlay.

Changelog

None

Additional info

None

@nitzanyiz nitzanyiz marked this pull request as ready for review January 28, 2024 12:15
@nitzanyiz nitzanyiz added this to the Quality milestone Feb 5, 2024
import {type ComponentProps, useComponentDriver} from '../../testkit/new/Component.driver';
import {usePressableDriver} from '../../testkit/new/usePressable.driver';

type OverlayDriverType<Props extends ExpandableOverlayProps> = Props extends {useDialog: true}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to remove the types

testID: `${testID}.overlay`
}) as OverlayDriverType<Props>;

const getOverlay = () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably return isVisible and not the implementation detials

driver.press();
expect(driver.getOverlay().getModal().isVisible()).toBeTruthy();
});
const universe = 'Hello Universe';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not put this at the top of the file?

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.

None yet

2 participants