Skip to content

[UI automation] Add UI tests for Peek #39818

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 1 commit into
base: feature/UITestAutomation
Choose a base branch
from

Conversation

lei9444
Copy link
Contributor

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

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 PR adds UI automation tests for the Peek module to verify file preview behavior for various file types and interactions.

  • Introduces a markdown checklist template for Peek tests.
  • Implements UI tests in PeekFilePreviewTests.cs covering folder, image, PDF, ZIP, and QOI file previews.
  • Updates the project and solution files to include the new Peek.UITests test project.

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

File Description
src/modules/peek/Peek.UITests/tests-checklist-template-peek.md Adds a test checklist template for UI tests targeting Peek module.
src/modules/peek/Peek.UITests/PeekFilePreviewTests.cs Implements UI tests for file preview functionality in Peek.
src/modules/peek/Peek.UITests/Peek.UITests.csproj Adds project configuration for the new Peek UI tests.
PowerToys.sln Registers the new Peek.UITests project in the solution.


private void VisualAssertWindow(string windowTitle)
{
VisualAssert.AreEqual(this.TestContext, this.Find(windowTitle, 500, true), "EmptyView");
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.

[nitpick] Consider defining a constant for the timeout value (500) used in assertions to improve maintainability and ease future updates.

Suggested change
VisualAssert.AreEqual(this.TestContext, this.Find(windowTitle, 500, true), "EmptyView");
VisualAssert.AreEqual(this.TestContext, this.Find(windowTitle, AssertionTimeout, true), "EmptyView");

Copilot uses AI. Check for mistakes.

@yeelam-gordon yeelam-gordon added the Area-Tests issues that relate to tests label Jun 10, 2025
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.

2 participants