Skip to content
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
8 changes: 7 additions & 1 deletion src/gui/accountsettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,12 @@ void AccountSettings::slotRemoveCurrentFolder(Folder *folder)
"<p><b>Note:</b> This will <b>not</b> delete any files.</p>")
.arg(shortGuiLocalPath),
QMessageBox::NoButton, ocApp()->gui()->settingsDialog());
messageBox->setObjectName("ConfirmFolderSyncRemovalMessageBox");
messageBox->setAttribute(Qt::WA_DeleteOnClose);
QPushButton *yesButton = messageBox->addButton(tr("Remove Folder Sync Connection"), QMessageBox::YesRole);
messageBox->addButton(tr("Cancel"), QMessageBox::NoRole);
yesButton->setObjectName("RemoveFolderSyncButton");
QPushButton *cancelButton = messageBox->addButton(tr("Cancel"), QMessageBox::NoRole);
cancelButton->setObjectName("CancelFolderSyncDialog");
connect(messageBox, &QMessageBox::finished, this, [messageBox, yesButton, folder, this] {
if (messageBox->clickedButton() == yesButton) {
// todo: #3, this should be a signal to folderman
Expand Down Expand Up @@ -372,7 +375,9 @@ void AccountSettings::slotDisableVfsCurrentFolder(Folder *folder)
"will become available again."
"\n\n"
"This action will abort any currently running synchronization."));
msgBox->setObjectName("DisableVFSMessageBox");
auto acceptButton = msgBox->addButton(tr("Disable support"), QMessageBox::AcceptRole);
acceptButton->setObjectName("DisableVFSSupportButton");
msgBox->addButton(tr("Cancel"), QMessageBox::RejectRole);
connect(msgBox, &QMessageBox::finished, msgBox, [msgBox, folder, acceptButton] {
msgBox->deleteLater();
Expand Down Expand Up @@ -734,6 +739,7 @@ void AccountSettings::slotDeleteAccount()
.arg(_accountState->account()->displayNameWithHost()),
QMessageBox::NoButton, this);
auto yesButton = messageBox->addButton(tr("Remove connection"), QMessageBox::YesRole);
yesButton->setObjectName("RemoveConnectionButton");
messageBox->addButton(tr("Cancel"), QMessageBox::NoRole);
messageBox->setAttribute(Qt::WA_DeleteOnClose);
connect(messageBox, &QMessageBox::finished, this, [this, messageBox, yesButton]{
Expand Down
1 change: 1 addition & 0 deletions src/gui/folderwizard/folderwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ FolderWizard::FolderWizard(Account *account, QWidget *parent)
, d_ptr(new FolderWizardPrivate(this, account))
{
setWindowTitle(tr("Add Folder Sync Connection"));
setObjectName("AddFolderSyncWizard");
setOptions(QWizard::CancelButtonOnLeft);
setButtonText(QWizard::FinishButton, tr("Add Sync Connection"));
setWizardStyle(QWizard::ModernStyle);
Expand Down
3 changes: 3 additions & 0 deletions src/gui/newaccountwizard/advancedsettingspagecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,13 @@ void AdvancedSettingsPageController::buildPage()
layout->addWidget(vfsButton, Qt::AlignLeft);

QRadioButton *syncAllButton = new QRadioButton(tr("Automatically sync and download folders and files"), _page);
syncAllButton->setObjectName("SyncAllRadioButton");
syncAllButton->setFocusPolicy(Qt::StrongFocus);
_buttonGroup->addButton(syncAllButton, NewAccount::SyncType::SYNC_ALL);
layout->addWidget(syncAllButton, Qt::AlignLeft);

QRadioButton *selectiveSyncButton = new QRadioButton(tr("Sync and download folders manually"), _page);
selectiveSyncButton->setObjectName("SelectiveSyncRadioButton");
selectiveSyncButton->setFocusPolicy(Qt::StrongFocus);
_buttonGroup->addButton(selectiveSyncButton, NewAccount::SyncType::SELECTIVE_SYNC);
layout->addWidget(selectiveSyncButton, Qt::AlignLeft);
Expand Down Expand Up @@ -136,6 +138,7 @@ void AdvancedSettingsPageController::buildPage()
connect(_rootDirEdit, &QLineEdit::editingFinished, this, &AdvancedSettingsPageController::onRootDirFieldEdited);

_folderButton = new QPushButton(tr("Browse..."), _page);
_folderButton->setObjectName("BrowseButton");
_folderButton->setFocusPolicy(Qt::StrongFocus);
_folderButton->setAccessibleDescription(tr("Browse for a download location"));
connect(_folderButton, &QPushButton::clicked, this, &AdvancedSettingsPageController::showFolderPicker);
Expand Down
1 change: 1 addition & 0 deletions src/gui/newaccountwizard/newaccountwizardcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ void NewAccountWizardController::setupWizard()
_wizard->setFixedSize(600, 450);
_wizard->setWizardStyle(QWizard::ModernStyle);
_wizard->setWindowTitle(tr("Add account..."));
_wizard->setObjectName("NewAccountWizard");

QWizard::WizardOptions origOptions = _wizard->options();
_wizard->setOptions(origOptions | QWizard::IndependentPages | QWizard::NoBackButtonOnStartPage);
Expand Down
1 change: 1 addition & 0 deletions src/gui/newaccountwizard/oauthpagecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void OAuthPageController::buildPage()
_urlField->setAccessibleDescription(tr("To copy the sign in URL to the clipboard, use the copy button"));

_copyButton = new QPushButton(copyIcon(), QString(), _page);
_copyButton->setObjectName("CopyUrlToClipboardButton");
_copyButton->setFlat(true);
_copyButton->setContentsMargins(0, 0, 0, 0);
_copyButton->setFixedSize(_urlField->height(), _urlField->height());
Expand Down
1 change: 1 addition & 0 deletions src/gui/newaccountwizard/urlpagecontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ void UrlPageController::buildPage()
_urlField->setFocusPolicy(Qt::StrongFocus);
_urlField->setAccessibleName(tr("Server address field"));
_urlField->setAccessibleDescription(tr("Enter your server address here"));
_urlField->setObjectName("ServerAddressLineEdit");

_errorField = new QLabel(QString(), _page);
QPalette errorPalette = _errorField->palette();
Expand Down
17 changes: 6 additions & 11 deletions test/gui/shared/scripts/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,16 @@
oCC_ShareLinkWidget_checkBox_expire_QProgressIndicator = {"aboveWidget": oCC_ShareLinkWidget_lineEdit_password_QLineEdit, "container": qt_tabwidget_stackedwidget_OCC_ShareLinkWidget_OCC_ShareLinkWidget, "leftWidget": oCC_ShareLinkWidget_checkBox_expire_QCheckBox, "type": "QProgressIndicator", "unnamed": 1, "visible": 1}
settings_settingsdialog_toolbutton_Add_account_QToolButton = {"name": "settingsdialog_toolbutton_Add account", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
settings_settingsdialog_toolbutton_Activity_QToolButton = {"name": "settingsdialog_toolbutton_Activity", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
disable_virtual_file_support_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Disable virtual file support?"}
disable_virtual_file_support_QMessageBox = {"name": "DisableVFSMessageBox", "type": "QMessageBox", "visible": 1}
owncloudWizard_urlLabel_QLabel = {"name": "urlLabel", "type": "QLabel", "visible": 1, "window": owncloudWizard_OCC_OwncloudWizard}
setupWizardWindow_OCC_Wizard_SetupWizardWindow = {"name": "SetupWizardWidget", "type": "OCC::Wizard::SetupWizardWidget", "visible": 1}
setupWizardWindow_contentWidget_QStackedWidget = {"name": "contentWidget", "type": "QStackedWidget", "visible": 1, "window": setupWizardWindow_OCC_Wizard_SetupWizardWindow}
insecure_connection_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Insecure connection"}
contentWidget_advancedConfigGroupBox_QGroupBox = {"container": setupWizardWindow_contentWidget_QStackedWidget, "name": "advancedConfigGroupBox", "type": "QGroupBox", "visible": 1}
advancedConfigGroupBox_localDirectoryGroupBox_QGroupBox = {"container": contentWidget_advancedConfigGroupBox_QGroupBox, "name": "localDirectoryGroupBox", "type": "QGroupBox", "visible": 1}
advancedConfigGroupBox_syncModeGroupBox_QGroupBox = {"container": contentWidget_advancedConfigGroupBox_QGroupBox, "name": "syncModeGroupBox", "type": "QGroupBox", "visible": 1}
add_Folder_Sync_Connection_OCC_FolderWizard = {"type": "OCC::FolderWizard", "unnamed": 1, "visible": 1, "windowTitle": "Add Folder Sync Connection"}
add_Folder_Sync_Connection_OCC_FolderWizard = {"name":"AddFolderSyncWizard", "type": "OCC::FolderWizard", "visible": 1}
add_Folder_Sync_Connection_groupBox_QGroupBox = {"name": "groupBox", "type": "QGroupBox", "visible": 1, "window": add_Folder_Sync_Connection_OCC_FolderWizard}
add_Folder_Sync_Connection_Deselect_remote_folders_you_do_not_wish_to_synchronize_QLabel = {"text": "Deselect remote folders you do not wish to synchronize.", "type": "QLabel", "unnamed": 1, "visible": 1, "window": add_Folder_Sync_Connection_OCC_FolderWizard}
add_Folder_Sync_Connection_Deselect_remote_folders_you_do_not_wish_to_synchronize_QLabel = {"type": "QLabel", "unnamed": 1, "visible": 1, "window": add_Folder_Sync_Connection_OCC_FolderWizard}
folder_Sync_Connection_Deselect_remote_folders_QTreeWidget = {"aboveWidget": add_Folder_Sync_Connection_Deselect_remote_folders_you_do_not_wish_to_synchronize_QLabel, "type": "QTreeWidget", "unnamed": 1, "visible": 1, "window": add_Folder_Sync_Connection_OCC_FolderWizard}
deselect_remote_folders_you_do_not_wish_to_synchronize_ownCloud_QModelIndex = {"column": 0, "container": folder_Sync_Connection_Deselect_remote_folders_QTreeWidget, "type": "QModelIndex"}
loginRequiredDialog_OCC_LoginRequiredDialog = {"name": "LoginRequiredDialog", "type": "OCC::LoginRequiredDialog", "visible": 1}
Expand All @@ -51,10 +50,8 @@
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}
dialogStack_quickWidget_QQuickWidget = {"container": settings_dialogStack_QStackedWidget, "name": "quickWidget", "type": "QQuickWidget", "visible": 1}
create_Remote_Folder_QInputDialog = {"type": "QInputDialog", "unnamed": 1, "visible": 1, "windowTitle": "Create Remote Folder"}
create_Remote_Folder_Enter_the_name_of_the_new_folder_to_be_created_below_QLabel = {"text": "Enter the name of the new folder to be created below '/':", "type": "QLabel", "unnamed": 1, "visible": 1, "window": create_Remote_Folder_QInputDialog}
groupBox_folderTreeWidget_QTreeWidget = {"container": add_Folder_Sync_Connection_groupBox_QGroupBox, "name": "folderTreeWidget", "type": "QTreeWidget", "visible": 1}
confirm_Folder_Sync_Connection_Removal_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Confirm Folder Sync Connection Removal"}
confirm_Folder_Sync_Connection_Removal_QMessageBox = {"name":"ConfirmFolderSyncRemovalMessageBox", "type": "QMessageBox", "visible": 1}
stackedWidget_quickWidget_OCC_QmlUtils_OCQuickWidget = {"container": stack_stackedWidget_QStackedWidget, "name": "quickWidget", "type": "OCC::QmlUtils::OCQuickWidget", "visible": 1}
qt_tabwidget_stackedwidget_OCC_LocalActivityWidget_OCC_LocalActivityWidget = {"container": stack_qt_tabwidget_stackedwidget_QStackedWidget, "name": "OCC__LocalActivityWidget", "type": "OCC::LocalActivityWidget", "visible": 1}
oCC_LocalActivityWidget_tableView_QTableView = {"container": qt_tabwidget_stackedwidget_OCC_LocalActivityWidget_OCC_LocalActivityWidget, "name": "_tableView", "type": "QTableView", "visible": 1}
Expand All @@ -64,7 +61,5 @@
stackedWidget_Add_Folder_Sync_Connection_QGroupBox = {"container": stack_stackedWidget_QStackedWidget, "title": "Add Folder Sync Connection", "type": "QGroupBox", "unnamed": 1, "visible": 1}
stackedWidget_groupBox_QGroupBox = {"container": settings_stack_QStackedWidget, "name": "groupBox", "type": "QGroupBox", "visible": 1}
groupBox_OCC_QmlUtils_OCQuickWidget = {"container": stackedWidget_groupBox_QGroupBox, "type": "OCC::QmlUtils::OCQuickWidget", "unnamed": 1, "visible": 1}
welcome_to_ownCloud_OCC_NewAccountWizard = {"type": "OCC::NewAccountWizard", "unnamed": 1, "visible": 1, "windowTitle": "Add account..."}
server_address_QLabel = {"text": "Enter your server address to get started. Your web browser will be opened to complete sign in.", "type": "QLabel", "unnamed": 1, "visible": 1, "window": welcome_to_ownCloud_OCC_NewAccountWizard}
leave_screen_QLabel = {"text": "Leave this screen open. A sign in prompt will appear in your web browser to connect you to the following address.", "type": "QLabel", "unnamed": 1, "visible": 1, "window": welcome_to_ownCloud_OCC_NewAccountWizard}
welcome_to_ownCloud_Folder_location_QLabel = {"text": "Download location", "type": "QLabel", "unnamed": 1, "visible": 1, "window": welcome_to_ownCloud_OCC_NewAccountWizard}
welcome_to_ownCloud_OCC_NewAccountWizard = {"name": "NewAccountWizard", "type": "OCC::NewAccountWizard", "visible": 1}
server_address_QLabel = {"type": "QLabel", "unnamed": 1, "visible": 1, "window": welcome_to_ownCloud_OCC_NewAccountWizard}
25 changes: 5 additions & 20 deletions test/gui/shared/scripts/pageObjects/AccountConnectionWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@

class AccountConnectionWizard:
SERVER_ADDRESS_BOX = {
"aboveWidget": names.server_address_QLabel,
"name": "ServerAddressLineEdit",
"type": "QLineEdit",
"unnamed": 1,
"visible": 1,
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
Expand Down Expand Up @@ -44,13 +43,6 @@ class AccountConnectionWizard:
"visible": 1,
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
CONFIRM_INSECURE_CONNECTION_BUTTON = {
"text": "Confirm",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
"window": names.insecure_connection_QMessageBox,
}
USERNAME_BOX = {
"container": names.contentWidget_OCC_QmlUtils_OCQuickWidget,
"id": "userNameField",
Expand All @@ -64,21 +56,18 @@ class AccountConnectionWizard:
"visible": True,
}
SELECT_LOCAL_FOLDER = {
"aboveWidget": names.welcome_to_ownCloud_Folder_location_QLabel,
"type": "QLineEdit",
"unnamed": 1,
"visible": 1,
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
DIRECTORY_NAME_BOX = {
"text": "Browse...",
"name": "BrowseButton",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
CHOOSE_BUTTON = {
"text": "Choose",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
Expand All @@ -102,16 +91,13 @@ class AccountConnectionWizard:
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
COPY_URL_TO_CLIPBOARD_BUTTON = {
"aboveWidget": names.leave_screen_QLabel,
"name": "CopyUrlToClipboardButton",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
CONF_SYNC_MANUALLY_RADIO_BUTTON = {
"text": "Sync and download folders manually",
"name": "SelectiveSyncRadioButton",
"type": "QRadioButton",
"unnamed": 1,
"visible": 1,
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
Expand All @@ -134,9 +120,8 @@ class AccountConnectionWizard:
"visible": 1,
}
SYNC_EVERYTHING_RADIO_BUTTON = {
"text": "Automatically sync and download folders and files",
"name": "SyncAllRadioButton",
"type": "QRadioButton",
"unnamed": 1,
"visible": 1,
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
}
Expand Down
5 changes: 2 additions & 3 deletions test/gui/shared/scripts/pageObjects/AccountSetting.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ class AccountSetting:
}
CONFIRM_REMOVE_CONNECTION_BUTTON = {
"container": names.settings_dialogStack_QStackedWidget,
"text": "Remove connection",
"name": "RemoveConnectionButton",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
}
ACCOUNT_CONNECTION_LABEL = {
Expand All @@ -45,7 +44,7 @@ class AccountSetting:
"visible": 1,
"window": names.settings_OCC_SettingsDialog,
}
CONFIRMATION_YES_BUTTON = {"text": "Yes", "type": "QPushButton", "visible": 1}
CONFIRMATION_YES_BUTTON = {"type": "QPushButton", "visible": 1}

@staticmethod
def account_action(action):
Expand Down
1 change: 0 additions & 1 deletion test/gui/shared/scripts/pageObjects/EnterPassword.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ class EnterPassword:
"visible": 1,
}
ACCEPT_CERTIFICATE_YES = {
"text": "Yes",
"type": "QPushButton",
"visible": 1,
"window": TLS_CERT_WINDOW,
Expand Down
1 change: 0 additions & 1 deletion test/gui/shared/scripts/pageObjects/Settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ class Settings:
"visible": 1,
}
ABOUT_DIALOG_OK_BUTTON = {
"text": "OK",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
Expand Down
9 changes: 3 additions & 6 deletions test/gui/shared/scripts/pageObjects/SyncConnection.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,28 +36,25 @@ class SyncConnection:
"visible": 1,
}
DISABLE_VFS_CONFIRMATION_BUTTON = {
"text": "Disable support",
"name": "DisableVFSSupportButton",
"type": "QPushButton",
"visible": 1,
"window": names.disable_virtual_file_support_QMessageBox,
}
SELECTIVE_SYNC_OK_BUTTON = {
"container": names.settings_stack_QStackedWidget,
"text": "OK",
"type": "QPushButton",
"visible": 1,
}
CANCEL_FOLDER_SYNC_CONNECTION_DIALOG = {
"text": "Cancel",
"name": "CancelFolderSyncDialog",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
"window": names.confirm_Folder_Sync_Connection_Removal_QMessageBox,
}
REMOVE_FOLDER_SYNC_CONNECTION_BUTTON = {
"text": "Remove Folder Sync Connection",
"name": "RemoveFolderSyncButton",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
"window": names.confirm_Folder_Sync_Connection_Removal_QMessageBox,
}
Expand Down
33 changes: 1 addition & 32 deletions test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,17 @@ class SyncConnectionWizard:
BACK_BUTTON = {
"window": names.add_Folder_Sync_Connection_OCC_FolderWizard,
"type": "QPushButton",
"text": "< &Back",
"visible": 1,
}
NEXT_BUTTON = {
"window": names.add_Folder_Sync_Connection_OCC_FolderWizard,
"name": "__qt__passive_wizardbutton1",
"type": "QPushButton",
"text": "&Next >",
"visible": 1,
}
SELECTIVE_SYNC_ROOT_FOLDER = {
"column": 0,
"container": names.folder_Sync_Connection_Deselect_remote_folders_QTreeWidget,
"text": get_config("client_name"),
"type": "QModelIndex",
}
SYNC_DIALOG_FOLDER_TREE = {
Expand All @@ -57,7 +55,6 @@ class SyncConnectionWizard:
"visible": 1,
}
VFS_CHECKBOX = {
"text": "Use virtual files instead of downloading content immediately",
"type": "QCheckBox",
"unnamed": 1,
"visible": 1,
Expand Down Expand Up @@ -87,19 +84,6 @@ class SyncConnectionWizard:
"type": "QPushButton",
"visible": 1,
}
CREATE_REMOTE_FOLDER_INPUT = {
"buddy": names.create_Remote_Folder_Enter_the_name_of_the_new_folder_to_be_created_below_QLabel,
"type": "QLineEdit",
"unnamed": 1,
"visible": 1,
}
CREATE_REMOTE_FOLDER_CONFIRM_BUTTON = {
"text": "OK",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
"window": names.create_Remote_Folder_QInputDialog,
}
REFRESH_BUTTON = {
"container": names.add_Folder_Sync_Connection_groupBox_QGroupBox,
"name": "refreshButton",
Expand Down Expand Up @@ -277,21 +261,6 @@ def sync_space(space_name):
)
SyncConnectionWizard.add_sync_connection()

@staticmethod
def create_folder_in_remote_destination(folder_name):
squish.clickButton(
squish.waitForObject(SyncConnectionWizard.CREATE_REMOTE_FOLDER_BUTTON)
)
squish.type(
squish.waitForObject(SyncConnectionWizard.CREATE_REMOTE_FOLDER_INPUT),
folder_name,
)
squish.clickButton(
squish.waitForObject(
SyncConnectionWizard.CREATE_REMOTE_FOLDER_CONFIRM_BUTTON
)
)

@staticmethod
def refresh_remote():
squish.clickButton(squish.waitForObject(SyncConnectionWizard.REFRESH_BUTTON))
Expand Down
1 change: 0 additions & 1 deletion test/gui/shared/scripts/pageObjects/Toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ class Toolbar:
"visible": 1,
}
CONFIRM_QUIT_BUTTON = {
"text": "Yes",
"type": "QPushButton",
"unnamed": 1,
"visible": 1,
Expand Down