@@ -29,6 +29,49 @@ class SyncConnection:
29
29
"type" : "QPushButton" ,
30
30
"visible" : 1 ,
31
31
}
32
+ ADD_FOLDER_SYNC_BUTTON = {
33
+ "container" : names .settings_stack_QStackedWidget ,
34
+ "name" : "addButton" ,
35
+ "type" : "QPushButton" ,
36
+ "visible" : 1 ,
37
+ }
38
+ NAVIGATE_BACK_BUTTON = {
39
+ "name" : "__qt__passive_wizardbutton0" ,
40
+ "type" : "QPushButton" ,
41
+ "visible" : 1 ,
42
+ "window" : names .add_Folder_Sync_Connection_OCC_FolderWizard ,
43
+ }
44
+ ADD_FOLDER_BUTTON = {
45
+ "container" : names .add_Folder_Sync_Connection_groupBox_QGroupBox ,
46
+ "name" : "addFolderButton" ,
47
+ "type" : "QPushButton" ,
48
+ "visible" : 1 ,
49
+ }
50
+ ADD_FOLDER_INPUT = {
51
+ "buddy" : names .create_Remote_Folder_Enter_the_name_of_the_new_folder_to_be_created_below_QLabel ,
52
+ "type" : "QLineEdit" ,
53
+ "unnamed" : 1 ,
54
+ "visible" : 1 ,
55
+ }
56
+ ADD_FOLDER_CONFIRM = {
57
+ "text" : "OK" ,
58
+ "type" : "QPushButton" ,
59
+ "unnamed" : 1 ,
60
+ "visible" : 1 ,
61
+ "window" : names .create_Remote_Folder_QInputDialog ,
62
+ }
63
+ REFRESH_BUTTON = {
64
+ "container" : names .add_Folder_Sync_Connection_groupBox_QGroupBox ,
65
+ "name" : "refreshButton" ,
66
+ "type" : "QPushButton" ,
67
+ "visible" : 1 ,
68
+ }
69
+ FOLDER_ENTRY_INPUT = {
70
+ "name" : "folderEntry" ,
71
+ "type" : "QLineEdit" ,
72
+ "visible" : 1 ,
73
+ "window" : names .add_Folder_Sync_Connection_OCC_FolderWizard ,
74
+ }
32
75
33
76
@staticmethod
34
77
def openMenu ():
@@ -111,3 +154,36 @@ def unselect_folder_in_selective_sync(folder_name):
111
154
squish .clickButton (
112
155
squish .waitForObject (SyncConnection .SELECTIVE_SYNC_APPLY_BUTTON )
113
156
)
157
+
158
+ @staticmethod
159
+ def click_on_add_button ():
160
+ squish .clickButton (squish .waitForObject (SyncConnection .ADD_FOLDER_SYNC_BUTTON ))
161
+
162
+ @staticmethod
163
+ def navigate_back ():
164
+ squish .clickButton (squish .waitForObject (SyncConnection .NAVIGATE_BACK_BUTTON ))
165
+
166
+ @staticmethod
167
+ def create_folder_in_remote_destination (folderName ):
168
+ squish .clickButton (squish .waitForObject (SyncConnection .ADD_FOLDER_BUTTON ))
169
+ squish .type (squish .waitForObject (SyncConnection .ADD_FOLDER_INPUT ), folderName )
170
+ squish .clickButton (squish .waitForObject (SyncConnection .ADD_FOLDER_CONFIRM ))
171
+
172
+ @staticmethod
173
+ def refresh_add_folder_sync_connection_window ():
174
+ squish .clickButton (squish .waitForObject (SyncConnection .REFRESH_BUTTON ))
175
+
176
+ @staticmethod
177
+ def check_foldername (folderName ):
178
+ return (
179
+ str (
180
+ squish .waitForObjectExists (
181
+ SyncConnection .FOLDER_ENTRY_INPUT
182
+ ).displayText
183
+ ).strip ('/' )
184
+ == folderName
185
+ )
186
+
187
+ @staticmethod
188
+ def check_connection_folder_entry (folderName ):
189
+ return squish .waitFor (lambda : SyncConnection .check_foldername (folderName ), 5000 )
0 commit comments