leancodepl / patrol

Flutter-first UI testing framework. Ready for action!
https://patrol.leancode.co
Apache License 2.0
910 stars 141 forks source link

How to interact with time_picker.dart flutter library #2381

Closed itisSasha closed 2 weeks ago

itisSasha commented 1 month ago

Steps to reproduce

I'm writing an integration test for an ios flutter app where I need to open the time picker and select a time, Its a time picker dialog in ios, I can tap the time above the picker and tap the ok and cancel buttons but I cannot change the selected time for the dial.

i was thinking about using dragUntilVisible method but i am not sure how to do it and i don't know how to get the offset value either. is there anyone who can help me? if you could provider code for me it would be great.

by the way, i found the code below about using integration_test package, i don't know how to convert it to make patrol could work. ` var center = tester .getCenter(find.byKey(const ValueKey('time-picker-dial')));

await tester.tapAt(Offset(center.dx - 10, center.dy));`

Actual results

スクリーンショット 2024-10-24 12 03 44

Logs

Logs ``` ```

Patrol version

patrol: ^3.11.0 patrol_cli: ^3.2.0

Patrol Doctor output

Patrol doctor: Patrol CLI version: 3.2.0 Flutter command: flutter Flutter 3.24.3 • channel stable Android: • Program adb not found (install with export PATH="$ANDROID_HOME/platform-tools:$PATH") • Env var $ANDROID_HOME is not set. (See the link: https://developer.android.com/tools/variables#set) iOS / macOS: • Program xcodebuild found in /usr/bin/xcodebuild • Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.24.3, on macOS 14.5 23F79 darwin-arm64, locale ja-JP) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 16.0) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] IntelliJ IDEA Community Edition (version 2022.1.3) [✓] VS Code (version 1.88.1) [✓] Connected device (4 available) [✓] Network resources

• No issues found!

zoskar commented 1 month ago

Hi @itisSasha Thank you for the ticket. Since this is more of a use case question, could you please report it on Patrol Discord server (#help-needed channel)? We will try to help you there.

itisSasha commented 4 weeks ago

thanks a lot, i will move to [Patrol Discord server].

github-actions[bot] commented 1 week ago

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.