1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
#
# Copyright (C) 2013, 2014 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# Authored by: Renato Araujo Oliveira Filho <renato@canonical.com>
# Nekhelesh Ramananthan <krnekhelesh@gmail.com>
"""
Tests for the Clock App, main window.
"""
from __future__ import absolute_import
from testtools.matchers import Equals
from autopilot.matchers import Eventually
from ubuntu_clock_app.tests import ClockAppTestCase
class TestClock(ClockAppTestCase):
"""Test the clock page features."""
def setUp(self):
"""This is needed to wait for the application to start.
In the testfarm, the application may take some time to show up.
"""
super(TestClock, self).setUp()
self.assertThat(
self.main_view.visible, Eventually(Equals(True)))
self.page = self.main_view.open_clock()
|