~canonical-platform-qa/ubuntu-system-settings-online-accounts/launch_fixture

« back to all changes in this revision

Viewing changes to tests/autopilot/online_accounts_ui/emulators/items.py

  • Committer: CI bot
  • Author(s): Leo Arias
  • Date: 2014-07-08 11:05:26 UTC
  • mfrom: (128.2.4 clean_tests)
  • Revision ID: ps-jenkins@lists.canonical.com-20140708110526-k86rmxqu1qn4tam6
Refactored the autopilot tests to use the page object pattern. Added the method go to add account to be used in UX tests. 
Approved by: PS Jenkins bot, PS Jenkins bot, PS Jenkins bot, Víctor R. Ruiz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /usr/bin/env python3
2
 
# -*- coding: utf-8 -*-
3
 
#
4
 
# Copyright (C) 2013 Canonical Ltd.
5
 
# Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
6
 
#
7
 
# This program is free software: you can redistribute it and/or modify it
8
 
# under the terms of the GNU General Public License version 3, as published
9
 
# by the Free Software Foundation.
10
 
 
11
 
from autopilot.introspection import CustomEmulatorBase
12
 
 
13
 
class EmulatorBase(CustomEmulatorBase):
14
 
    """A base class for all emulators within this test suite."""
15
 
 
16
 
    @property
17
 
    def center(self):
18
 
        (x, y, w, h) = self.globalRect
19
 
        return (x + w / 2, y + h / 2)