FloatingPanel icon indicating copy to clipboard operation
FloatingPanel copied to clipboard

Had problem of dismiss floatingpanel controller in UITesting

Open oddukgi opened this issue 2 years ago • 2 comments

Description

I just show on bottom sheet using XCUIApplication. When bottomsheet show on, scrolling little. And then i want to touch on view, view can't detect. Is there any way to detect view for hiding bottom sheet?

Expected behavior

Actual behavior

Steps to reproduce

Code example that reproduces the issue

    func test_TermsAndService() {
 
       let app = XCUIApplication()
        let mainElement = app.windows.children(matching: .other).element.children(matching: .other).element
        let childElement = mainElement.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element.children(matching: .other).element

//  touch right arrow button and show bottomsheet
        let termsAndServiceBtn = childElement.children(matching: .other).element.children(matching: .other).element(boundBy: 3).children(matching: .other).element(boundBy: 0).buttons["ic caretGrey"]
        termsAndServiceBtn.tap()
//        let webViewsQuery = app.webViews.webViews.webViews
        
        // Scroll view on half
        let relativeTouchPoint = app.coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5))
        let relativeOffset = app.coordinate(withNormalizedOffset: CGVector(dx: 0, dy: -1))
        relativeTouchPoint.press(forDuration: 0, thenDragTo: relativeOffset)

      // TODO: when touch view, hide bottom sheet

    }

How do you display panel(s)? Present modally

How many panels do you displays? 1

Environment

Library version 2.5.2

Installation method

  • CocoaPods

iOS version(s) 15.2

Xcode version 13.2.1

oddukgi avatar Mar 30 '22 02:03 oddukgi

Which view are not able to detect a touch?

scenee avatar Apr 02 '22 12:04 scenee

Touch area is outside of bottomsheet.

main

oddukgi avatar Apr 03 '22 08:04 oddukgi