From fe34bf5c1c4287865abec0c6ac5d2f2bafd3fabb Mon Sep 17 00:00:00 2001
From: Robert Loehning <robert.loehning@theqtcompany.com>
Date: Thu, 18 Jun 2015 10:59:54 +0200
Subject: [PATCH] Squish: Update tst_git_clone

Change-Id: I5af8398893ac89f56245d67978ca4c1df6fce009
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
---
 tests/system/objects.map                       | 15 +++++----------
 tests/system/suite_tools/tst_git_clone/test.py | 10 +++++-----
 2 files changed, 10 insertions(+), 15 deletions(-)

diff --git a/tests/system/objects.map b/tests/system/objects.map
index a49bfbc6d8f..cfbffacf8fd 100644
--- a/tests/system/objects.map
+++ b/tests/system/objects.map
@@ -94,13 +94,10 @@
 :FormEditorStack_qdesigner_internal::FormWindow	{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::FormWindow' unnamed='1' visible='1'}
 :FormEditorStack_qdesigner_internal::PropertyLineEdit	{container=':*Qt Creator.FormEditorStack_Designer::Internal::FormEditorStack' type='qdesigner_internal::PropertyLineEdit' unnamed='1' visible='1'}
 :Generator:_QComboBox	{buddy=':CMake Wizard.Generator:_QLabel' type='QComboBox' unnamed='1' visible='1'}
-:Git Repository Clone.Cancel_QPushButton	{text='Cancel' type='QPushButton' visible='1' window=':Git Repository Clone_Git::Internal::CloneWizard'}
-:Git Repository Clone.Finish_QPushButton	{text~='(Finish|Done)' type='QPushButton' visible='1' window=':Git Repository Clone_Git::Internal::CloneWizard'}
-:Git Repository Clone.Repository_QGroupBox	{name='repositoryGroupBox' title='Repository' type='QGroupBox' visible='1' window=':Git Repository Clone_Git::Internal::CloneWizard'}
-:Git Repository Clone.Result._QLabel	{type='QLabel' unnamed='1' visible='1' window=':Git Repository Clone_Git::Internal::CloneWizard'}
-:Git Repository Clone.Working Copy_QGroupBox	{name='localGroupBox' title='Working Copy' type='QGroupBox' visible='1' window=':Git Repository Clone_Git::Internal::CloneWizard'}
-:Git Repository Clone.logPlainTextEdit_QPlainTextEdit	{type='QPlainTextEdit' unnamed='1' visible='1' window=':Git Repository Clone_Git::Internal::CloneWizard'}
-:Git Repository Clone_Git::Internal::CloneWizard	{type='Git::Internal::CloneWizard' unnamed='1' visible='1' windowTitle='Git Repository Clone'}
+:Git Repository Clone.Cancel_QPushButton	{text='Cancel' type='QPushButton' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
+:Git Repository Clone.Finish_QPushButton	{text~='(Finish|Done)' type='QPushButton' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
+:Git Repository Clone.Result._QLabel	{type='QLabel' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
+:Git Repository Clone.logPlainTextEdit_QPlainTextEdit	{type='QPlainTextEdit' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
 :Go to slot.OK_QPushButton	{text='OK' type='QPushButton' unnamed='1' visible='1' window=':Go to slot_QDialog'}
 :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'}
@@ -184,7 +181,6 @@
 :QtSupport__Internal__QtVersionManager.errorLabel.QLabel	{container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='errorLabel' type='QLabel' visible='1'}
 :QtSupport__Internal__QtVersionManager.qmake_QLabel	{container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qmakePath' type='QLabel' visible='1'}
 :QtSupport__Internal__QtVersionManager.qtdirList_QTreeWidget	{container=':qt_tabwidget_stackedwidget.QtSupport__Internal__QtVersionManager_QtSupport::Internal::QtOptionsPageWidget' name='qtdirList' type='QTreeWidget' visible='1'}
-:Repository.repositoryLineEdit_QLineEdit	{container=':Git Repository Clone.Repository_QGroupBox' name='repositoryLineEdit' type='QLineEdit' visible='1'}
 :Restart required.OK_QPushButton	{text='OK' type='QPushButton' unnamed='1' visible='1' window=':Restart required_QMessageBox'}
 :Restart required_QMessageBox	{text='The language change will take effect after a restart of Qt Creator.' type='QMessageBox' unnamed='1' visible='1'}
 :Revert to Saved.Proceed_QPushButton	{text='Proceed' type='QPushButton' unnamed='1' visible='1' window=':Revert to Saved_QMessageBox'}
@@ -213,8 +209,7 @@
 :User Interface.languageBox_QComboBox	{container=':Core__Internal__GeneralSettings.User Interface_QGroupBox' name='languageBox' type='QComboBox' visible='1'}
 :WelcomePageStyledBar.WelcomePage_QQuickView	{container=':Qt Creator.WelcomePageStyledBar_QWindowContainer' name='WelcomePage' type='QQuickView' visible='true'}
 :Widget Box_qdesigner_internal::WidgetBoxTreeWidget	{container=':*Qt Creator.Widget Box_QDockWidget' type='qdesigner_internal::WidgetBoxTreeWidget' unnamed='1' visible='1'}
-:Working Copy.checkoutDirectoryLineEdit_QLineEdit	{container=':Git Repository Clone.Working Copy_QGroupBox' name='checkoutDirectoryLineEdit' type='QLineEdit' visible='1'}
-:Working Copy_Utils::BaseValidatingLineEdit	{container=':Git Repository Clone.Working Copy_QGroupBox' type='Utils::FancyLineEdit' unnamed='1' visible='1'}
+:Working Copy_Utils::BaseValidatingLineEdit	{type='Utils::FancyLineEdit' unnamed='1' visible='1' window=':New Text File_ProjectExplorer::JsonWizard'}
 :WritePermissions_Core::Internal::ReadOnlyFilesDialog	{name='Core__Internal__ReadOnlyFilesDialog' type='Core::ReadOnlyFilesDialog' visible='1' windowTitle='Files Without Write Permissions'}
 :addToVersionControlComboBox_QComboBox	{name='addToVersionControlComboBox' type='QComboBox' visible='1'}
 :formFileLineEdit_Utils::FileNameValidatingLineEdit	{buddy=':Qt Gui Application.Form file:_QLabel' name='formFileLineEdit' type='Utils::FileNameValidatingLineEdit' visible='1'}
diff --git a/tests/system/suite_tools/tst_git_clone/test.py b/tests/system/suite_tools/tst_git_clone/test.py
index cc88209fd98..4345bdb4793 100644
--- a/tests/system/suite_tools/tst_git_clone/test.py
+++ b/tests/system/suite_tools/tst_git_clone/test.py
@@ -61,7 +61,7 @@ def verifyCloneLog(targetDir, canceled):
         if canceled:
             test.warning("Could not find resultLabel",
                          "Cloning might have failed before clicking 'Cancel'")
-            return object.exists(":Git Repository Clone_Git::Internal::CloneWizard")
+            return object.exists(":New Text File_ProjectExplorer::JsonWizard")
         else:
             test.fail("Could not find resultLabel")
     return True
@@ -93,19 +93,19 @@ def main():
     for button in ["Cancel immediately",
                    ":Git Repository Clone.Cancel_QPushButton",
                    ":Git Repository Clone.Finish_QPushButton"]:
-        __createProjectOrFileSelectType__("  Import Project", "Git Repository Clone")
-        replaceEditorContent(waitForObject(":Repository.repositoryLineEdit_QLineEdit"),
+        __createProjectOrFileSelectType__("  Import Project", "Git Clone")
+        replaceEditorContent(waitForObject("{name='Repo' type='QLineEdit' visible='1'}"),
                              cloneUrl)
         targetDir = tempDir()
         replaceEditorContent(waitForObject(":Working Copy_Utils::BaseValidatingLineEdit"),
                              targetDir)
-        cloneDirEdit = waitForObject(":Working Copy.checkoutDirectoryLineEdit_QLineEdit")
+        cloneDirEdit = waitForObject("{name='Dir' type='QLineEdit' visible='1'}")
         test.compare(cloneDirEdit.text, "jom")
         replaceEditorContent(cloneDirEdit, cloneDir)
         clickButton(waitForObject(":Next_QPushButton"))
         cloneLog = waitForObject(":Git Repository Clone.logPlainTextEdit_QPlainTextEdit", 1000)
         test.compare(waitForObject(":Git Repository Clone.Result._QLabel").text,
-                     "Cloning started...")
+                     "Running Git clone...")
         if button == "Cancel immediately":
             # wait for cloning to have started
             waitFor('len(str(cloneLog.plainText)) > 20 + len(cloneDir)')
-- 
GitLab