leancodepl / patrol

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

_TypeError when using waitUntilVisible on Sliver Widget #1744

Open Kendru98 opened 1 year ago

Kendru98 commented 1 year ago

Steps to reproduce

  1. Create MultiSliver widget with Key("patrolSliverBug")
  2. Run test with await $.(Key("patrolSliverBug")).waitUntilVisible();

Actual results

There is type error when patrol want to waitUntilVisible on Sliver widget e.g. MultiSliver()

Logs

Logs ![image](https://github.com/leancodepl/patrol/assets/82384301/b974feb0-b030-4944-bf8f-07fe01caab83)

Patrol version

patrol: ^2.2.5

Patrol Doctor output

Patrol Doctor output ``` Patrol CLI version: 2.1.5 Program adb found in C:\ProgramData\chocolatey\bin\adb.exe C:\Users\Kendru\AppData\Local\Android\Sdk\platform-tools\adb.exe Env var $ANDROID_HOME set to C:\Users\Kendru\AppData\Local\Android\Sdk ```

Flutter Doctor output

Flutter Doctor output ``` λ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.13.4, on Microsoft Windows [Version 10.0.19045.3448], locale pl-PL) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc2) [√] Chrome - develop for the web [√] Visual Studio - develop Windows apps (Visual Studio Community 2019 16.11.11) [√] Android Studio (version 2021.1) [√] IntelliJ IDEA Community Edition (version 2021.1) [√] VS Code (version 1.82.2) [√] Connected device (3 available) [√] Network resources • No issues found! ```
fylyppo commented 1 year ago

*Sliver, not silver

fylyppo commented 1 year ago

Probably it's not a bug, Sliver is not rendered on screen itself, so it can't be hittestable. You should find some widget which is rendered on the screen - something inside a sliver.

Kendru98 commented 1 year ago

Probably it's not a bug, Sliver is not rendered on screen itself, so it can't be hittestable. You should find some widget which is rendered on the screen - something inside a sliver.

You may be right, but Bartek says it could be a bug, so I'm just reporting it ;d

bartekpacia commented 1 year ago

I understand you're talking about MultiSliver from the sliver_tools package. Thanks for reporting.

PS For the future, please always strive to provide a minimal reproducible example, so that I can simply copy & paste code and run it to see the problem.