-
Notifications
You must be signed in to change notification settings - Fork 14
test: selective sync for selected folders #519
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
base: main
Are you sure you want to change the base?
Conversation
dd62929 to
8e11249
Compare
281c843 to
6ccbd88
Compare
6ccbd88 to
a6be2b3
Compare
| ) | ||
| else: | ||
| squish.doubleClick(squish.waitForObject(selector)) | ||
| SyncConnectionWizard.select_or_unselect_folders_to_sync(folders, select=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not calling SyncConnectionWizard.select_or_unselect_folders_to_sync directly where now select_folders_to_sync is used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the step definition mentions selection explicitly. So including select_folders_to_sync makes it more readable and for Encapsulation also.
| ).enabled | ||
|
|
||
| @staticmethod | ||
| def select_or_unselect_folders_to_sync(folders, select=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the naming is confusing as this is not about select and unselect but about two different wizards that have slightly different locators
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I introduced in_choose_what_to_sync_dialog flag to be more specific related to specific widget
414702d to
0ee2951
Compare
0ee2951 to
11041af
Compare
This PR adds test for selective sub-folder exclusion scenario.
Note: There are two windows where selection/deselection of resources can happen:
Add spacewindow:Choose what to syncwindowChanges:
test/gui/shared/scripts/names.py: Added object definitions for UI elements in the "Choose what to sync" dialog (QLabel, QTreeWidget, QModelIndex, QPushButton) to support folder deselection functionality.
test/gui/shared/scripts/pageObjects/SyncConnection.py: Removed unused
unselect_folder_in_selective_syncmethod.test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py: Renamed
SYNC_DIALOG_FOLDER_TREEtoADD_SPACE_FOLDER_TREEfor clarity in distinguishing add-space vs. choose-what-to-sync dialogs; addedCHOOSE_WHAT_TO_SYNC_FOLDER_TREElocator for "Choose what to sync" dialog support; removed unusedselect_folders_to_syncmethod; addedselect_or_unselect_folders_to_syncfor unified select/unselect logic with dialog parameter; addedconfirm_choose_what_to_sync_selectionto click OK in "Choose what to sync" dialog; added_handle_folder_selectionhelper to perform action and confirm based on dialog type; refactoredunselect_folders_to_syncandselect_folders_to_syncto use helper with dialog flag; addedget_folder_tree_locatorto return appropriate locator based on dialog context.test/gui/shared/steps/file_context.py: Consolidated separate "should exist" and "should not exist" steps into a single regex-based step for files/folders, reducing duplication
test/gui/tst_syncing/test.feature: Added scenario "Unselected subfolders are excluded from local sync"
Part of: #370
Blockage: Could not test on windows due to #435