~zsombi/ubuntu-ui-toolkit/79-more-simplification

« back to all changes in this revision

Viewing changes to tests/autopilot/ubuntuuitoolkit/tests/__init__.py

  • Committer: Zsombor Egri
  • Date: 2015-02-06 07:54:50 UTC
  • mfrom: (1387.2.16 staging)
  • Revision ID: zsombor.egri@canonical.com-20150206075450-aa0ty4ysvm5yinme
staging merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
2
2
#
3
 
# Copyright (C) 2012, 2013, 2014 Canonical Ltd.
 
3
# Copyright (C) 2012-2015 Canonical Ltd.
4
4
#
5
5
# This program is free software; you can redistribute it and/or modify
6
6
# it under the terms of the GNU Lesser General Public License as published by
87
87
MainView {
88
88
    width: units.gu(48)
89
89
    height: units.gu(80)
 
90
    objectName: "mainView"
90
91
}
91
92
""")
92
93
 
133
134
 
134
135
    @property
135
136
    def main_view(self):
136
 
        return self.app.select_single(ubuntuuitoolkit.MainView)
 
137
        """
 
138
        Return the MainView of the app, selected by objectName.
 
139
 
 
140
        QML code used for testing must define the objectName
 
141
        of the MainView to be 'mainView'.
 
142
        """
 
143
        return self.app.select_single(objectName='mainView')
137
144
 
138
145
 
139
146
class FlickDirection:
182
189
 
183
190
    @property
184
191
    def main_view(self):
185
 
        return self.app.select_single(ubuntuuitoolkit.MainView)
 
192
        """
 
193
        Return the MainView of the app, selected by objectName.
 
194
 
 
195
        QML code used for testing must define the objectName
 
196
        of the MainView to be 'mainView'.
 
197
        """
 
198
        return self.app.select_single(objectName='mainView')
186
199
 
187
200
    def getOrientationHelper(self):
188
201
        orientationHelper = self.main_view.select_many(