-
Notifications
You must be signed in to change notification settings - Fork 102
ListPopupWindow and Toast intergation #42
Comments
Hey there! Thanks a lot for your interest in our project. Take a look at the example: fun test() {
screen { list {
inRoot { isPlatformPopup() }
childAt(0) { hasText("TEST") }
} }
}
fun testToast() {
screen { toast {
inRoot { withMatcher(ToastMatcher()) }
hasText("TOAST")
} }
} |
Are you sure we're able to get list in popup? |
You can try using |
Also you can match the list by matching it's items with use of |
Well, yes. We're using ListPopupWindow which doesnt have an id on list (contains DropDownListView). So the idea is to find a popup first (the real diff is Toast is similiar story. That's why I've changed view to: |
For toast, as I said previously, you can declare a view with text matcher, for example, and then immediately apply root matcher:
This will return you the KView with view interaction inside, which already has root matcher. Regarding ListView situation, I think we should ask someone else. @cdsap @VerachadW what do you guys think on this? |
@Chesteer89 You may try to send the matcher for |
Thanks guys! Optional parameter or I'll migrate to new version after update :) Did you think about Snackbar tests? Is it possible right now or should i write my custom view + actions? |
No, right now we don't have prebuilt view classes for that, but this is good idea, to make |
I'm currently trying to achieve the same thing here with an |
Hi there! |
We added |
My understanding is that you could use:
for an autocomplete item? I'm just not quite sure how to integrate that with a |
As I recall, we have root matching.
|
Yep, but the difficulty is creating |
|
That's what I've tried, but I'm getting a |
Can you provide the dumps of layouts when you open your popup and the results of |
Also, what exact class do you use to spawn your popups? |
I'm using a custom view extending from Dumps |
I looked through the source code, and your view uses |
Tried by class name also, the issue seems to be that the view hierarchy dumped with |
Can you provide your screen class and test code where you try to access your list? |
Sorry for the delay, I didn't see the notification Screen
Test
|
Hey there!
I'm not sure that your list view is a direct descendant of platform popup view. |
Still get a |
I just noticed. |
@Unlimity yep sorry this was an extension function in our code base, just an inline reified alias to Kakao's method
|
Hm, I don't actually know how to help you now :( |
I'll create a PR for the samples directory with what I'm trying to achieve |
@Unlimity Hey! I've created a sample so you can see what I'm trying to achieve |
Sure, I'll take a look as soon as I have free time |
Hi guys!
First of all - thanks for your work!
Can you take a look on KToast and KListPopupWindow and give me some hints (maybe it's just an overkill and it could be done with KView and KListView?
https://gist.github.com/Chesteer89/767ad1b1584e2920a9758bd1dfe95b36
https://gist.github.com/Chesteer89/d6bfe7383c287935ce938e9dfa98c0a1
The text was updated successfully, but these errors were encountered: