1
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
3
"""Tests for the Hello World"""
5
from autopilot.matchers import Eventually
6
from testtools.matchers import Equals
11
class MainViewTestCase(qmltest.ClickAppTestCase):
12
"""Generic tests for the Hello World"""
14
def test_initial_label(self):
15
app = self.launch_application()
16
label = app.main_view.select_single(objectName='label')
17
self.assertThat(label.text, Equals('Hello..'))
19
def test_click_button_should_update_label(self):
20
app = self.launch_application()
21
button = app.main_view.select_single(objectName='button')
22
app.pointing_device.click_object(button)
23
label = app.main_view.select_single(objectName='label')
24
self.assertThat(label.text, Eventually(Equals('..world!')))