[web] - fix text editing integration tests for new DOM structure (#124299)

[web] - fix text editing integration tests for new DOM structure
This commit is contained in:
htoor3 2023-04-10 13:40:18 -05:00 committed by GitHub
parent bf0bdacb29
commit 1a98273af2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,13 @@ List<Node> findElements(String selector) {
);
}
// TODO(htoor3): Remove shadowRoot selectors once DOM structure PR is merged.
final Element? flutterView = document.querySelector('flutter-view');
if(flutterView != null){
return flutterView.querySelectorAll(selector);
}
final ShadowRoot? shadowRoot = glassPane.shadowRoot;
return shadowRoot != null
? shadowRoot.querySelectorAll(selector)