From 9bc98729154aa7642424868c70504714a20dfaad Mon Sep 17 00:00:00 2001 From: Paul Fitzpatrick Date: Sat, 18 Sep 2021 01:54:29 -0400 Subject: [PATCH] (core) update tests after jenkins engine freshening Summary: After updating the jenkins test workers, chrome and python changes resulting in a scattering of test failures. * Clicking on an icon that has been transformed to mirror around the y axis fails via selenium. Not sure why. "Fixed" by asking the browser to do the click. * There was a small change from python 3.9.6 to python 3.9.7 that affected completion of property attributes. Worker updates here: https://phab.getgrist.com/D3029 Test Plan: these tests Reviewers: alexmojaki Reviewed By: alexmojaki Differential Revision: https://phab.getgrist.com/D3031 --- sandbox/grist/test_completion.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/sandbox/grist/test_completion.py b/sandbox/grist/test_completion.py index 03ab23e8..17cdc9e2 100644 --- a/sandbox/grist/test_completion.py +++ b/sandbox/grist/test_completion.py @@ -212,9 +212,14 @@ class TestCompletion(test_engine.EngineTestCase): def test_suggest_lookup_methods(self): # Should suggest lookup formulas for tables. - self.assertEqual(self.engine.autocomplete("Address.", "Students", "firstName", self.user), [ - ('Address.Record', '', True), - ('Address.RecordSet', '', True), + address_dot_completion = self.engine.autocomplete("Address.", "Students", "firstName", self.user) + # In python 3.9.7, rlcompleter stops adding parens for property attributes, + # see https://bugs.python.org/issue44752 - seems like a minor issue, so leave test + # tolerant. + property_aware_completer = address_dot_completion[0] == 'Address.Record' + self.assertEqual(address_dot_completion, [ + 'Address.Record' if property_aware_completer else ('Address.Record', '', True), + 'Address.RecordSet' if property_aware_completer else ('Address.RecordSet', '', True), 'Address.all', ('Address.lookupOne', '(colName=, ...)', True), ('Address.lookupRecords', '(colName=, ...)', True),