Skip to content

Commit 1a94dc7

Browse files
committed
add unique object identifiers
1 parent cf87f34 commit 1a94dc7

File tree

12 files changed

+26
-70
lines changed

12 files changed

+26
-70
lines changed

src/gui/accountsettings.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,12 @@ void AccountSettings::slotRemoveCurrentFolder(Folder *folder)
333333
"<p><b>Note:</b> This will <b>not</b> delete any files.</p>")
334334
.arg(shortGuiLocalPath),
335335
QMessageBox::NoButton, ocApp()->gui()->settingsDialog());
336+
messageBox->setObjectName("ConfirmFolderSyncRemovalMessageBox");
336337
messageBox->setAttribute(Qt::WA_DeleteOnClose);
337338
QPushButton *yesButton = messageBox->addButton(tr("Remove Folder Sync Connection"), QMessageBox::YesRole);
338-
messageBox->addButton(tr("Cancel"), QMessageBox::NoRole);
339+
yesButton->setObjectName("RemoveFolderSyncButton");
340+
QPushButton *cancelButton = messageBox->addButton(tr("Cancel"), QMessageBox::NoRole);
341+
cancelButton->setObjectName("CancelFolderSyncDialog");
339342
connect(messageBox, &QMessageBox::finished, this, [messageBox, yesButton, folder, this] {
340343
if (messageBox->clickedButton() == yesButton) {
341344
// todo: #3, this should be a signal to folderman
@@ -372,7 +375,9 @@ void AccountSettings::slotDisableVfsCurrentFolder(Folder *folder)
372375
"will become available again."
373376
"\n\n"
374377
"This action will abort any currently running synchronization."));
378+
msgBox->setObjectName("DisableVFSMessageBox");
375379
auto acceptButton = msgBox->addButton(tr("Disable support"), QMessageBox::AcceptRole);
380+
acceptButton->setObjectName("DisableVFSSupportButton");
376381
msgBox->addButton(tr("Cancel"), QMessageBox::RejectRole);
377382
connect(msgBox, &QMessageBox::finished, msgBox, [msgBox, folder, acceptButton] {
378383
msgBox->deleteLater();
@@ -734,6 +739,7 @@ void AccountSettings::slotDeleteAccount()
734739
.arg(_accountState->account()->displayNameWithHost()),
735740
QMessageBox::NoButton, this);
736741
auto yesButton = messageBox->addButton(tr("Remove connection"), QMessageBox::YesRole);
742+
yesButton->setObjectName("RemoveConnectionButton");
737743
messageBox->addButton(tr("Cancel"), QMessageBox::NoRole);
738744
messageBox->setAttribute(Qt::WA_DeleteOnClose);
739745
connect(messageBox, &QMessageBox::finished, this, [this, messageBox, yesButton]{

src/gui/folderwizard/folderwizard.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ FolderWizard::FolderWizard(Account *account, QWidget *parent)
151151
, d_ptr(new FolderWizardPrivate(this, account))
152152
{
153153
setWindowTitle(tr("Add Folder Sync Connection"));
154+
setObjectName("AddFolderSyncWizard");
154155
setOptions(QWizard::CancelButtonOnLeft);
155156
setButtonText(QWizard::FinishButton, tr("Add Sync Connection"));
156157
setWizardStyle(QWizard::ModernStyle);

src/gui/newaccountwizard/advancedsettingspagecontroller.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,13 @@ void AdvancedSettingsPageController::buildPage()
7777
layout->addWidget(vfsButton, Qt::AlignLeft);
7878

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

8485
QRadioButton *selectiveSyncButton = new QRadioButton(tr("Sync and download folders manually"), _page);
86+
selectiveSyncButton->setObjectName("SelectiveSyncRadioButton");
8587
selectiveSyncButton->setFocusPolicy(Qt::StrongFocus);
8688
_buttonGroup->addButton(selectiveSyncButton, NewAccount::SyncType::SELECTIVE_SYNC);
8789
layout->addWidget(selectiveSyncButton, Qt::AlignLeft);

src/gui/newaccountwizard/newaccountwizardcontroller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ void NewAccountWizardController::setupWizard()
5353
_wizard->setFixedSize(600, 450);
5454
_wizard->setWizardStyle(QWizard::ModernStyle);
5555
_wizard->setWindowTitle(tr("Add account..."));
56+
_wizard->setObjectName("NewAccountWizard");
5657

5758
QWizard::WizardOptions origOptions = _wizard->options();
5859
_wizard->setOptions(origOptions | QWizard::IndependentPages | QWizard::NoBackButtonOnStartPage);
@@ -207,7 +208,6 @@ void NewAccountWizardController::onPageChanged(int newPageIndex)
207208
_wizard->setButtonText(QWizard::WizardButton::NextButton, tr("Sign in"));
208209
} else if (newPageIndex == _oauthPageIndex) {
209210
_wizard->setButtonLayout(_buttonLayouts[_oauthPageIndex]);
210-
_wizard->setButtonText(QWizard::WizardButton::NextButton, tr("Open sign in again"));
211211
if (_autoValidateOAuthPage) {
212212
_autoValidateOAuthPage = false;
213213
_wizard->validateCurrentPage();

src/gui/newaccountwizard/oauthpagecontroller.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ void OAuthPageController::buildPage()
7676
_urlField->setAccessibleDescription(tr("To copy the sign in URL to the clipboard, use the copy button"));
7777

7878
_copyButton = new QPushButton(copyIcon(), QString(), _page);
79+
_copyButton->setObjectName("CopyUrlToClipboardButton");
7980
_copyButton->setFlat(true);
8081
_copyButton->setContentsMargins(0, 0, 0, 0);
8182
_copyButton->setFixedSize(_urlField->height(), _urlField->height());

src/gui/newaccountwizard/urlpagecontroller.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ void UrlPageController::buildPage()
8282
_urlField->setFocusPolicy(Qt::StrongFocus);
8383
_urlField->setAccessibleName(tr("Server address field"));
8484
_urlField->setAccessibleDescription(tr("Enter your server address here"));
85+
_urlField->setObjectName("ServerAddressLineEdit");
8586

8687
_errorField = new QLabel(QString(), _page);
8788
QPalette errorPalette = _errorField->palette();

test/gui/shared/scripts/names.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,14 @@
2828
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}
2929
settings_settingsdialog_toolbutton_Add_account_QToolButton = {"name": "settingsdialog_toolbutton_Add account", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
3030
settings_settingsdialog_toolbutton_Activity_QToolButton = {"name": "settingsdialog_toolbutton_Activity", "type": "QToolButton", "visible": 1, "window": settings_OCC_SettingsDialog}
31-
disable_virtual_file_support_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Disable virtual file support?"}
31+
disable_virtual_file_support_QMessageBox = {"name": "DisableVFSMessageBox", "type": "QMessageBox", "visible": 1}
3232
owncloudWizard_urlLabel_QLabel = {"name": "urlLabel", "type": "QLabel", "visible": 1, "window": owncloudWizard_OCC_OwncloudWizard}
3333
setupWizardWindow_OCC_Wizard_SetupWizardWindow = {"name": "SetupWizardWidget", "type": "OCC::Wizard::SetupWizardWidget", "visible": 1}
3434
setupWizardWindow_contentWidget_QStackedWidget = {"name": "contentWidget", "type": "QStackedWidget", "visible": 1, "window": setupWizardWindow_OCC_Wizard_SetupWizardWindow}
35-
insecure_connection_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Insecure connection"}
3635
contentWidget_advancedConfigGroupBox_QGroupBox = {"container": setupWizardWindow_contentWidget_QStackedWidget, "name": "advancedConfigGroupBox", "type": "QGroupBox", "visible": 1}
3736
advancedConfigGroupBox_localDirectoryGroupBox_QGroupBox = {"container": contentWidget_advancedConfigGroupBox_QGroupBox, "name": "localDirectoryGroupBox", "type": "QGroupBox", "visible": 1}
3837
advancedConfigGroupBox_syncModeGroupBox_QGroupBox = {"container": contentWidget_advancedConfigGroupBox_QGroupBox, "name": "syncModeGroupBox", "type": "QGroupBox", "visible": 1}
39-
add_Folder_Sync_Connection_OCC_FolderWizard = {"type": "OCC::FolderWizard", "unnamed": 1, "visible": 1, "windowTitle": "Add Folder Sync Connection"}
38+
add_Folder_Sync_Connection_OCC_FolderWizard = {"name":"AddFolderSyncWizard", "type": "OCC::FolderWizard", "visible": 1}
4039
add_Folder_Sync_Connection_groupBox_QGroupBox = {"name": "groupBox", "type": "QGroupBox", "visible": 1, "window": add_Folder_Sync_Connection_OCC_FolderWizard}
4140
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}
4241
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}
@@ -51,10 +50,8 @@
5150
quickWidget_scrollView_ScrollView = {"container": stackedWidget_quickWidget_QQuickWidget, "id": "scrollView", "type": "ScrollView", "unnamed": 1, "visible": True}
5251
scrollView_ListView = {"container": quickWidget_scrollView_ScrollView, "type": "ListView", "unnamed": 1, "visible": True}
5352
dialogStack_quickWidget_QQuickWidget = {"container": settings_dialogStack_QStackedWidget, "name": "quickWidget", "type": "QQuickWidget", "visible": 1}
54-
create_Remote_Folder_QInputDialog = {"type": "QInputDialog", "unnamed": 1, "visible": 1, "windowTitle": "Create Remote Folder"}
55-
create_Remote_Folder_Enter_the_name_of_the_new_folder_to_be_created_below_QLabel = {"type": "QLabel", "unnamed": 1, "visible": 1, "window": create_Remote_Folder_QInputDialog}
5653
groupBox_folderTreeWidget_QTreeWidget = {"container": add_Folder_Sync_Connection_groupBox_QGroupBox, "name": "folderTreeWidget", "type": "QTreeWidget", "visible": 1}
57-
confirm_Folder_Sync_Connection_Removal_QMessageBox = {"type": "QMessageBox", "unnamed": 1, "visible": 1, "windowTitle": "Confirm Folder Sync Connection Removal"}
54+
confirm_Folder_Sync_Connection_Removal_QMessageBox = {"name":"ConfirmFolderSyncRemovalMessageBox", "type": "QMessageBox", "visible": 1}
5855
stackedWidget_quickWidget_OCC_QmlUtils_OCQuickWidget = {"container": stack_stackedWidget_QStackedWidget, "name": "quickWidget", "type": "OCC::QmlUtils::OCQuickWidget", "visible": 1}
5956
qt_tabwidget_stackedwidget_OCC_LocalActivityWidget_OCC_LocalActivityWidget = {"container": stack_qt_tabwidget_stackedwidget_QStackedWidget, "name": "OCC__LocalActivityWidget", "type": "OCC::LocalActivityWidget", "visible": 1}
6057
oCC_LocalActivityWidget_tableView_QTableView = {"container": qt_tabwidget_stackedwidget_OCC_LocalActivityWidget_OCC_LocalActivityWidget, "name": "_tableView", "type": "QTableView", "visible": 1}
@@ -64,7 +61,5 @@
6461
stackedWidget_Add_Folder_Sync_Connection_QGroupBox = {"container": stack_stackedWidget_QStackedWidget, "title": "Add Folder Sync Connection", "type": "QGroupBox", "unnamed": 1, "visible": 1}
6562
stackedWidget_groupBox_QGroupBox = {"container": settings_stack_QStackedWidget, "name": "groupBox", "type": "QGroupBox", "visible": 1}
6663
groupBox_OCC_QmlUtils_OCQuickWidget = {"container": stackedWidget_groupBox_QGroupBox, "type": "OCC::QmlUtils::OCQuickWidget", "unnamed": 1, "visible": 1}
67-
welcome_to_ownCloud_OCC_NewAccountWizard = {"type": "OCC::NewAccountWizard", "unnamed": 1, "visible": 1, "windowTitle": "Add account..."}
64+
welcome_to_ownCloud_OCC_NewAccountWizard = {"name": "NewAccountWizard", "type": "OCC::NewAccountWizard", "visible": 1}
6865
server_address_QLabel = {"type": "QLabel", "unnamed": 1, "visible": 1, "window": welcome_to_ownCloud_OCC_NewAccountWizard}
69-
leave_screen_QLabel = {"type": "QLabel", "unnamed": 1, "visible": 1, "window": welcome_to_ownCloud_OCC_NewAccountWizard}
70-
welcome_to_ownCloud_Folder_location_QLabel = {"type": "QLabel", "unnamed": 1, "visible": 1, "window": welcome_to_ownCloud_OCC_NewAccountWizard}

test/gui/shared/scripts/pageObjects/AccountConnectionWizard.py

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414

1515
class AccountConnectionWizard:
1616
SERVER_ADDRESS_BOX = {
17-
"aboveWidget": names.server_address_QLabel,
17+
"name": "ServerAddressLineEdit",
1818
"type": "QLineEdit",
19-
"unnamed": 1,
2019
"visible": 1,
2120
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
2221
}
@@ -44,13 +43,6 @@ class AccountConnectionWizard:
4443
"visible": 1,
4544
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
4645
}
47-
CONFIRM_INSECURE_CONNECTION_BUTTON = {
48-
# "text": "Confirm",
49-
"type": "QPushButton",
50-
"unnamed": 1,
51-
"visible": 1,
52-
"window": names.insecure_connection_QMessageBox,
53-
}
5446
USERNAME_BOX = {
5547
"container": names.contentWidget_OCC_QmlUtils_OCQuickWidget,
5648
"id": "userNameField",
@@ -64,17 +56,14 @@ class AccountConnectionWizard:
6456
"visible": True,
6557
}
6658
SELECT_LOCAL_FOLDER = {
67-
"aboveWidget": names.welcome_to_ownCloud_Folder_location_QLabel,
6859
"type": "QLineEdit",
6960
"unnamed": 1,
7061
"visible": 1,
7162
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
7263
}
7364
DIRECTORY_NAME_BOX = {
7465
"name": "BrowseButton",
75-
# "text": "Browse...",
7666
"type": "QPushButton",
77-
"unnamed": 1,
7867
"visible": 1,
7968
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
8069
}
@@ -103,16 +92,13 @@ class AccountConnectionWizard:
10392
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
10493
}
10594
COPY_URL_TO_CLIPBOARD_BUTTON = {
106-
"aboveWidget": names.leave_screen_QLabel,
95+
"name": "CopyUrlToClipboardButton",
10796
"type": "QPushButton",
108-
"unnamed": 1,
10997
"visible": 1,
110-
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
11198
}
11299
CONF_SYNC_MANUALLY_RADIO_BUTTON = {
113-
# "text": "Sync and download folders manually",
100+
"name": "SelectiveSyncRadioButton",
114101
"type": "QRadioButton",
115-
"unnamed": 1,
116102
"visible": 1,
117103
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
118104
}
@@ -135,9 +121,8 @@ class AccountConnectionWizard:
135121
"visible": 1,
136122
}
137123
SYNC_EVERYTHING_RADIO_BUTTON = {
138-
# "text": "Automatically sync and download folders and files",
124+
"name": "SyncAllRadioButton",
139125
"type": "QRadioButton",
140-
"unnamed": 1,
141126
"visible": 1,
142127
"window": names.welcome_to_ownCloud_OCC_NewAccountWizard,
143128
}

test/gui/shared/scripts/pageObjects/AccountSetting.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,8 @@ class AccountSetting:
1717
}
1818
CONFIRM_REMOVE_CONNECTION_BUTTON = {
1919
"container": names.settings_dialogStack_QStackedWidget,
20-
# "text": "Remove connection",
20+
"name": "RemoveConnectionButton",
2121
"type": "QPushButton",
22-
"unnamed": 1,
2322
"visible": 1,
2423
}
2524
ACCOUNT_CONNECTION_LABEL = {

test/gui/shared/scripts/pageObjects/Settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ class Settings:
2525
"visible": 1,
2626
}
2727
ABOUT_DIALOG_OK_BUTTON = {
28-
# "text": "OK",
2928
"type": "QPushButton",
3029
"unnamed": 1,
3130
"visible": 1,

0 commit comments

Comments
 (0)