Skip to content

[UI automation] workspaces ui automation #39812

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

Open
wants to merge 139 commits into
base: main
Choose a base branch
from

Conversation

vanzue
Copy link
Contributor

@vanzue vanzue commented May 30, 2025

Summary of the Pull Request

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

image

…t/PowerToys into dev/vanzue/workspace-automation

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@vanzue vanzue marked this pull request as ready for review June 4, 2025 10:30

This comment has been minimized.

@yeelam-gordon yeelam-gordon added the Area-Tests issues that relate to tests label Jun 10, 2025
@yeelam-gordon yeelam-gordon requested a review from Copilot June 10, 2025 04:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request introduces UI automation tests and related automation base classes for the Workspaces module. Key changes include adding checklist documentation for UI automation, several new and updated test methods for workspaces functionality, and improvements to UI elements and helper classes to support test automation.

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui-automation-workspace.md Added checklist for manual UI automation test steps.
WorkspacesUiAutomationBase.cs Introduced helper methods for workspace automation and improved workspace management functions.
WorkspacesSnapshotTests.cs, WorkspacesSettingsTests.cs, WorkspacesLauncherTest.cs, WorkspacesEditorTests.cs Added and updated test cases covering workspace capture, launch, sorting, and settings interactions.
MainPage.xaml(.cs) and WorkspacesEditorPage.xaml Updated UI elements (e.g., AutomationProperties, Popup handling) for better testability.
MainViewModel.cs, KeyboardHelper.cs, WindowHelper.cs, PowerToys.sln Minor enhancements to process startup, key translation, helper accessibility, and solution configuration.

// DO NOT USE UNTIL FRAMEWORK AVAILABLE, CAN'T FIND BUTTON FOR SECOND LOOP
protected void ClearWorkspaces()
{
while (true)
Copy link
Preview

Copilot AI Jun 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ClearWorkspaces method uses an infinite loop with a try-catch block to exit, which may lead to endless iterations in unexpected scenarios. Consider adding a maximum retry counter or timeout mechanism to prevent potential infinite looping.

Suggested change
while (true)
const int MAX_RETRIES = 10;
int retryCount = 0;
while (retryCount < MAX_RETRIES)

Copilot uses AI. Check for mistakes.

@vanzue vanzue requested a review from a team as a code owner June 30, 2025 02:25
@vanzue vanzue changed the base branch from feature/UITestAutomation to main June 30, 2025 02:38

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Tests issues that relate to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants