-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Add UITest Cases for Hosts Module and Improve UITestAutomation #37546
base: main
Are you sure you want to change the base?
Conversation
a. Adding Entry b. Empty View - Update UITest Framework, including: a. Add Pre/Post timeout for Click action. b. Add TextBox control which allow get/set Text c. Add more properties in Element Control. d. Remove unnecessary Assert in FindAll e. Add Shortcut (Find/FindAll) in TestBase to keep test-code shorter. f. Move FindHelper to root folder of UIAutomation project. g. Add ToggleSwitch control - Update PowerToys solution file to address inconsistent naming convention
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 5 out of 12 changed files in this pull request and generated no comments.
Files not reviewed (7)
- PowerToys.sln: Language not supported
- src/common/UITestAutomation/UITestAutomation.csproj: Language not supported
- src/modules/Hosts/Hosts.UITests/Hosts.UITests.csproj: Language not supported
- src/common/UITestAutomation/Element/Window.cs: Evaluated as low risk
- src/common/UITestAutomation/UITestBase.cs: Evaluated as low risk
- src/common/UITestAutomation/Session.cs: Evaluated as low risk
- src/common/UITestAutomation/FindHelper.cs: Evaluated as low risk
This comment has been minimized.
This comment has been minimized.
remove new from zoomit
{ | ||
if (clearText) | ||
{ | ||
PerformAction((actions, window) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current PerformAction method may not be suitable for SetText because it is designed for click actions and only calls MoveToElement. For TextBox, to simulate manual operation, it should move the mouse to the element and then click it. There are may two possible ways:
- Call the click function, and then directly call sendKeys.
- Create a new PerformAction method specifically for SetText
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to have preTimeout, Operations & postTimeout pattern setup, which is something like PerformAction.
design it only for click is not idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it would also be better to rename the 'window' here.
…om/microsoft/PowerToys into dev/nxu/AddUITestForHostFileModule
Add UITest cases for Hosts module, and Improve UITestAutomation framework by adding more features, fixing bugs.
Please take a look screen-recording here for reference:
https://github.com/user-attachments/assets/49b5b611-3dc7-43fd-ae6a-185ea8bc7e9b
PR Checklist
Detailed Description of the Pull Request / Additional comments
Changes including:
Add UITests for Hosts module
a. Add test for Adding-entry function
b. Add test for Empty-View
Update UITestAutomation Framework
a. Add Pre/Post timeout for Click action.
b. Add TextBox control which allow get/set Text
c. Add more properties in Element Control.
d. Remove unnecessary Assert in FindAll
e. Add Shortcut (Find/FindAll) in TestBase to keep test-code shorter.
f. Move FindHelper to root folder of UIAutomation project.
g. Add ToggleSwitch control
Update PowerToys solution file to address inconsistent naming convention
Validation Steps Performed