Package: dogtail Version: 0.9.11-5 Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu focal ubuntu-patch
Heya, We noticed via Ubuntu that dogtail fails to build / test once gedit is updated, because it's testing for a part of the UI that doesn't exist in this version. I just submitted this to upstream - would be nice if you could upload to Debian too. I wrote it in such a way that it should work with old and new gedit, so should be safe to upload now. Thanks! -- Iain Lane [ i...@orangesquash.org.uk ] Debian Developer [ la...@debian.org ] Ubuntu Developer [ la...@ubuntu.com ]
diff -Nru dogtail-0.9.11/debian/patches/0001-test_tree-Move-test_unicode_char_-to-use-a-different.patch dogtail-0.9.11/debian/patches/0001-test_tree-Move-test_unicode_char_-to-use-a-different.patch --- dogtail-0.9.11/debian/patches/0001-test_tree-Move-test_unicode_char_-to-use-a-different.patch 1970-01-01 01:00:00.000000000 +0100 +++ dogtail-0.9.11/debian/patches/0001-test_tree-Move-test_unicode_char_-to-use-a-different.patch 2020-02-28 13:06:44.000000000 +0000 @@ -0,0 +1,52 @@ +From 9e0c7c35d88e18b042735f2d3be831da77021df8 Mon Sep 17 00:00:00 2001 +From: Iain Lane <i...@orangesquash.org.uk> +Date: Fri, 28 Feb 2020 12:34:45 +0000 +Subject: [PATCH] test_tree: Move test_unicode_char_* to use a different UI + element +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In gedit 3.35, the "Open" button was re-designed to no longer have the +"Other Documents…" button inside it. + +Move to testing the (hamburger) menu button instead, as it has an item +"Find and Replace…" which we can look for instead. This works on +pre-3.35 gedit too. + +Forwarded: https://gitlab.com/dogtail/dogtail/-/merge_requests/19 +--- + tests/test_tree.py | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/tests/test_tree.py b/tests/test_tree.py +index 46f276c..8646380 100644 +--- a/tests/test_tree.py ++++ b/tests/test_tree.py +@@ -875,18 +875,18 @@ class TestUnicodeNames(unittest.TestCase): + self.app = dogtail.tree.root.application('gedit') + + def test_unicode_char_in_name(self): +- self.app.child('Open', roleName='toggle button').click() ++ self.app.child('Menu', roleName='toggle button').click() + unicode_button = None +- unicode_button = self.app.child(name=u'Other Documents…', roleName='push button') ++ unicode_button = self.app.child(name=u'Find and Replace…', roleName='push button') + assert unicode_button is not None + + def test_unicode_char_in_name_click(self): +- self.app.child('Open', roleName='toggle button').click() +- unicode_button = self.app.child(name=u'Other Documents…', roleName='push button') ++ self.app.child('Menu', roleName='toggle button').click() ++ unicode_button = self.app.child(name=u'Find and Replace…', roleName='push button') + unicode_button.click() + dialog = None + try: +- dialog = self.app.child(name=u'Open', roleName='file chooser') ++ dialog = self.app.child(name=u'Find and Replace', roleName='dialog') + except dogtail.tree.SearchError: + self.fail() + assert dialog is not None +-- +2.20.1 + diff -Nru dogtail-0.9.11/debian/patches/gedit_3.34 dogtail-0.9.11/debian/patches/gedit_3.34 --- dogtail-0.9.11/debian/patches/gedit_3.34 2019-09-13 18:50:52.000000000 +0100 +++ dogtail-0.9.11/debian/patches/gedit_3.34 2020-02-28 13:08:18.000000000 +0000 @@ -8,11 +8,11 @@ It was renamed into org.gnome.gedit in gedit 3.34. -diff --git a/tests/test_tree.py b/tests/test_tree.py -index 46f276c..ab2b238 100644 +Index: b/tests/test_tree.py +=================================================================== --- a/tests/test_tree.py +++ b/tests/test_tree.py -@@ -872,7 +872,10 @@ class TestUnicodeNames(unittest.TestCase): +@@ -872,7 +872,10 @@ dogtail.config.config.searchCutoffCount = 3 import dogtail.utils self.pid = dogtail.utils.run('gedit') @@ -23,4 +23,4 @@ + self.app = dogtail.tree.root.application('gedit') def test_unicode_char_in_name(self): - self.app.child('Open', roleName='toggle button').click() + self.app.child('Menu', roleName='toggle button').click() diff -Nru dogtail-0.9.11/debian/patches/series dogtail-0.9.11/debian/patches/series --- dogtail-0.9.11/debian/patches/series 2019-09-13 18:50:52.000000000 +0100 +++ dogtail-0.9.11/debian/patches/series 2020-02-28 13:08:18.000000000 +0000 @@ -1,3 +1,4 @@ +0001-test_tree-Move-test_unicode_char_-to-use-a-different.patch python3_vs_python2 0003-desktop_file.patch fix-icon-path-check.patch