Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update test
  • Loading branch information
nyalldawson committed May 2, 2023
1 parent d4faece commit 4e2c0fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/src/python/test_qgsattributeformeditorwidget.py
Expand Up @@ -19,6 +19,7 @@
QgsDefaultSearchWidgetWrapper,
QgsGui,
QgsSearchWidgetWrapper,
QgsAttributeFormWidget,
)
from qgis.testing import start_app, unittest

Expand All @@ -38,6 +39,7 @@ def testCurrentFilterExpression(self):
wrapper = QgsGui.editorWidgetRegistry().create(layer, 0, None, parent)
af = QgsAttributeFormEditorWidget(wrapper, setup.type(), None)
af.setSearchWidgetWrapper(w)
af.setMode(QgsAttributeFormWidget.SearchMode)

# test that filter combines both current value in search widget wrapper and flags from search tool button
w.lineEdit().setText('5.5')
Expand All @@ -57,6 +59,7 @@ def testSetActive(self):
wrapper = QgsGui.editorWidgetRegistry().create(layer, 0, None, parent)
af = QgsAttributeFormEditorWidget(wrapper, setup.type(), None)
af.setSearchWidgetWrapper(w)
af.setMode(QgsAttributeFormWidget.SearchMode)

sb = af.findChild(QWidget, "SearchWidgetToolButton")
# start with inactive
Expand All @@ -83,6 +86,7 @@ def testBetweenFilter(self):
wrapper = QgsGui.editorWidgetRegistry().create(layer, 0, None, form)
af = QgsAttributeFormEditorWidget(wrapper, 'DateTime', None)
af.createSearchWidgetWrappers()
af.setMode(QgsAttributeFormWidget.SearchMode)

d1 = af.findChildren(QDateTimeEdit)[0]
d2 = af.findChildren(QDateTimeEdit)[1]
Expand Down

0 comments on commit 4e2c0fd

Please sign in to comment.