Skip to content

Commit

Permalink
Merge pull request #19208 from unoplatform/dev/mazi/cleanup-samples
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund authored Jan 18, 2025
2 parents f3e1be0 + e9a15ef commit 4c8b326
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 50 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Row="0">
<StackPanel Grid.Row="0" Spacing="4">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
Expand All @@ -34,16 +34,24 @@
<Button
x:Name="runButton"
Grid.Column="0"
Content="▶ Run"
Click="OnRunTests"
Margin="0,0,4,0"/>
Margin="0,0,4,0">
<StackPanel Orientation="Horizontal" Spacing="8">
<SymbolIcon Symbol="Play" />
<TextBlock Text="Run" />
</StackPanel>
</Button>
<Button
x:Name="stopButton"
Grid.Column="1"
IsEnabled="False"
Content="⏹️ Stop"
Click="OnStopTests"
Margin="0,0,4,0" />
Margin="0,0,4,0">
<StackPanel Orientation="Horizontal" Spacing="8">
<SymbolIcon Symbol="Stop" />
<TextBlock Text="Stop" />
</StackPanel>
</Button>
<TextBox
x:Name="testFilter"
Grid.Column="2"
Expand All @@ -56,68 +64,68 @@
<Button.Flyout>
<Flyout>
<StackPanel>
<ToggleButton
x:Name="consoleOutput"
Content="🖥️ Console Output"
/>
<ToggleButton
x:Name="runIgnored"
Content="🚫 Run [Ignore]"
/>
<ToggleButton
x:Name="retry"
IsChecked="True"
Content="➰ Auto retry"
/>
<ToggleButton x:Name="consoleOutput">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon Glyph="&#xED0D;" />
<TextBlock Text="Console Output" />
</StackPanel>
</ToggleButton>
<ToggleButton x:Name="runIgnored">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon Glyph="&#xEE35;" />
<TextBlock Text="Run ignored tests" />
</StackPanel>
</ToggleButton>
<ToggleButton x:Name="retry" IsChecked="True">
<StackPanel Orientation="Horizontal" Spacing="8">
<FontIcon Glyph="&#xEC57;" />
<TextBlock Text="Auto retry" />
</StackPanel>
</ToggleButton>
</StackPanel>
</Flyout>
</Button.Flyout>
</Button>
</Grid>

<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Horizontal" Margin="0,8">
<TextBlock Text="Status: " />
<TextBlock x:Name="runStatus" Text="Not initialized" />
</StackPanel>

<StackPanel Orientation="Horizontal">
<TextBlock
FontSize="15"
Text="🏃‍: "
/>
<TextBlock
FontSize="15"
x:Name="runTestCount"
Text="None" />
<StackPanel Orientation="Horizontal" Spacing="8" Margin="0,0,0,8">
<StackPanel.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Width" Value="40" />
</Style>
<Style TargetType="FontIcon">
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</StackPanel.Resources>

<FontIcon Glyph="&#xE768;" />
<TextBlock
FontSize="15"
Text=" 🚫: "
/>
<TextBlock
FontSize="15"
x:Name="ignoredTestCount"
Foreground="DarkGray"
x:Name="runTestCount"
Text="None" />

<FontIcon Glyph="&#xE73E;" Foreground="DarkGreen" />
<TextBlock
FontSize="15"
Text=" ✔️: "
/>
<TextBlock
FontSize="15"
x:Name="succeededTestCount"
Foreground="DarkGreen"
Text="None" />

<FontIcon Glyph="&#xE711;" Foreground="Red" />
<TextBlock
FontSize="15"
Text=" ❌: " />
<TextBlock
FontSize="15"
x:Name="failedTestCount"
Foreground="Red"
Text="None" />

<FontIcon Glyph="&#xEE35;" Foreground="DarkGray" />
<TextBlock
x:Name="ignoredTestCount"
Foreground="DarkGray"
Text="None" />
</StackPanel>
</StackPanel>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace UITests.Shared.Microsoft_UI;

[Sample("Microsoft.UI", "ColorHelper", Description = "Demonstrates use of Microsoft.UI.ColorHelper. Until WinUI3 1.6+ this currently only works on Uno targets", ViewModelType = typeof(ColorHelperTestsViewModel), IgnoreInSnapshotTests = true)]
[Sample("Microsoft.UI", Description = "Demonstrates use of Microsoft.UI.ColorHelper. Until WinUI3 1.6+ this currently only works on Uno targets", ViewModelType = typeof(ColorHelperTestsViewModel), IgnoreInSnapshotTests = true)]
public sealed partial class ColorHelperTests : UserControl
{
public ColorHelperTests()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

namespace UITests.Shared.Windows_UI_Xaml_Controls.CheckBoxTests
{
[SampleControlInfo("CheckBox")]
[SampleControlInfo("Buttons")]
public sealed partial class CheckBox_Automated : UserControl
{
public CheckBox_Automated()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

namespace UITests.Windows_UI_Xaml_Controls.CheckBoxTests
{
[Sample("CheckBox")]
[Sample("Buttons")]
public sealed partial class CheckBox_States : Page
{
public CheckBox_States()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Uno.UI.Samples.Content.UITests.TextBlockControl
{
[Sample]
[Sample("TextBlock")]
public sealed partial class Simple_Contrained_Horizontal_Center_Wrap : Page
{
public Simple_Contrained_Horizontal_Center_Wrap()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Uno.UI.Samples.Content.UITests.TextBlockControl
{
[SampleControlInfo("TextBlockControl", "Simple_Text_Arabic")]
[SampleControlInfo("TextBlock", "Simple_Text_Arabic")]
public sealed partial class Simple_Text_Arabic : UserControl
{
public Simple_Text_Arabic()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

namespace UITests.Shared.Windows_UI_Xaml_Media.CompositionTargetTests
{
[SampleControlInfo("Composition", "CompositionTarget_Rendering", description: "Demonstrates the CompositionTarget.Rendering event")]
[SampleControlInfo("Microsoft.UI.Xaml.Media", "CompositionTarget_Rendering", description: "Demonstrates the CompositionTarget.Rendering event")]
public sealed partial class CompositionTarget_Rendering : UserControl
{
public CompositionTarget_Rendering()
Expand Down

0 comments on commit 4c8b326

Please sign in to comment.