~pitti/autopilot-gtk/gtktextbuffer

« back to all changes in this revision

Viewing changes to tests/autopilot/tests/test_matching_properties.py

  • Committer: Tarmac
  • Author(s): Martin Pitt
  • Date: 2013-06-26 17:03:00 UTC
  • mfrom: (43.2.25 ap-gtk-tests)
  • Revision ID: tarmac-20130626170300-1yfj1vyv21n257xr
Add integration test suite (LP: #1083612). Fixes: https://bugs.launchpad.net/bugs/1083612.

Approved by Francis Ginther, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
 
3
 
from autopilot.testcase import AutopilotTestCase
4
 
from testtools.matchers import NotEquals
5
 
 
6
 
 
7
 
 
8
 
class PropertyMatchingTest(AutopilotTestCase):
9
 
 
10
 
    def setUp(self):
11
 
        super(PropertyMatchingTest, self).setUp()
12
 
        self.app = self.launch_test_application('gedit')
13
 
 
14
 
    def test_integer_matches(self):
15
 
        """Test property matching for integers.
16
 
 
17
 
        Find an opaque GtkWindow in Gedit.
18
 
        """
19
 
 
20
 
        opaque_window = self.app.select_many('GtkWindow', opacity=1)
21
 
        self.assertThat(opaque_window, NotEquals(None))
22
 
        
23
 
 
24
 
    def test_string_matches(self):
25
 
        """Match a string property.
26
 
 
27
 
        Find an GtkImageMenuItem named 'BookmarkOpen' in Gedit.
28
 
        """
29
 
 
30
 
        bookmark_open_item = self.app.select_single('GtkImageMenuItem',
31
 
                                                    name='BookmarkOpen')
32
 
        self.assertThat(bookmark_open_item, NotEquals(None))