Code review comment for lp:~pkunal-parmar/ubuntu-calendar-app/today

Revision history for this message
Michael Zanetti (mzanetti) wrote :

> There is some bug with AutoPilot system, which prevent testcase from getting
> any object property from QML.
> like
> readonly property var currentDayStart: intern.currentDayStart
>
> Error I got is
> AttributeError: Class 'MonthView' has no attribute 'currentDayStart'.
>
> I talked with balloons and om26er and they will be trying to resolve the bug,
> but untill that is resolved, I am not able to create any meaning full test for
> this feature.

Well, its not really a bug. More like a limitation because we are mixing C++ and python through a D-Bus interface and there is no straigt forward conversion between a QDateTime, through an integer and then to a python datetime. I'm exploring into solution for this though, maybe we can prefix it somehow internally to make python-autopilot recognize it as a datetime and automaticaly convert it.

Anyways, to still write some tests in the meantime you can use things like this:

QtObject {
  id: intern
  property monthStart: monthView.monthStart.valueOf()
}

That would give you a monthStart property containing an integer (unix timestamp) which you can convert back to a datetime object in python.

« Back to merge proposal