#ubuntu-autopilot 2014-06-02
<veebers_> morning
#ubuntu-autopilot 2014-06-04
<veebers> morning
#ubuntu-autopilot 2014-06-05
<veebers> morning
#ubuntu-autopilot 2014-06-06
<balloons> elopio, I need to pick your brain for a minute. So I want to use the textfield emulator, but the app has defined it's own object that simply contains a textfield. How can I still use the helper?
<elopio> balloons: if autopilot sees the name of the extended class, you can also extend TextField on python. Take a look at the clock, we are doing that.
<elopio> balloons: if autopilot sees TextField even if it's extended, then you won't have to do anything. This is the most common case.
<balloons> elopio, thanks I'll take a look
<balloons> elopio, no the object is indeed the custom name
<balloons> but the base qml is still textfield
<elopio> balloons: yes, on the clock, I don't remember the name of the component.
<elopio> it's like TextFieldWithDots
<elopio> or something like that.
<balloons> elopio, ahh
<balloons> class LabelDots(toolkit_emulators.TextField):
<balloons>     """Autopilot helper for the LabelDots component."""
<balloons> brillant
<balloons> the trouble is I'm digging myself in deeper to redoing the setup for this test :-)
<elopio> that's it. kudos to the clever autopilot developers that let us play with the weird inheritance in python and in QML.
<elopio> balloons: redoing setups, I like that.
<balloons> elopio, I'm treading carefully
<balloons> It's just hard to see custom code not using the helpers
<balloons> elopio, oO.. can we not handle TextArea's?
<elopio> balloons: TextAreas I think that need a separate helper.
<balloons> elopio, it should be able to inherit much of the textfield helper
<balloons> one of my inputs is a textarea...
<balloons> see, this is why we don't travel down the rabbit hole :-)
<elopio> balloons: in QML, text area is not an extended text field.
<elopio> but yes, we can do many of the things through composition. Shouldn't be hard.
<elopio> balloons: you can convince la_juyis to implement that one :)
<balloons> elopio, ohh, I was going to do it.. hehe.. Julia is even better
<elopio> balloons: even better if you two pair-program.
<balloons> I'm going to cheat and do the same with textarea for this hahah
<elopio> :(
<balloons> elopio, indeed if you inherit the textfield emulator it works fine
<balloons> so it's cheating for my needs, but I think I can ship it
<balloons> we'll still do a proper textarea helper, and I'll comment and link to a bug for it
<balloons> elopio, https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1327354
<ubot5> Ubuntu bug 1327354 in Ubuntu UI Toolkit "TextArea needs autopilot helper" [Undecided,New]
<balloons> see, I'm not so mean!
<elopio> cgoldberg: do you know of any changes on autopilot to the pid property of the app proxy object?
#ubuntu-autopilot 2014-06-08
<veebers> morning
#ubuntu-autopilot 2015-06-02
<nik90> elopio: ping
<elopio> nik90: pong.
<nik90> elopio: hey, I am having a issue when transitioning to the ubuntu-sdk-15.04 framework..it turns out that it needs minor AP adjustments that I am unable to understand how to do
<nik90> elopio: do you have time to give me a hand?
<nik90> elopio: here's the clock app MP that needs help https://code.launchpad.net/~nik90/ubuntu-clock-app/migrate-to-15.04-framework/+merge/260336
<nik90> elopio: I took a look at the music app which also seems to be doing the same transition in their MP https://code.launchpad.net/~ahayzen/music-app/refactor-bump-framework-1504/+merge/258126
<nik90> elopio: but since the clock app uses the Page layout AP test structuring, I kind of hit a dead-end to bringing the music app fix to the clock app test suite
<nik90> can you look at the changes made in the music-app MP and let me know how to implement that in the clock app tests?
<nik90> the majority of the music app AP changes seems to be in 'tests/autopilot/music_app/__init__.py'
<elopio> nik90: I don't have time now, but I know a good and nice guy who might be able to give you a hand.
<elopio> brendand: ^
<nik90> ;)
<brendand> nik90, i'll give as much time as i have :)
<brendand> nik90, are the errors you get in jenkins?
<nik90> brendand: no these are local AP failures..which complain that "TestClock" has no attribute 'main_view'
<brendand> nik90, ok
<nik90> brendand: turns out that there were some sdk changes made to MainView which in turn require AP adjustments..that's where I am struggling atm
<nik90> brendand: the music app https://code.launchpad.net/~ahayzen/music-app/refactor-bump-framework-1504/+merge/258126 MP should show the changes that were made
<nik90> I am unable to bring that over to the clock app
<brendand> nik90, right
<brendand> elopio, wasn't there some work done on that?
<brendand> elopio, or it's incomplete?
<brendand> nik90, so you're testing locally on vivid
<elopio> brendand: what I suppose is happening is that the class for TestClock no longer matches the custom proxy object
<elopio> so autopilot is using the default.
<nik90> brendand: yes testing locally on vivid
<nik90> autopilot.exceptions.StateNotFoundError: Object not found with name 'MainView' is the error that I see after running the test now
<brendand> elopio, no i rather suspect the main_view property doesn't get initialised any more as the object name changed
<brendand> nik90, yeah that would do it
<brendand> nik90, as it's MainView12
<elopio> brendand: that could be.
<nik90> brendand: true..when I look at the music app MP log, ahayzen did try changing it to MainView12, but he later reverted that to something else after a comment from balloons (as seen in the MP)
<nik90> https://code.launchpad.net/~ahayzen/music-app/refactor-bump-framework-1504/+merge/258126/comments/644092
<brendand> nik90, does your mainView have an objectName?
<brendand> nik90, use that
<brendand> hmmm, but then it's still not going to match your CPO...
<nik90> I changed it to self.main_view = self.app.wait_select_single(objectName="clockMainView")
<brendand> i wonder why we didn't hit this yet with system apps
<brendand> maybe they don't use the SDK in the same way?
<brendand> nik90, what happens then?
<nik90> brendand: same error..I made the changes to only emulators.py
<nik90> However there is a function def main_view(self): in __init__.py that I am not sure how to change
<brendand> nik90, you could change it in the same way and it will get rid of that error at least
<brendand> but, won't solve the whole thing
<brendand> problem is AP doesn't understand the version part of the class name
<brendand> i have to look at what music_app is doing
<nik90> brendand: I did try that .. but the error output is http://paste.ubuntu.com/11522278/
<nik90> since previously that function had one statement which was self.app.wait_select_single(emualtors.MainView)
<nik90> I replaced emulators.MainView with objectName="clockMainView"
<brendand> nik90, not just 'clock'?
<brendand> MainView {
<brendand>     id: clockApp
<brendand>     // Property to store the state of an application (active or suspended)
<brendand>     property bool applicationState: Qt.application.active
<brendand>     // objectName for functional testing purposes (autopilot-qt5)
<brendand>     objectName: "clock"
<nik90> brendand: I changed the objectname in the qml code to clockMainView to better distuinguish it for now
<brendand> nik90, seems to be matching multiple things
<nik90> brendand: what do you mean?
<brendand> nik90, the error: More than one custom proxy class matches this object
<nik90> brendand: I suspect that because we use the same objectName in __init__.py and emulators.py
#ubuntu-autopilot 2015-06-03
<nik90> brendand: did you have any luck/ideas on the clock app AP issue? I tried a couple of things later yesterday but couldn't figure it out..the class structure is making it a bit more complicated.
<brendand> nik90, unfortunately the most i can do is look at whatever errors you're getting and give suggestions, i don't really have the bandwidth to actively look for solutions
<brendand> nik90, i did escalate those AP bugs though, but in the meantime a workaround will be required
<brendand> nik90, if you forward me code and logs i'll gladly look at them
<nik90> brendand: np, I will try some other stuff to fix it
<nik90> ack.
