aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Löhning <robert.loehning@qt.io>2022-10-19 22:57:12 +0200
committerRobert Löhning <robert.loehning@qt.io>2022-10-26 07:57:11 +0000
commit2a2a3b060f2c0f6f3ae4e5850dba23dcb8ab4809 (patch)
treed57108c6fabed50f4f820ea91de94cd5d3b2ac65
parente8882efc153da47e291dd8208bfc3f6fdf0e1698 (diff)
Squish: Shorten long lines
Change-Id: I0026c8e6233f2eca7d13bd85c2845d6d46922516 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
-rw-r--r--Tests/system/shared/utils.py4
-rw-r--r--Tests/system/suite_installation/shared/scripts/names.py8
-rw-r--r--Tests/system/suite_installation/tst_install_from_marketplace/test.py2
-rw-r--r--Tests/system/suite_installation/tst_install_verify/test.py2
-rw-r--r--Tests/system/suite_installation/tst_uninstall/test.py4
5 files changed, 10 insertions, 10 deletions
diff --git a/Tests/system/shared/utils.py b/Tests/system/shared/utils.py
index 881e0542..e7551895 100644
--- a/Tests/system/shared/utils.py
+++ b/Tests/system/shared/utils.py
@@ -63,14 +63,14 @@ def selectInstalledVsTools(version):
openExtensionManager(version)
if version == "2017":
try:
- vsToolsLabel = waitForObject(names.extensionManager_UI_InstalledExtensionItem_The_Qt_VS_Tools_for_Visual_Studio_2017_Label,
+ vsToolsLabel = waitForObject(names.extensionManager_UI_InstalledExtItem_Qt_2017_Label,
5000)
except:
return None
else:
mouseClick(waitForObject({"type": "TreeItem", "id": "Installed"}))
try:
- vsToolsLabel = waitForObject(names.extensionManager_UI_InstalledExtensionItem_The_Qt_VS_Tools_for_Visual_Studio_2019_Label,
+ vsToolsLabel = waitForObject(names.extensionManager_UI_InstalledExtItem_Qt_Label,
5000)
except:
return None
diff --git a/Tests/system/suite_installation/shared/scripts/names.py b/Tests/system/suite_installation/shared/scripts/names.py
index e7aa6e58..f38d6d44 100644
--- a/Tests/system/suite_installation/shared/scripts/names.py
+++ b/Tests/system/suite_installation/shared/scripts/names.py
@@ -36,7 +36,7 @@ extensions_MenuItem = {"container": microsoft_Visual_Studio_MenuBar, "text": "Ex
pART_Popup_Popup = {"id": "", "name": "PART_Popup", "type": "Popup"}
pART_Popup_Manage_Extensions_MenuItem = {"container": pART_Popup_Popup, "text": "Manage Extensions", "type": "MenuItem"}
manage_Extensions_Window = {"text": Wildcard("*Extensions*"), "type": "Window"}
-extensionManager_UI_InstalledExtensionItem_The_Qt_VS_Tools_for_Visual_Studio_2019_Label = {"text": Wildcard("The Qt VS Tools for Visual Studio *"), "type": "Label"}
+extensionManager_UI_InstalledExtItem_Qt_Label = {"text": Wildcard("The Qt VS Tools for Visual Studio *"), "type": "Label"}
manage_Extensions_Close_Button = {"container": manage_Extensions_Window, "text": "Close", "type": "Button"}
file_MenuItem = {"container": microsoft_Visual_Studio_MenuBar, "text": "File", "type": "MenuItem"}
pART_Popup_Exit_MenuItem = {"container": pART_Popup_Popup, "text": "Exit", "type": "MenuItem"}
@@ -44,14 +44,14 @@ tools_MenuItem = {"container": microsoft_Visual_Studio_MenuBar, "text": "Tools",
pART_Popup_Extensions_and_Updates_MenuItem = {"container": pART_Popup_Popup, "text": "Extensions and Updates...", "type": "MenuItem"}
extensions_and_Updates_lvw_Extensions_ListView = {"container": manage_Extensions_Window, "name": "lvw_Extensions", "type": "ListView"}
lvw_Extensions_Microsoft_VisualStudio_ExtensionManager_UI_InstalledExtensionItem_ListViewItem = {"container": extensions_and_Updates_lvw_Extensions_ListView, "text": "Microsoft.VisualStudio.ExtensionManager.UI.InstalledExtensionItem", "type": "ListViewItem"}
-extensionManager_UI_InstalledExtensionItem_The_Qt_VS_Tools_for_Visual_Studio_2017_Label = {"container": lvw_Extensions_Microsoft_VisualStudio_ExtensionManager_UI_InstalledExtensionItem_ListViewItem, "text": Wildcard("The Qt VS Tools for Visual Studio *"), "type": "Label"}
+extensionManager_UI_InstalledExtItem_Qt_2017_Label = {"container": lvw_Extensions_Microsoft_VisualStudio_ExtensionManager_UI_InstalledExtensionItem_ListViewItem, "text": Wildcard("The Qt VS Tools for Visual Studio *"), "type": "Label"}
extensions_and_Updates_Version_Label = {"container": manage_Extensions_Window, "text": "Version:", "type": "Label"}
manage_Extensions_Version_Label = {"leftObject": extensions_and_Updates_Version_Label, "type": "Label"}
help_MenuItem = {"container": microsoft_Visual_Studio_MenuBar, "text": "Help", "type": "MenuItem"}
pART_Popup_About_Microsoft_Visual_Studio_MenuItem = {"container": pART_Popup_Popup, "text": "About Microsoft Visual Studio", "type": "MenuItem"}
o_Microsoft_Visual_Studio_OK_Button = {"container": microsoft_Visual_Studio_Window, "text": "OK", "type": "Button"}
about_Microsoft_Visual_Studio_Window = {"text": "About Microsoft Visual Studio", "type": "Window"}
-about_Microsoft_Visual_Studio_Microsoft_Visual_Studio_Community_2017_Label = {"container": about_Microsoft_Visual_Studio_Window, "text": Wildcard("Microsoft Visual Studio *"), "type": "Label"}
+about_Microsoft_Visual_Studio_2017_Label = {"container": about_Microsoft_Visual_Studio_Window, "text": Wildcard("Microsoft Visual Studio *"), "type": "Label"}
about_Microsoft_Visual_Studio_Edit = {"container": about_Microsoft_Visual_Studio_Window, "type": "Edit"}
o_Extensions_ProvidersTree_Tree = {"container": manage_Extensions_Window, "name": "ProvidersTree", "type": "Tree"}
providersTree_Online_TreeItem = {"container": o_Extensions_ProvidersTree_Tree, "text": "Online", "type": "TreeItem"}
@@ -59,7 +59,7 @@ o_Extensions_Edit = {"container": manage_Extensions_Window, "type": "Edit"}
lvw_Extensions_Microsoft_VisualStudio_ExtensionManager_UI_OnlineExtensionItem_ListViewItem = {"container": extensions_and_Updates_lvw_Extensions_ListView, "text": "Microsoft.VisualStudio.ExtensionManager.UI.OnlineExtensionItem", "type": "ListViewItem"}
OnlineExtensionItem_Download_Button = {"container": lvw_Extensions_Microsoft_VisualStudio_ExtensionManager_UI_OnlineExtensionItem_ListViewItem, "text": "Download", "type": "Button"}
changes_scheduled_Label = {"container": manage_Extensions_Window, "text": "Your changes will be scheduled.  The modifications will begin when all Microsoft Visual Studio windows are closed.", "type": "Label"}
-microsoft_VisualStudio_ExtensionManager_UI_InstalledExtensionItem_Uninstall_Label = {"container": lvw_Extensions_Microsoft_VisualStudio_ExtensionManager_UI_InstalledExtensionItem_ListViewItem, "text": "_Uninstall", "type": "Label"}
+msvs_ExtensionManager_UI_InstalledExtItem_Uninstall_Label= {"container": lvw_Extensions_Microsoft_VisualStudio_ExtensionManager_UI_InstalledExtensionItem_ListViewItem, "text": "_Uninstall", "type": "Label"}
microsoft_Visual_Studio_Dialog = {"text": "Microsoft Visual Studio", "type": "Dialog"}
microsoft_Visual_Studio_Yes_Button= {"container": microsoft_Visual_Studio_Dialog, "text": RegularExpression("Yes|Ja"), "type": "Button"}
pART_Popup_qt_io_MenuItem = {"text": "qt.io", "type": "MenuItem"}
diff --git a/Tests/system/suite_installation/tst_install_from_marketplace/test.py b/Tests/system/suite_installation/tst_install_from_marketplace/test.py
index 8829e9c2..c0d20d31 100644
--- a/Tests/system/suite_installation/tst_install_from_marketplace/test.py
+++ b/Tests/system/suite_installation/tst_install_from_marketplace/test.py
@@ -54,7 +54,7 @@ def downloadQtVsTools(version):
mouseClick(waitForObject(names.o_Extensions_Edit))
type(waitForObject(names.o_Extensions_Edit), "qt")
type(waitForObject(names.o_Extensions_Edit), "<Return>")
- mouseClick(waitForObject(names.extensionManager_UI_InstalledExtensionItem_The_Qt_VS_Tools_for_Visual_Studio_2019_Label))
+ mouseClick(waitForObject(names.extensionManager_UI_InstalledExtItem_Qt_Label))
verifyVsToolsVersion()
try:
downloadButton = waitForObject(names.OnlineExtensionItem_Download_Button)
diff --git a/Tests/system/suite_installation/tst_install_verify/test.py b/Tests/system/suite_installation/tst_install_verify/test.py
index eb220b2c..281264bf 100644
--- a/Tests/system/suite_installation/tst_install_verify/test.py
+++ b/Tests/system/suite_installation/tst_install_verify/test.py
@@ -53,7 +53,7 @@ def checkVSVersion(version):
mouseClick(waitForObject(names.help_MenuItem))
mouseClick(waitForObject(names.pART_Popup_About_Microsoft_Visual_Studio_MenuItem))
if version == "2017":
- vsVersionText = waitForObjectExists(names.about_Microsoft_Visual_Studio_Microsoft_Visual_Studio_Community_2017_Label).text
+ vsVersionText = waitForObjectExists(names.about_Microsoft_Visual_Studio_2017_Label).text
else:
vsVersionText = waitForObjectExists(names.about_Microsoft_Visual_Studio_Edit).text
test.verify(version in vsVersionText,
diff --git a/Tests/system/suite_installation/tst_uninstall/test.py b/Tests/system/suite_installation/tst_uninstall/test.py
index 897d3869..0eefef9f 100644
--- a/Tests/system/suite_installation/tst_uninstall/test.py
+++ b/Tests/system/suite_installation/tst_uninstall/test.py
@@ -43,13 +43,13 @@ def main():
if uninstallQtVsTools(version):
test.warning("If the test succeeded so far, it now requires manual steps.",
"Please finish the steps of the VSIX Installer wizard which should have "
- "appeared. After this, you can run tst_uninstall_verify to verify the result.")
+ "appeared. After this, you can run tst_uninstall_verify to check the result.")
closeMainWindow()
def uninstallQtVsTools(version):
selectInstalledVsTools(version)
- mouseClick(waitForObject(names.microsoft_VisualStudio_ExtensionManager_UI_InstalledExtensionItem_Uninstall_Label))
+ mouseClick(waitForObject(names.msvs_ExtensionManager_UI_InstalledExtItem_Uninstall_Label))
clickButton(waitForObject(names.microsoft_Visual_Studio_Yes_Button))
test.verify(waitFor(changesScheduledLabelExists, 5000),
"Were changes to the installation scheduled?")