Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gui-tests][full-ci] fix gui tests #11550

Merged
merged 4 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions test/gui/shared/scripts/helpers/ObjectHelper.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def get_center_coordinates(obj):
return obj.width / 2, obj.height / 2
7 changes: 4 additions & 3 deletions test/gui/shared/scripts/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -44,8 +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}
scrollView_ListView = {"container": quickWidget_scrollView_ScrollView, "type": "ListView", "unnamed": 1, "visible": True}
26 changes: 17 additions & 9 deletions test/gui/shared/scripts/pageObjects/SyncConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import squish
import object

from helpers.ConfigHelper import get_config
from helpers.ObjectHelper import get_center_coordinates


class SyncConnection:
Expand All @@ -12,6 +12,13 @@ class SyncConnection:
"type": "QListView",
"visible": 1,
}
FOLDER_SYNC_CONNECTION_MENU_BUTTON = {
"checkable": False,
"container": names.quickWidget_scrollView_ScrollView,
"type": "Button",
"unnamed": 1,
"visible": True,
}
MENU = {
"type": "QMenu",
"window": names.settings_OCC_SettingsDialog,
Expand All @@ -32,14 +39,15 @@ class SyncConnection:

@staticmethod
def openMenu():
squish.openContextMenu(
squish.waitForObjectItem(
SyncConnection.FOLDER_SYNC_CONNECTION,
get_config('syncConnectionName'),
),
0,
0,
squish.Qt.NoModifier,
menu_button = squish.waitForObject(
SyncConnection.FOLDER_SYNC_CONNECTION_MENU_BUTTON
)
x, y = get_center_coordinates(menu_button)
squish.mouseClick(
menu_button,
x,
y,
squish.Qt.LeftButton,
)

@staticmethod
Expand Down
4 changes: 2 additions & 2 deletions test/gui/tst_sharing/test.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
21 changes: 9 additions & 12 deletions test/gui/tst_syncing/verificationPoints/empty_sync_connection
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<VerificationPoint type="Screenshot" version="4">
<Description/>
<Verification object="stack_folderList_QTreeView" type="PNG" options="12">
iVBORw0KGgoAAAANSUhEUgAAAuoAAAG/CAMAAAA5EgJNAAAABlBMVEW4uLj///+rMStlAAAACX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CdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdCdSJUJ0J1IlQnQnUiVCdiEPFEWQ2U50DhCAAAAABJRU5ErkJggg==
<Mask>
<Rect type="positive" height="176" x="0" width="743" y="0"/>
</Mask>
<Algorithm description="Simple comparison (pixel by pixel)" name="simplecompare">
<Parameter description="Threshold" name="threshold">0.5</Parameter>
<Parameter description="Tolerance" name="tolerance">0</Parameter>
</Algorithm>
</Verification>
</VerificationPoint>
<Description></Description>
<Verification type="PNG" object="scrollView_ListView" options="12">
iVBORw0KGgoAAAANSUhEUgAAAuoAAAHxCAMAAAAMQGlRAAAAElBMVEXGxsbMzMzNzc3Y2Njt7e3v7+/rrBXRAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAFUElEQVR4nO3SyRECMQDAsFz03zIsRcBMLFXgh8cLEsa/A+A3rM7lzl5zH6tzvT0+ttW53nxWX1bneuPL6lzP6kRYnQirE2F1IqxOhNWJsDoRV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2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJsDoRVifC6kRYnQirE2F1IqxOhNWJWM/p0+pcbz+rb6tzvbPn2sfqZFidiDcyWRGFQxU7IAAAAABJRU5ErkJggg==
<Mask>
<Rect type="positive" height="238" x="1" width="733" y="1"/>
</Mask>
<Algorithm name="strict" description="Strict mode"/>
</Verification>
</VerificationPoint>
Loading