Skip to content

Commit

Permalink
test: add a manual test
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Nov 21, 2024
1 parent fa88db0 commit e0f4fde
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/SamplesApp/UITests.Shared/UITests.Shared.projitems
Original file line number Diff line number Diff line change
Expand Up @@ -2474,6 +2474,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\ScrollViewerTests\ScrollViewer_IsIntermediate.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\ScrollViewerTests\ScrollViewer_Content_Smaller_Than_Viewport.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down Expand Up @@ -9552,6 +9556,9 @@
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\ScrollViewerTests\ScrollViewer_Simple.xaml.cs">
<DependentUpon>ScrollViewer_Simple.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\ScrollViewerTests\ScrollViewer_IsIntermediate.xaml.cs">
<DependentUpon>ScrollViewer_IsIntermediate.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\ScrollViewerTests\ScrollViewer_Content_Smaller_Than_Viewport.xaml.cs">
<DependentUpon>ScrollViewer_Content_Smaller_Than_Viewport.xaml</DependentUpon>
</Compile>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Page x:Class="UITests.Windows_UI_Xaml_Controls.ScrollViewerTests.ScrollViewer_IsIntermediate"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UITests.Windows_UI_Xaml_Controls.ScrollViewerTests"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<StackPanel>
<TextBlock>
Repro steps:
<LineBreak />
1. Scroll the ScrollViewer below using the scroll bar. You should see the status below possibly change to "Last ScrollViewerViewChangedEventArgs.IsIntermediate = true" but then it must end up on "Last ScrollViewerViewChangedEventArgs.IsIntermediate = false"
<LineBreak />
2. Scroll the ScrollViewer below using the mouse wheel. You should see the status below possibly change to "Last ScrollViewerViewChangedEventArgs.IsIntermediate = true" but then it must end up on "Last ScrollViewerViewChangedEventArgs.IsIntermediate = false"
</TextBlock>
<ScrollViewer Height="400" Width="400" ViewChanged="ScrollViewer_ViewChanged">
<Border Height="800" Width="800" Background="LightBlue" BorderBrush="Black" BorderThickness="2">
<TextBlock Text="Scroll me" />
</Border>
</ScrollViewer>
<TextBlock x:Name="statusTb" Text="Last ScrollViewerViewChangedEventArgs.IsIntermediate = N/A" />
</StackPanel>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using Microsoft.UI.Xaml.Controls;
using Uno.UI.Samples.Controls;

namespace UITests.Windows_UI_Xaml_Controls.ScrollViewerTests
{
[Sample("Scrolling", IsManualTest = true)]
public sealed partial class ScrollViewer_IsIntermediate : Page
{
public ScrollViewer_IsIntermediate()
{
this.InitializeComponent();
}

private void ScrollViewer_ViewChanged(object sender, ScrollViewerViewChangedEventArgs e)
{
statusTb.Text = $"Last ScrollViewerViewChangedEventArgs.IsIntermediate = {e.IsIntermediate}";
}
}
}

0 comments on commit e0f4fde

Please sign in to comment.