Conversation
…ally load a XAML based page by type for use within a a test Simplifies test development by letting us directly use (and re-use) XAML pages and code as we would normally, just like samples. Also brings over the helper 'Log' class from the Toolkit. Adds a test case for PropertySizer's initial value through binding.
|
XAML Style check was failing due to the location of the settings file. |
Also exposes need for alias for WinUI 2 based controls.
53c1e60 to
c8daf37
Compare
|
This is good to review and merge now as an initial test/improvement. Opened #143 to track next step in this work. |
…itestimprovements VisualUITestBase Improvements
Adds a
TestPageattribute to load a XAML page by type as content for a test into aTestPagevariable onVisualUITestBase.Tried to simplify to not require the extra dispatch (and merge into a
TestMethodAttributeitself), but hit the issue with MS Test not supporting UITestMethod + async as filed originally by @chingucoding here: microsoft/testfx#740 (comment)This simplifies test development by letting us directly use (and re-use) XAML pages and code as we would normally, just like samples.
Next Steps:
TestMethodWithXamlPageAttribute which includes the dispatch to the UI thread, though may rely on fix to MS Test itself (though we could take that directly first if it's scoped to the attribute method). Trying to get more details on that thread: Proposal: UIDataTestMethod / Support for DataRows in UITestMethods microsoft/testfx#740 (comment)I'll probably save input injection as another PR, but that'd be the next step.
FYI @mrlacey as he'll want to know if this is working.
Note: In the future we could maybe use some source generator vs. reflection here, but this was the first step to investigate how this'll work. @Arlodotexe curious on your thoughts in that space based on what the method does and how that would translate.