~diegosarmentero/click-update-manager/settings-link

« back to all changes in this revision

Viewing changes to tests/autopilot/UpdateManager/main/test_main.py

  • Committer: Tarmac
  • Author(s): Diego Sarmentero
  • Date: 2013-09-23 16:35:55 UTC
  • mfrom: (16.2.4 click-update-manager)
  • Revision ID: tarmac-20130923163555-qew0xpbfedup6aav
- Adding tests for the qml components and missing icon. Fixes: https://bugs.launchpad.net/bugs/1228307.

Approved by PS Jenkins bot, Manuel de la Peña, Roberto Alsina.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
 
2
 
 
3
"""Tests for PageUpdate"""
 
4
 
 
5
import os
 
6
 
 
7
from autopilot.matchers import Eventually
 
8
from textwrap import dedent
 
9
from testtools.matchers import Is, Not, Equals
 
10
from testtools import skip
 
11
 
 
12
from UpdateManager import UbuntuTouchAppTestCase
 
13
 
 
14
 
 
15
class PageUpdateTests(UbuntuTouchAppTestCase):
 
16
    """Page Update Tests."""
 
17
 
 
18
    test_qml_file = "%s/%s.qml" % (os.path.dirname(os.path.realpath(__file__)),"../../../../updatemanager")
 
19
 
 
20
    def test_UI_is_loaded(self):
 
21
        """Must be able to see the mainview."""
 
22
 
 
23
        mainView = self.get_mainview()
 
24
        self.assertThat(mainView.visible, Eventually(Equals(True)))
 
25
 
 
26
 
 
27
    def test_loading_disappear(self):
 
28
        """Check the loading indicator disappears"""
 
29
 
 
30
        loading = self.get_object(objectName="loadingIndicator")
 
31
        self.assertThat(loading.visible, Eventually(Equals(False)))