Skip to content

Conversation

@anon-pradip
Copy link
Contributor

@anon-pradip anon-pradip commented Sep 4, 2025

This PR adds test for selective sub-folder exclusion scenario.

Note: There are two windows where selection/deselection of resources can happen:

  1. Add space window:
removed_space_then_add_space_select_remote_folders



  1. Choose what to sync window
after_clicking_chhose_what_to_sync

Changes:

  • 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_sync method.

  • test/gui/shared/scripts/pageObjects/SyncConnectionWizard.py: Renamed SYNC_DIALOG_FOLDER_TREE to ADD_SPACE_FOLDER_TREE for clarity in distinguishing add-space vs. choose-what-to-sync dialogs; added CHOOSE_WHAT_TO_SYNC_FOLDER_TREE locator for "Choose what to sync" dialog support; removed unused select_folders_to_sync method; added select_or_unselect_folders_to_sync for unified select/unselect logic with dialog parameter; added confirm_choose_what_to_sync_selection to click OK in "Choose what to sync" dialog; added _handle_folder_selection helper to perform action and confirm based on dialog type; refactored unselect_folders_to_sync and select_folders_to_sync to use helper with dialog flag; added get_folder_tree_locator to 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

@anon-pradip anon-pradip self-assigned this Sep 4, 2025
@anon-pradip anon-pradip force-pushed the test/selective-sync-only-some-folders branch 4 times, most recently from dd62929 to 8e11249 Compare September 5, 2025 11:37
@anon-pradip anon-pradip force-pushed the test/selective-sync-only-some-folders branch 2 times, most recently from 281c843 to 6ccbd88 Compare September 8, 2025 05:58
@anon-pradip anon-pradip force-pushed the test/selective-sync-only-some-folders branch from 6ccbd88 to a6be2b3 Compare September 26, 2025 04:24
@anon-pradip anon-pradip marked this pull request as ready for review September 26, 2025 05:24
)
else:
squish.doubleClick(squish.waitForObject(selector))
SyncConnectionWizard.select_or_unselect_folders_to_sync(folders, select=True)
Copy link
Contributor

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?

Copy link
Contributor Author

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):
Copy link
Contributor

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

Copy link
Contributor Author

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

@anon-pradip anon-pradip force-pushed the test/selective-sync-only-some-folders branch 6 times, most recently from 414702d to 0ee2951 Compare November 4, 2025 09:59
@anon-pradip anon-pradip force-pushed the test/selective-sync-only-some-folders branch from 0ee2951 to 11041af Compare November 6, 2025 10:20
@anon-pradip anon-pradip requested a review from saw-jan November 6, 2025 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants