~abreu-alexandre/qtcreator-plugin-ubuntu/fix-html5-app-launch-1504

« back to all changes in this revision

Viewing changes to share/qtcreator/templates/wizards/ubuntu/backend-app-qmake/appName/tests/autopilot/displayName/tests/test_main.py

  • Committer: CI Train Bot
  • Author(s): nskaggs, Nicholas Skaggs
  • Date: 2015-06-16 14:47:50 UTC
  • mfrom: (391.1.14 update-qml-autopilot)
  • Revision ID: ci-train-bot@canonical.com-20150616144750-yh4z1evebap3sty2
Update qml based templates to best practicies
Approved by: Zoltan Balogh, PS Jenkins bot, Max Brustkern

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
from autopilot.matchers import Eventually
 
4
from testtools.matchers import Equals
 
5
from %ProjectName% import tests
 
6
 
 
7
 
 
8
class MainViewTestCase(tests.BaseTestCase):
 
9
    """Tests for the mainview"""
 
10
 
 
11
    def setUp(self):
 
12
        super(MainViewTestCase, self).setUp()
 
13
 
 
14
    def test_click_button(self):
 
15
        # Find and click the button
 
16
        button = self.app.main_view.get_button()
 
17
        self.app.pointing_device.click_object(button)
 
18
 
 
19
        # Make an assertion about what should happen
 
20
        label = self.app.main_view.get_label()
 
21
        self.assertThat(label.text, Eventually(Equals('..world!')))
 
 
b'\\ No newline at end of file'