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

Merged
merged 143 commits into from
Jul 4, 2025
Merged

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

https://microsoft.visualstudio.com/Dart/_build/results?buildId=125637396&view=results

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.

@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.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

Copy link

github-actions bot commented Jul 4, 2025

@check-spelling-bot Report

🔴 Please review

See the 📂 files view, the 📜action log, or 📝 job summary for details.

Unrecognized words (39)
advancedpaste
appxpackage
Ashcraft
CDPX
commandnotfound
copyable
Corpor
cropandlock
environmentvariables
fileexploreraddons
filelocksmith
findmymouse
fucntion
fuzzingtesting
hostsfileeditor
hotfixes
IDOn
lcl
LIBFUZZER
makepri
mikeclayton
mousehighlighter
mousejump
mousepointer
mouseutils
MVPs
onebranch
PMs
Psr
quickaccent
regsvr
screenruler
sharpfuzz
sourced
stuttery
textextractor
Windowss
XLoc
zonability
These words are not needed and should be removed cleanmgr CLSCTXINPROCALL CLSCTXLOCALSERVER FILELOCKSMITH IIDI iwr psexec smileys TEXTEXTRACTOR windowsterminal Zhiwei

Some files were automatically ignored 🙈

These sample patterns would exclude them:

^src/common/CalculatorEngineCommon/exprtk\.hpp$

You should consider adding them to:

.github/actions/spell-check/excludes.txt

File matching is via Perl regular expressions.

To check these files, more of their words need to be in the dictionary than not. You can use patterns.txt to exclude portions, add items to the dictionary (e.g. by adding them to allow.txt), or fix typos.

To accept these unrecognized words as correct, update file exclusions, and remove the previously acknowledged and now absent words, you could run the following commands

... in a clone of the git@github.com:microsoft/PowerToys.git repository
on the dev/vanzue/workspace-automation branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/16063624216/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Forbidden patterns 🙅 (2)

In order to address this, you could change the content to not match the forbidden patterns (comments before forbidden patterns may help explain why they're forbidden), add patterns for acceptable instances, or adjust the forbidden patterns themselves.

These forbidden patterns matched content:

Do not use (click) here links

For more information, see:

(?i)(?:>|\[)(?:(?:click |)here|this(?=\]\([^\)]+:/)|link|(?:read |)more(?!</value))(?:</|\]\()

Should be greater than

\bhigher than\b
Pattern suggestions ✂️ (1)

You could add these patterns to .github/actions/spell-check/patterns.txt:

# Automatically suggested patterns

# hit-count: 1 file-count: 1
# curl arguments
\b(?:\\n|)curl(?:\.exe|)(?:\s+-[a-zA-Z]{1,2}\b)*(?:\s+-[a-zA-Z]{3,})(?:\s+-[a-zA-Z]+)*

Alternatively, if a pattern suggestion doesn't make sense for this project, add a #
to the beginning of the line in the candidates file with the pattern to stop suggesting it.

Errors, Warnings, and Notices ❌ (5)

See the 📂 files view, the 📜action log, or 📝 job summary for details.

❌ Errors, Warnings, and Notices Count
ℹ️ candidate-pattern 1
❌ check-file-path 20
❌ forbidden-pattern 2
⚠️ ignored-expect-variant 1
⚠️ large-file 1

See ❌ Event descriptions for more information.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

Copy link
Contributor

@yeelam-gordon yeelam-gordon left a comment

Choose a reason for hiding this comment

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

Here is the comment I gave to Kai, which can be fix in next round:

  1. Don't comment the code, we can mark those test as disable
  2. If there is already a wrapper method, or very common case like "Click", then usually follow by "Task.Delay(XXX).Wait();", let's add additional parameters with default value for sleep instead of doing at the Test method.
    The Goal is the Test method should be easily to be understand what it is doing, not flushing by sleep nearly 50% to 80% operation like now.

@vanzue vanzue merged commit 03a9ac1 into main Jul 4, 2025
14 checks passed
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