Commit 75927dd6 authored by Vitezslav Humpa's avatar Vitezslav Humpa
Browse files

Update unittests for the newer version of gtk3-demo (3.22)

parent 449b7bf8
Pipeline #16217191 failed with stages
in 0 seconds
......@@ -272,13 +272,13 @@ class TestActions(GtkDemoTest):
self.assertEqual(focus.widget.node.text, 'hello world')
def test_custom_actions(self):
activate("CSS Theming")
self.assertEqual(focus.widget.node.text, 'CSS Theming')
activate("Combo Boxes")
self.assertEqual(focus.widget.node.text, 'Combo Boxes')
def test_blink_on_actions(self):
config.blinkOnActions = True
activate("CSS Theming")
self.assertEqual(focus.widget.node.text, 'CSS Theming')
activate("Combo Boxes")
self.assertEqual(focus.widget.node.text, 'Combo Boxes')
def test_custom_actions_button(self):
try:
......@@ -330,7 +330,7 @@ class TestActions(GtkDemoTest):
self.assertEqual(focus.widget.node.role, pyatspi.ROLE_TEXT)
def test_custom_actions_table_cell(self):
activate.tableCell("CSS Theming")
activate.tableCell("Combo Boxes")
self.assertTrue(isinstance(focus.widget.node, tree.Node))
self.assertEqual(focus.widget.node.role, pyatspi.ROLE_TABLE_CELL)
......
......@@ -84,9 +84,9 @@ class TestRawinput(GtkDemoTest):
def test_click(self):
btn = self.app.child('Builder')
self.assertFalse(btn.selected)
self.assertFalse(btn.focused)
click(btn.position[0], btn.position[1])
self.assertTrue(btn.selected)
self.assertTrue(btn.focused)
def test_press_release(self):
self.runDemo('Builder')
......
......@@ -363,7 +363,7 @@ class TestNode(GtkDemoTest):
Node.visible reflects a node property if is should be render or not
"""
self.assertTrue(self.app.child(roleName='frame').visible)
self.assertFalse(self.app.child('column', roleName='table column header').visible)
self.assertFalse(self.app.child(roleName='table column header').visible)
def test_set_visible(self):
"""
......@@ -677,7 +677,7 @@ class TestSearching(GtkDemoTest):
pred = dogtail.predicate.GenericPredicate(roleName='page tab')
# only one page tab list present since gtk3-demo 3.14
pageTabs = pageTabList[0].findChildren(pred)
self.assertEqual(len(pageTabs), 4)
self.assertEqual(len(pageTabs), 5)
def test_findChildren2_lambda(self):
"""
......@@ -685,7 +685,7 @@ class TestSearching(GtkDemoTest):
"""
pageTabList = self.app.findChildren(lambda x: x.roleName == 'page tab list')
pageTabs = pageTabList[0].findChildren(lambda x: x.roleName == 'page tab')
self.assertEqual(len(pageTabs), 4)
self.assertEqual(len(pageTabs), 5)
def test_findChildren_lambdas(self):
"""
......@@ -713,7 +713,7 @@ class TestSearching(GtkDemoTest):
self.assertTrue(texts2[1].showing)
def test_findAncestor(self):
pred = dogtail.predicate.GenericPredicate(roleName='tree table')
pred = dogtail.predicate.GenericPredicate(roleName='table cell')
child = self.app.child("Builder")
parent = child.findAncestor(pred)
self.assertIn(child, parent.children)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment