leancodepl / patrol

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

isPermissionDialogVisible Only works with the app language being English. #2303

Open duchv-selex opened 2 months ago

duchv-selex commented 2 months ago

Use case

When my app is support multiple language. isPermissionDialogVisible can't execute because patrol execute text by English

Proposal

I think we should has a optional for execute when the app is other language without English

zoskar commented 2 months ago

Hi @duchv-selex ~Could you provide some more details? I've just rechecked this test from example app https://github.com/leancodepl/patrol/blob/master/packages/patrol/example/integration_test/main_test.dart#L51 on both iOS and Android simulators with Polish language set up (popups were correctly with Polish texts) and this test passed.~

zoskar commented 2 months ago

@duchv-selex Actually, I was wrong, sorry for that. What I described above works on Android. If you try to use those native commands (isPermissionDialogVisible etc.) on iOS, they will only work with English. I will add feature label (feature request).

For now you can only work with those permissions on iOS in other languages by using String selectors.

jBorkowska commented 2 months ago

For now you can only work with those permissions on iOS in other languages by using String selectors.

@duchv-selex Remember to set appId argument to com.apple.springboard on iOS! :)

duchv-selex commented 2 months ago

@jBorkowska I don't really understand what you mean.

duchv-selex commented 2 months ago

@zoskar Thank you for you support.

zoskar commented 2 months ago

@duchv-selex The comment above suggested, that if you want to implement tapping on your permission dialog in other language on iOS, you would need sth like:

    await $.native.tap(
      Selector(text: 'your text'),
      appId: 'com.apple.springboard',
    );