mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-30 10:36:35 +02:00
16 lines
428 B
TypeScript
16 lines
428 B
TypeScript
|
import { screen, waitFor } from '@testing-library/react-native';
|
||
|
|
||
|
const getWebViewWindowById = async (id: string): Promise<Window> => {
|
||
|
const webviewContent = await screen.findByTestId(id);
|
||
|
expect(webviewContent).toBeVisible();
|
||
|
|
||
|
await waitFor(() => {
|
||
|
expect(!!webviewContent.props.window).toBe(true);
|
||
|
});
|
||
|
|
||
|
const webviewWindow = webviewContent.props.window;
|
||
|
return webviewWindow;
|
||
|
};
|
||
|
|
||
|
export default getWebViewWindowById;
|