Skip to content

Commit

Permalink
add powertoys setting UI name to fix WinAppDriver Luanch error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhaopeng Wang (from Dev Box) committed Jan 22, 2025
1 parent d8feddc commit 342d24c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 41 deletions.
36 changes: 0 additions & 36 deletions src/modules/fancyzones/UITests-FancyZones/Init.cs

This file was deleted.

28 changes: 24 additions & 4 deletions src/modules/fancyzones/UITests-FancyZones/RunFancyZonesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,51 @@
// See the LICENSE file in the project root for more information.

using Microsoft.FancyZones.UnitTests.Utils;
using Microsoft.UITests.API;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace UITests_FancyZones
{
[TestClass]
public class RunFancyZonesTest
{
private static FancyZonesSession? _session;
private const string PowerToysPath = @"\..\..\..\WinUI3Apps\PowerToys.Settings.exe";
private static UITestAPI? _uITestAPI;

private static TestContext? _context;

[ClassInitialize]
public static void ClassInitialize(TestContext testContext)
{
_session = new FancyZonesSession(testContext);
}

[ClassCleanup]
public static void ClassCleanup()
{
_session?.Close();
}

[TestInitialize]
public void TestInitialize()
{
_uITestAPI = new UITestAPI();
_uITestAPI.Init(PowerToysPath);
}

[TestCleanup]
public void TestCleanup()
{
if (_uITestAPI != null && _context != null)
{
_uITestAPI.Close(_context);
}

_context = null;
}

[TestMethod]
public void RunFancyZones()
{
Assert.IsNotNull(_session?.FancyZonesProcess);
Assert.IsNotNull(_uITestAPI);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\UITestAPI\UITestAPI.csproj" />
<Folder Include="Properties\" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
xmlns:viewmodels="using:Microsoft.PowerToys.Settings.UI.ViewModels"
AutomationProperties.LandmarkType="Main"
DataContext="DashboardViewModel"
mc:Ignorable="d">
mc:Ignorable="d"
x:Name="MainWindow1">

<Page.Resources>
<DataTemplate x:Key="KeyVisualTemplate">
Expand Down

1 comment on commit 342d24c

@github-actions
Copy link

Choose a reason for hiding this comment

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

@check-spelling-bot Report

🔴 Please review

See the 📜action log or 📝 job summary for details.

Unrecognized words (1)

ITest

These words are not needed and should be removed accctrl aclapi AMPROPERTY AMPROPSETID appdata Appium appmodel atlbase atlcom atlfile atlstr bootstrapper caniuse CDEF ceq cguid Cmds cne codicon comdef commandline commctrl commdlg comutil consts contentdialog cppwinrt CRSEL crx dcommon dcomp DCs ddf desktopwindowxamlsource devenum DEVMON devpkey DEVSOURCE DIIRFLAG dshow DVH DVHD DVSD DVSL dxgidebug dxgiformat EData emmintrin Emoji endpointvolume ERole evntrace exdisp fdw FILEINFOSIG Filtergraph Filterx Functiondiscoverykeys guiddef HCERTSTORE hinstance hstring IKs iljxck Intelli ipreviewhandlervisualssetfont IYUV junja Knownfolders KSPROPERTY lcb ldx lld lmcons LONGLONG lpt LTRB majortype makecab MEDIASUBTYPE mediatype mfapi mfidl mfobjects mfplat mftransform mic Minimatch mjpg mmdeviceapi mmsystem msedge Msimg msiquery newdev nodoc notlike ntfs Objbase objidl ORAW outpin outputtype overlaywindow pathcch PAUDIO PINDIR Pnp ppmt Preinstalled previouscamera processthreadsapi PROPBAG propkey propvarutil redistributable reencode reencoded REFGUID REGFILTER REGFILTERPINS REGPINTYPES regsvr Renamer reparse restrictederrorinfo roadmap ruleset runtimes shellapi shellscalingapi shldisp shlobj shmem sizeread stl strsafe strutil subquery SWC SYNCMFT tailwindcss tapp thumbcache tlhelp TMPVAR Toolset touchpad Tsd uninstantiated uniquifier Unknwn unregistering urlmon USERDATA vcdl vdi verrsrc vid VIDCAP VIDEOINFOHEADER vih wcautil webcam wincodec Wincodecsdk windef windowsapp windowsx winerror winevt winexe winforms winsdkver winternl wistd wsl wtsapi WVC

To accept these unrecognized words as correct 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 zhaopengwang/UITestAPI branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/v0.0.24/apply.pl' |
perl - 'https://github.com/microsoft/PowerToys/actions/runs/12903489587/attempts/1'
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.

Please sign in to comment.