~allanlesage/+junk/reboot-instead-of-remount-ro

« back to all changes in this revision

Viewing changes to ubuntu_system_tests/helpers/scopes/apps/_app_store.py

  • Committer: Tarmac
  • Author(s): Richard Huddie
  • Date: 2016-03-09 14:35:21 UTC
  • mfrom: (348.1.8 ubuntu-system-tests)
  • Revision ID: tarmac-20160309143521-xb8knokov08ru2hk
Fixes for preview objects not found.

Approved by Omer Akram, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
19
19
#
20
20
 
21
 
from autopilot import introspection
22
 
 
23
 
from ubuntu_system_tests.helpers.autopilot import (
24
 
    get_patched_registry, validate_dbus_object)
25
 
from ubuntu_system_tests.helpers.scopes.apps import _clickscope
 
21
from ubuntu_system_tests.helpers.autopilot import validate_dbus_object
 
22
from ubuntu_system_tests.helpers.scopes.apps._cpo import GenericScopeView
26
23
from ubuntu_system_tests.helpers.unity8 import UNITY8_DASH_PATH_ROOT
27
24
 
28
25
 
29
 
class GenericScopeView(_clickscope.StoreScope):
 
26
class GenericScopeView(GenericScopeView):
30
27
 
31
28
    @classmethod
32
29
    def validate_dbus_object(cls, path, state):
34
31
            path, state, UNITY8_DASH_PATH_ROOT, b'GenericScopeView',
35
32
            objectName='dashTempScopeItem')
36
33
 
37
 
    def open_preview(self, category, app_name, *args, **kwargs):
38
 
        """Over-ride base class to import the required CPO."""
39
 
        from ubuntu_system_tests.helpers.scopes.apps import _preview
40
 
        registry = get_patched_registry(_preview.Preview, 'Preview')
41
 
        with introspection._object_registry.patch_registry(registry):
42
 
            preview = super().open_preview(category, app_name, *args, **kwargs)
43
 
        return preview
44
 
 
45
34
    def enter_search_query(self, query):
46
35
        """ Over-ride base method to fix StateNotFoundError for the search
47
36
        button