diff options
author | Robert Loehning <robert.loehning@qt.io> | 2018-04-19 18:07:52 +0200 |
---|---|---|
committer | Robert Loehning <robert.loehning@qt.io> | 2018-05-24 10:04:48 +0000 |
commit | 3fa66ca6e0f240f05a77d177dbf7cb7a6f7609db (patch) | |
tree | cd79e6f31268ab6415ef66d0bb218acbc9538cdc /tests | |
parent | 75afda1798ebea05be9be8c4c415dd910a8966c9 (diff) | |
download | qt-creator-3fa66ca6e0f240f05a77d177dbf7cb7a6f7609db.tar.gz |
Squish: Remove outdated code
Creator requires Qt >= 5.9
Change-Id: If63c12b354d8b89de3f70e8be924428812d3b2bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/objects.map | 1 | ||||
-rw-r--r-- | tests/system/suite_HELP/tst_HELP04/test.py | 49 |
2 files changed, 3 insertions, 47 deletions
diff --git a/tests/system/objects.map b/tests/system/objects.map index dc19df3739..65d95d0cd8 100644 --- a/tests/system/objects.map +++ b/tests/system/objects.map @@ -84,7 +84,6 @@ :Go to slot.Select signal_QGroupBox {name='groupBox' title='Select signal' type='QGroupBox' visible='1' window=':Go to slot_QDialog'} :Go to slot_QDialog {name='SelectSignalDialog' type='QDialog' visible='1' windowTitle='Go to slot'} :Help Widget_Help::Internal::HelpWidget {type='Help::Internal::HelpWidget' unnamed='1' visible='1' windowTitle?='Help -*'} -:Hits_QCLuceneResultWidget {aboveWidget=':Hits_QLabel' type='QCLuceneResultWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Hits_QLabel {text~='\\\\d+ - \\\\d+ of \\\\d+ Hits' type='QLabel' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Hits_QResultWidget {aboveWidget=':Hits_QLabel' type='QResultWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Kits_QtVersion_QComboBox {container=':qt_tabwidget_stackedwidget_QWidget' leftWidget=':QtVersionLabel_KitPage' type='QComboBox' unnamed='1' visible='1'} diff --git a/tests/system/suite_HELP/tst_HELP04/test.py b/tests/system/suite_HELP/tst_HELP04/test.py index 29fa60c52d..471df57378 100644 --- a/tests/system/suite_HELP/tst_HELP04/test.py +++ b/tests/system/suite_HELP/tst_HELP04/test.py @@ -93,15 +93,8 @@ def main(): # try to search empty string clickButton(waitForObject("{text='Search' type='QPushButton' unnamed='1' visible='1' " "window=':Qt Creator_Core::Internal::MainWindow'}")) - try: - # Creator built with Qt <= 5.8.0 - resultWidget = waitForObject(':Hits_QCLuceneResultWidget', 5000) - olderThan59 = True - except: - # Creator built with Qt >= 5.9.0 - resultWidget = waitForObject(':Hits_QResultWidget', 5000) - olderThan59 = False - if olderThan59 or not JIRA.isBugStillOpen(67737, JIRA.Bug.QT): + resultWidget = waitForObject(':Hits_QResultWidget', 5000) + if not JIRA.isBugStillOpen(67737, JIRA.Bug.QT): test.verify(waitFor("noMatch in " "str(resultWidget.plainText)", 2000), "Verifying if search did not match anything.") @@ -131,45 +124,9 @@ def main(): verifySelection(searchKeyword) verifyUrl(urlDictionary[searchKeyword]) else: - if olderThan59 or not JIRA.isBugStillOpen(67737, JIRA.Bug.QT): + if not JIRA.isBugStillOpen(67737, JIRA.Bug.QT): test.verify(waitFor("noMatch in " "str(resultWidget.plainText)", 1000), "Verifying if search did not match anything for: " + searchKeyword) - if olderThan59: - # advanced search - setup - clickButton(waitForObject("{text='+' type='QToolButton' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}")) - label = ("{text='%s' type='QLabel' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}") - lineEdit = ("{leftWidget=%s type='QLineEdit' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}") - labelTextsToSearchStr = {"words <B>similar</B> to:":"deploy", - "<B>without</B> the words:":"bookmark", - "with <B>exact phrase</B>:":"sql in qt", - "with <B>all</B> of the words:":"designer sql", - "with <B>at least one</B> of the words:":"printing"} - for labelText,searchStr in labelTextsToSearchStr.items(): - type(waitForObject(lineEdit % (label % labelText)), searchStr) - # advanced search - do search - clickButton(waitForObject("{text='Search' type='QPushButton' unnamed='1' visible='1' " - "window=':Qt Creator_Core::Internal::MainWindow'}")) - progressBarWait(warn=False) - # verify that advanced search results found - test.verify(waitFor("re.search('1 - 2 of 2 Hits'," - "str(findObject(':Hits_QLabel').text))", 3000), - "Verifying if 2 search results found") - resultsView = waitForObject(":Hits_QCLuceneResultWidget") - mouseClick(resultsView, 1, 1, 0, Qt.LeftButton) - type(resultsView, "<Tab>") - type(resultsView, "<Return>") - verifySelection("printing") - verifyUrl("qthelp://com.trolltech.qt.487/qdoc/overviews.html") - for i in range(2): - type(resultsView, "<Tab>") - type(resultsView, "<Return>") - verifyUrl("qthelp://com.trolltech.qt.487/qdoc/best-practices.html") - # verify if simple search is properly disabled - test.verify(not searchLineEdit.enabled, - "Verifying if simple search is not active in advanced mode.") # exit invokeMenuItem("File", "Exit") |