You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-07-16 00:14:34 +02:00
Chore: Mobile: Improve note screen tests and fix CI warning (#11126)
This commit is contained in:
@ -1,15 +1,7 @@
|
||||
import { screen, waitFor } from '@testing-library/react-native';
|
||||
import getWebViewWindowById from './getWebViewWindowById';
|
||||
|
||||
const getWebViewDomById = async (id: string): Promise<Document> => {
|
||||
const webviewContent = await screen.findByTestId(id);
|
||||
expect(webviewContent).toBeVisible();
|
||||
|
||||
await waitFor(() => {
|
||||
expect(!!webviewContent.props.document).toBe(true);
|
||||
});
|
||||
|
||||
// Return the composite ExtendedWebView component
|
||||
// See https://callstack.github.io/react-native-testing-library/docs/advanced/testing-env#tree-navigation
|
||||
return webviewContent.props.document;
|
||||
return (await getWebViewWindowById(id)).document;
|
||||
};
|
||||
|
||||
export default getWebViewDomById;
|
||||
|
Reference in New Issue
Block a user