-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keeping the read/fill interface #11
Comments
@mfalesni your suggestion on how to handle such widgets? |
Let it accept and return the dictionary with selected/all keys and decide based upon that? Of course you can have a special form of fill that can do a specific thing, like adding, but whatever read returns should be digestible by fill. |
Won't usability suffer from that? Right now from tests level we call it with 2 values - one is operation to perform, second is element to perform action to. Pretty clear. With 2 lists person who writes the test should know about existence of 2 lists and should decide to which list to include element - either 'available' or 'selected'. Which is not descriptive btw: |
The basic idea is that read tells you what is on the screen and you tell fill what should be on the screen. One of the solutions may be as used in our My only concern is, that whatever |
Hmm, with
Would something like this work for everybody? |
@jhutar I think they do not want to bother with all the values and want to be able to just tell it "Hey, add this one". But you are right, this is how the fill would look for the general use case. Btw, @abalakh & @jhutar , it is good in such case to have the logic of reading pulled into a method or a property, so read just returns that method's result or property value and fill uses the method or property to get the value. This is somewhat cosmetic change, but it makes read not appear in logs during fill. |
I noticed that one of your widgets https://github.com/abalakh/airgun/blob/master/airgun/widgets.py#L51 does not conform to one of the concepts WT is built on.
Whatever is returned by
read()
must be acceptable byfill()
. So essentially,x.fill(x.read())
should work at any time.The text was updated successfully, but these errors were encountered: