PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

Workspaceslib ut

Open vanzue opened this issue 6 months ago • 3 comments

This pull request introduces a new unit testing framework for the WorkspacesLib module, adds test coverage for various utilities, and integrates the new test project into the build system. Key changes include adding the WorkspacesLibUnitTests project, implementing tests for AppUtils, JsonUtils, and PwaHelper, and updating the build configuration to include the new test project.

Unit Tests Added:

  • AppUtilsTests:
    • Added comprehensive tests for methods such as GetCurrentFolder, IsEdge, IsChrome, and IsSteamGame to validate their behavior under various conditions.
  • JsonUtilsTests:
    • Implemented tests for reading and writing workspace data, including scenarios for invalid JSON, non-existent files, and valid workspace lists.
  • PwaHelperTests:
    • Added tests to ensure the stability of PwaHelper methods, such as GetEdgeAppId, GetChromeAppId, and SearchPwaName, even with invalid or empty inputs.

Build System Updates:

  • New Test Project Integration:
    • Added the WorkspacesLibUnitTests project to the solution file PowerToys.sln with appropriate dependencies.
    • Updated build configurations to include the new test project for both Debug and Release builds across architectures. [1] [2]

Pipeline Adjustments:

  • Test Discovery:
    • Updated the pipeline configuration in .pipelines/v2/templates/job-build-project.yml to discover the new WorkspacesLibUnitTests.dll during test runs.

vanzue avatar Jun 12 '25 08:06 vanzue

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (1)

notsteam

To accept these unrecognized words as correct, you could run the following commands

... in a clone of the [email protected]:vanzue/PowerToys.git repository on the workspaceslib-ut branch (:information_source: 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/15605601414/attempts/1' &&
git commit -m 'Update check-spelling metadata'
If the flagged items are :exploding_head: 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.

github-actions[bot] avatar Jun 12 '25 08:06 github-actions[bot]

@copilot Fix the pipeline spell checking error

vanzue avatar Jun 12 '25 08:06 vanzue

@check-spelling-bot Report

:red_circle: Please review

See the :open_file_folder: files view, the :scroll:action log, or :memo: job summary for details.

Unrecognized words (1)

notsteam

To accept these unrecognized words as correct, you could run the following commands

... in a clone of the [email protected]:vanzue/PowerToys.git repository on the workspaceslib-ut branch (:information_source: 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/15606368363/attempts/1' &&
git commit -m 'Update check-spelling metadata'
If the flagged items are :exploding_head: 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.

github-actions[bot] avatar Jun 12 '25 09:06 github-actions[bot]

image Verified tests included and passed.

vanzue avatar Jun 13 '25 02:06 vanzue