fixed find empty string iOS, updated tests
This commit is contained in:
parent
17bdf84362
commit
05cb0184fc
@ -47,10 +47,7 @@ void findInteractions() {
|
||||
await expectLater(
|
||||
findInteractionController.findAll(find: firstSearchText),
|
||||
completes);
|
||||
if ([TargetPlatform.iOS, TargetPlatform.macOS]
|
||||
.contains(defaultTargetPlatform)) {
|
||||
expect(await findInteractionController.getSearchText(), firstSearchText);
|
||||
}
|
||||
expect(await findInteractionController.getSearchText(), firstSearchText);
|
||||
if ([TargetPlatform.android].contains(defaultTargetPlatform)) {
|
||||
await Future.delayed(Duration(seconds: 1));
|
||||
}
|
||||
@ -62,11 +59,11 @@ void findInteractions() {
|
||||
findInteractionController.findNext(forward: false), completes);
|
||||
await expectLater(findInteractionController.clearMatches(), completes);
|
||||
|
||||
const secondSearchText = "text";
|
||||
await expectLater(
|
||||
findInteractionController.setSearchText(secondSearchText), completes);
|
||||
if ([TargetPlatform.iOS, TargetPlatform.macOS]
|
||||
.contains(defaultTargetPlatform)) {
|
||||
const secondSearchText = "text";
|
||||
await expectLater(
|
||||
findInteractionController.setSearchText(secondSearchText), completes);
|
||||
await expectLater(
|
||||
findInteractionController.presentFindNavigator(), completes);
|
||||
expect(await findInteractionController.getSearchText(), secondSearchText);
|
||||
|
@ -94,7 +94,7 @@ public class FindInteractionController : NSObject, Disposable {
|
||||
if let completionHandler = completionHandler {
|
||||
completionHandler(nil, nil)
|
||||
}
|
||||
} else {
|
||||
} else if find != "" {
|
||||
let startSearch = "window.\(JAVASCRIPT_BRIDGE_NAME)._findAllAsync('\(find)');"
|
||||
webView.evaluateJavaScript(startSearch, completionHandler: completionHandler)
|
||||
}
|
||||
|
@ -1206,6 +1206,12 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
|
||||
}
|
||||
}
|
||||
|
||||
if #available(iOS 16.0, *) {
|
||||
if newSettingsMap["isFindInteractionEnabled"] != nil, settings?.isFindInteractionEnabled != newSettings.isFindInteractionEnabled {
|
||||
isFindInteractionEnabled = newSettings.isFindInteractionEnabled
|
||||
}
|
||||
}
|
||||
|
||||
scrollView.isScrollEnabled = !(newSettings.disableVerticalScroll && newSettings.disableHorizontalScroll)
|
||||
|
||||
self.settings = newSettings
|
||||
|
Loading…
x
Reference in New Issue
Block a user