SquishTests: Avoid using occurrence value for SideDiffEditorWidgets

Change-Id: I7c519347a25b0c541b019dd1cae65df4a74c8826
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Robert Löhning
2024-04-22 13:00:52 +02:00
parent 457488a106
commit ec33fc0476
3 changed files with 6 additions and 6 deletions

View File

@@ -153,8 +153,8 @@
:Qt Creator_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Core::OutputWindow {type='Core::OutputWindow' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::CppEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_CppEditor::Internal::CPPEditorWidget {type='CppEditor::CppEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_DiffEditor::Internal::DescriptionEditorWidget {type='DiffEditor::Internal::DescriptionEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_DiffEditor::Internal::DescriptionEditorWidget {type='DiffEditor::Internal::DescriptionEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_DiffEditor::SideDiffEditorWidget {type='DiffEditor::Internal::SideDiffEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_DiffEditor::SideDiffEditorWidgetChanged {type='DiffEditor::Internal::SideDiffEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' x~='[1-9][0-9]*'}
:Qt Creator_DiffEditor::SideDiffEditorWidget2 {occurrence='2' type='DiffEditor::Internal::SideDiffEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_DiffEditor::SideDiffEditorWidgetOriginal {type='DiffEditor::Internal::SideDiffEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow' x='0'}
:Qt Creator_FilenameQComboBox {leftWidget=':Qt Creator.DragDoc_QToolButton' type='QComboBox' unnamed='1' visible='1'} :Qt Creator_FilenameQComboBox {leftWidget=':Qt Creator.DragDoc_QToolButton' type='QComboBox' unnamed='1' visible='1'}
:Qt Creator_Find::Internal::SearchResultTreeView {type='Core::Internal::SearchResultTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Find::Internal::SearchResultTreeView {type='Core::Internal::SearchResultTreeView' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}
:Qt Creator_Git::Internal::GitEditor {type='Git::Internal::GitEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'} :Qt Creator_Git::Internal::GitEditor {type='Git::Internal::GitEditorWidget' unnamed='1' visible='1' window=':Qt Creator_Core::Internal::MainWindow'}

View File

@@ -35,7 +35,7 @@ def main():
test.verify(" files changed, 229938 insertions(+)" in commitDetails, test.verify(" files changed, 229938 insertions(+)" in commitDetails,
"Summary in details view?") "Summary in details view?")
clickButton(waitForObject(":Select a Git Commit.Show_QPushButton")) clickButton(waitForObject(":Select a Git Commit.Show_QPushButton"))
changedEdit = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidget") changedEdit = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidgetChanged")
waitFor("len(str(changedEdit.plainText)) > 0 and " waitFor("len(str(changedEdit.plainText)) > 0 and "
"str(changedEdit.plainText) != 'Waiting for data...'", 40000) "str(changedEdit.plainText) != 'Waiting for data...'", 40000)
diffPlainText = str(changedEdit.plainText) diffPlainText = str(changedEdit.plainText)

View File

@@ -105,8 +105,8 @@ def verifyClickCommit():
for i in range(1, 3): for i in range(1, 3):
if not __clickCommit__(i): if not __clickCommit__(i):
continue continue
changed = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidget") changed = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidgetChanged")
original = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidget2") original = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidgetOriginal")
waitFor('str(changed.plainText) != "Waiting for data..." ' waitFor('str(changed.plainText) != "Waiting for data..." '
'and str(original.plainText) != "Waiting for data..."', 5000) 'and str(original.plainText) != "Waiting for data..."', 5000)
# content of diff editors is merge of modified files # content of diff editors is merge of modified files
@@ -202,7 +202,7 @@ def main():
type(gitEditor, "<Right>") type(gitEditor, "<Right>")
rect = gitEditor.cursorRect(gitEditor.textCursor()) rect = gitEditor.cursorRect(gitEditor.textCursor())
mouseClick(gitEditor, rect.x+rect.width/2, rect.y+rect.height/2, 0, Qt.LeftButton) mouseClick(gitEditor, rect.x+rect.width/2, rect.y+rect.height/2, 0, Qt.LeftButton)
changed = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidget") changed = waitForObject(":Qt Creator_DiffEditor::SideDiffEditorWidgetChanged")
waitFor('str(changed.plainText) != "Waiting for data..."', 5000) waitFor('str(changed.plainText) != "Waiting for data..."', 5000)
test.compare(str(changed.plainText), "Retrieving data failed.", test.compare(str(changed.plainText), "Retrieving data failed.",
"Showing an invalid commit can't succeed but Creator survived.") "Showing an invalid commit can't succeed but Creator survived.")