From ebd9fefc56c68cd403036a2851c3c080d8a7a115 Mon Sep 17 00:00:00 2001 From: Salipa-Gurung Date: Thu, 21 Mar 2024 17:45:12 +0545 Subject: [PATCH 1/4] update selector for context menu --- test/gui/shared/scripts/names.py | 3 +++ .../scripts/pageObjects/SyncConnection.py | 18 ++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/test/gui/shared/scripts/names.py b/test/gui/shared/scripts/names.py index b62a733b9cd..6767e6e0938 100644 --- a/test/gui/shared/scripts/names.py +++ b/test/gui/shared/scripts/names.py @@ -49,3 +49,6 @@ o_folderList_Personal_QModelIndex = {"column": 0, "container": stack_folderList_QTreeView, "text": "Personal", "type": "QModelIndex"} add_Folder_Sync_Connection_tableView_QTableView = {"name": "tableView","type": "QTableView","visible": 1,"window": add_Folder_Sync_Connection_OCC_FolderWizard} stack_scrollArea_QScrollArea = {"container": settings_stack_QStackedWidget, "name": "scrollArea", "type": "QScrollArea", "visible": 1} +stack_stackedWidget_QStackedWidget = {"container": settings_stack_QStackedWidget, "name": "stackedWidget", "type": "QStackedWidget", "visible": 1} +stackedWidget_quickWidget_QQuickWidget = {"container": stack_stackedWidget_QStackedWidget, "name": "quickWidget", "type": "QQuickWidget", "visible": 1} +quickWidget_scrollView_ScrollView = {"container": stackedWidget_quickWidget_QQuickWidget, "id": "scrollView", "type": "ScrollView", "unnamed": 1, "visible": True} \ No newline at end of file diff --git a/test/gui/shared/scripts/pageObjects/SyncConnection.py b/test/gui/shared/scripts/pageObjects/SyncConnection.py index f6d7d2e0aeb..8fc0af08352 100644 --- a/test/gui/shared/scripts/pageObjects/SyncConnection.py +++ b/test/gui/shared/scripts/pageObjects/SyncConnection.py @@ -7,10 +7,11 @@ class SyncConnection: FOLDER_SYNC_CONNECTION = { - "container": names.settings_stack_QStackedWidget, - "name": "_folderList", - "type": "QListView", - "visible": 1, + "checkable": False, + "container": names.quickWidget_scrollView_ScrollView, + "type": "Button", + "unnamed": 1, + "visible": True, } MENU = { "type": "QMenu", @@ -32,14 +33,11 @@ class SyncConnection: @staticmethod def openMenu(): - squish.openContextMenu( - squish.waitForObjectItem( - SyncConnection.FOLDER_SYNC_CONNECTION, - get_config('syncConnectionName'), - ), + squish.mouseClick( + squish.waitForObject(SyncConnection.FOLDER_SYNC_CONNECTION), 0, 0, - squish.Qt.NoModifier, + squish.Qt.LeftButton, ) @staticmethod From be04c4fb5681a1d297dceed63b13e1e877df7b88 Mon Sep 17 00:00:00 2001 From: Salipa-Gurung Date: Fri, 22 Mar 2024 16:51:48 +0545 Subject: [PATCH 2/4] update verification point for empty sync connection --- test/gui/shared/scripts/names.py | 6 ++---- .../verificationPoints/empty_sync_connection | 21 ++++++++----------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/test/gui/shared/scripts/names.py b/test/gui/shared/scripts/names.py index 6767e6e0938..6e3b0f8b05c 100644 --- a/test/gui/shared/scripts/names.py +++ b/test/gui/shared/scripts/names.py @@ -7,7 +7,6 @@ qFileDialog_QFileDialog = {"name": "QFileDialog", "type": "QFileDialog", "visible": 1} settings_stack_QStackedWidget = {"name": "stack", "type": "QStackedWidget", "visible": 1, "window": settings_OCC_SettingsDialog} qFileDialog_fileNameLabel_QLabel = {"name": "fileNameLabel", "type": "QLabel", "visible": 1, "window": qFileDialog_QFileDialog} -stack_folderList_QTreeView = {"container": settings_stack_QStackedWidget, "name": "_folderList", "type": "QListView", "visible": 1} sharingDialog_OCC_ShareDialog = {"name": "SharingDialog", "type": "OCC::ShareDialog", "visible": 1} sharingDialog_qt_tabwidget_stackedwidget_QStackedWidget = {"name": "qt_tabwidget_stackedwidget", "type": "QStackedWidget", "visible": 1, "window": sharingDialog_OCC_ShareDialog} qt_tabwidget_stackedwidget_SharingDialogUG_OCC_ShareUserGroupWidget = {"container": sharingDialog_qt_tabwidget_stackedwidget_QStackedWidget, "name": "SharingDialogUG", "type": "OCC::ShareUserGroupWidget", "visible": 1} @@ -44,11 +43,10 @@ deselect_remote_folders_you_do_not_wish_to_synchronize_ownCloud_QModelIndex = {"column": 0, "container": add_Folder_Sync_Connection_Deselect_remote_folders_you_do_not_wish_to_synchronize_QTreeWidget, "text": "ownCloud", "type": "QModelIndex"} loginRequiredDialog_OCC_LoginRequiredDialog = {"name": "LoginRequiredDialog", "type": "OCC::LoginRequiredDialog", "visible": 1} loginRequiredDialog_contentWidget_QStackedWidget = {"name": "contentWidget", "type": "QStackedWidget", "visible": 1, "window": loginRequiredDialog_OCC_LoginRequiredDialog} -o_folderList_ownCloud_QModelIndex = {"column": 0, "container": stack_folderList_QTreeView, "text": "ownCloud", "type": "QModelIndex"} contentWidget_contentWidget_QStackedWidget = {"container": setupWizardWindow_contentWidget_QStackedWidget, "name": "contentWidget", "type": "QStackedWidget", "visible": 1} -o_folderList_Personal_QModelIndex = {"column": 0, "container": stack_folderList_QTreeView, "text": "Personal", "type": "QModelIndex"} add_Folder_Sync_Connection_tableView_QTableView = {"name": "tableView","type": "QTableView","visible": 1,"window": add_Folder_Sync_Connection_OCC_FolderWizard} stack_scrollArea_QScrollArea = {"container": settings_stack_QStackedWidget, "name": "scrollArea", "type": "QScrollArea", "visible": 1} stack_stackedWidget_QStackedWidget = {"container": settings_stack_QStackedWidget, "name": "stackedWidget", "type": "QStackedWidget", "visible": 1} stackedWidget_quickWidget_QQuickWidget = {"container": stack_stackedWidget_QStackedWidget, "name": "quickWidget", "type": "QQuickWidget", "visible": 1} -quickWidget_scrollView_ScrollView = {"container": stackedWidget_quickWidget_QQuickWidget, "id": "scrollView", "type": "ScrollView", "unnamed": 1, "visible": True} \ No newline at end of file +quickWidget_scrollView_ScrollView = {"container": stackedWidget_quickWidget_QQuickWidget, "id": "scrollView", "type": "ScrollView", "unnamed": 1, "visible": True} +scrollView_ListView = {"container": quickWidget_scrollView_ScrollView, "type": "ListView", "unnamed": 1, "visible": True} diff --git a/test/gui/tst_syncing/verificationPoints/empty_sync_connection b/test/gui/tst_syncing/verificationPoints/empty_sync_connection index eb739540cf2..ed8ce47173a 100644 --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sDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJWM/p0+pcbz+rb6tzvbPn2sfqZFidiDcyWRGFQxU7IAAAAABJRU5ErkJggg== + + + + + + From 1f4966e19054b5a37703e6a283c219e0e927682e Mon Sep 17 00:00:00 2001 From: Salipa-Gurung Date: Mon, 25 Mar 2024 12:23:45 +0545 Subject: [PATCH 3/4] skip sharing with expiration tests --- test/gui/tst_sharing/test.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/gui/tst_sharing/test.feature b/test/gui/tst_sharing/test.feature index 1c58bcb104a..442f1586e68 100644 --- a/test/gui/tst_sharing/test.feature +++ b/test/gui/tst_sharing/test.feature @@ -506,7 +506,7 @@ Feature: Sharing Then the expiration date of the last public link of file "textfile.txt" should be "%default%" And as user "Alice" the file "textfile.txt" should have a public link in the server - @issue-9321 @skipOnWindows + @issue-9321 @skipOnWindows @skip Scenario: simple sharing of file and folder by public link with expiration date Given user "Alice" has created folder "FOLDER" in the server And user "Alice" has uploaded file with content "ownCloud test text file" to "/textfile.txt" in the server @@ -526,7 +526,7 @@ Feature: Sharing And the last public link share response of user "Alice" should include the following fields on the server | expireDate | 2031-12-30 | - @issue-9321 @skipOnWindows + @issue-9321 @skipOnWindows @skip Scenario: simple sharing of a file by public link with password and expiration date Given user "Alice" has uploaded file with content "ownCloud test text file" to "/textfile.txt" in the server And user "Alice" has set up a client with default settings From 60485e28bf352c219fb148755d8bfbf5288b8e92 Mon Sep 17 00:00:00 2001 From: Saw-jan Date: Mon, 25 Mar 2024 14:52:01 +0545 Subject: [PATCH 4/4] test: click on object center --- .../gui/shared/scripts/helpers/ObjectHelper.py | 2 ++ .../scripts/pageObjects/SyncConnection.py | 18 ++++++++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 test/gui/shared/scripts/helpers/ObjectHelper.py diff --git a/test/gui/shared/scripts/helpers/ObjectHelper.py b/test/gui/shared/scripts/helpers/ObjectHelper.py new file mode 100644 index 00000000000..7408da1e135 --- /dev/null +++ b/test/gui/shared/scripts/helpers/ObjectHelper.py @@ -0,0 +1,2 @@ +def get_center_coordinates(obj): + return obj.width / 2, obj.height / 2 diff --git a/test/gui/shared/scripts/pageObjects/SyncConnection.py b/test/gui/shared/scripts/pageObjects/SyncConnection.py index 8fc0af08352..69a88e5586e 100644 --- a/test/gui/shared/scripts/pageObjects/SyncConnection.py +++ b/test/gui/shared/scripts/pageObjects/SyncConnection.py @@ -2,11 +2,17 @@ import squish import object -from helpers.ConfigHelper import get_config +from helpers.ObjectHelper import get_center_coordinates class SyncConnection: FOLDER_SYNC_CONNECTION = { + "container": names.settings_stack_QStackedWidget, + "name": "_folderList", + "type": "QListView", + "visible": 1, + } + FOLDER_SYNC_CONNECTION_MENU_BUTTON = { "checkable": False, "container": names.quickWidget_scrollView_ScrollView, "type": "Button", @@ -33,10 +39,14 @@ class SyncConnection: @staticmethod def openMenu(): + menu_button = squish.waitForObject( + SyncConnection.FOLDER_SYNC_CONNECTION_MENU_BUTTON + ) + x, y = get_center_coordinates(menu_button) squish.mouseClick( - squish.waitForObject(SyncConnection.FOLDER_SYNC_CONNECTION), - 0, - 0, + menu_button, + x, + y, squish.Qt.LeftButton, )