Merge branch 'master' into dev/jela/update-bootstrapper
This commit is contained in:
Коммит
3787798fe3
|
@ -50,4 +50,30 @@
|
|||
<UnoSourceGeneratorAdditionalProperty Include="UnoRemoteControlHost" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
Target used to warn the developer that overriden package binaries have been placed in the nuget cache.
|
||||
-->
|
||||
<Target Name="_UnoNotifyNugetOverride" BeforeTargets="PrepareProjectReferences">
|
||||
<ItemGroup>
|
||||
<!--
|
||||
If System.* files are present, the package may have been overriden by an Uno.UI solution
|
||||
version before the introduction of this check.
|
||||
-->
|
||||
<_OverrideFiles Include="$(MSBuildThisFileDirectory)../../tools/System*.dll"/>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<_warnForUnoOverride>false</_warnForUnoOverride>
|
||||
<_warnForUnoOverride Condition="'@(_OverrideFiles)'!='' or exists('$(MSBuildThisFileDirectory)../../.packageoverride')">true</_warnForUnoOverride>
|
||||
</PropertyGroup>
|
||||
<Warning Condition="$(_warnForUnoOverride)"
|
||||
Text="======================================"
|
||||
ContinueOnError="true" />
|
||||
<Warning Condition="$(_warnForUnoOverride)"
|
||||
Text="The Uno.UI nuget package has been overriden and may use modified files.
Clear this package version folder in the nuget cache to return to a stable state."
|
||||
ContinueOnError="true" />
|
||||
<Warning Condition="$(_warnForUnoOverride)"
|
||||
Text="======================================"
|
||||
ContinueOnError="true" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -164,5 +164,25 @@ namespace SamplesApp.UITests.Windows_UI_Xaml_Controls.TextBoxTests
|
|||
_app.EnterText(txt, "Works again!");
|
||||
_app.WaitForText(txt, "This is the starting text...Hello !Works again!");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[AutoRetry]
|
||||
public void PasswordBox_RevealInScrollViewer()
|
||||
{
|
||||
Run("Uno.UI.Samples.Content.UITests.TextBoxControl.PasswordBox_Reveal_Scroll");
|
||||
|
||||
var passwordBox = _app.WaitForElement("MyPasswordBox").Single();
|
||||
var initial = TakeScreenshot("initial");
|
||||
|
||||
// Focus the PasswordBox
|
||||
_app.TapCoordinates(passwordBox.Rect.X + 10, passwordBox.Rect.Y);
|
||||
|
||||
// Press the reveal button, and move up (so the ScrollViewer will kick in and cancel the pointer), then release
|
||||
_app.DragCoordinates(passwordBox.Rect.X + 10, passwordBox.Rect.Right - 10, passwordBox.Rect.X - 100, passwordBox.Rect.Right - 10);
|
||||
|
||||
var result = TakeScreenshot("result");
|
||||
|
||||
AssertScreenshotsAreEqual(initial, result, passwordBox.Rect);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -557,6 +557,10 @@
|
|||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\TextBox\PasswordBox_Reveal_Scroll.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\TextBox\TextBox_BeforeTextChanging.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -3006,6 +3010,9 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\TextBlockControl\TextBlock_Visibility_Arrange.xaml.cs">
|
||||
<DependentUpon>TextBlock_Visibility_Arrange.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\TextBox\PasswordBox_Reveal_Scroll.xaml.cs">
|
||||
<DependentUpon>PasswordBox_Reveal_Scroll.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\TextBox\TextBox_BeforeTextChanging.xaml.cs">
|
||||
<DependentUpon>TextBox_BeforeTextChanging.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -4901,6 +4908,7 @@
|
|||
<ItemGroup>
|
||||
<Folder Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\ChatBox\" />
|
||||
<Folder Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\DatePicker\Models\" />
|
||||
<Folder Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\PasswordBoxTests\" />
|
||||
<Folder Include="$(MSBuildThisFileDirectory)Windows_UI_Xaml_Controls\TimePicker\Model\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
<Page
|
||||
x:Class="Uno.UI.Samples.Content.UITests.TextBoxControl.PasswordBox_Reveal_Scroll"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||
|
||||
<Grid>
|
||||
<TextBlock
|
||||
Text="Focus the PasswordBox, press the reveal button, move pointer up, release pointer. The should no longer be readable."
|
||||
TextWrapping="Wrap"
|
||||
VerticalAlignment="Top" />
|
||||
|
||||
<!--The scroll take the full page: it must become scrollable when the keyboard is open-->
|
||||
<ScrollViewer VerticalAlignment="Stretch">
|
||||
<Grid>
|
||||
<PasswordBox
|
||||
x:Name="MyPasswordBox"
|
||||
BorderThickness="3"
|
||||
BorderBrush="Purple"
|
||||
Password="password1"
|
||||
Width="200"
|
||||
Height="50" />
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Page>
|
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Uno.UI.Samples.Controls;
|
||||
|
||||
namespace Uno.UI.Samples.Content.UITests.TextBoxControl
|
||||
{
|
||||
[SampleControlInfo(category: "TextBox")]
|
||||
public sealed partial class PasswordBox_Reveal_Scroll : Page
|
||||
{
|
||||
public PasswordBox_Reveal_Scroll()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -105,6 +105,10 @@
|
|||
</ItemGroup>
|
||||
<MakeDir Directories="$(_TargetNugetFolder)" />
|
||||
|
||||
<!-- Add override file to notify a developer that the used package is modified -->
|
||||
<WriteLinestoFile File="$(_TargetNugetFolder)\.packageoverride"
|
||||
Lines="$([System.DateTime]::Now.ToString('yyyyMMddTHHmmss')) from $(MSBuildThisFileDirectory)"
|
||||
Overwrite="True" />
|
||||
<Message Importance="high" Text="OVERRIDING NUGET PACKAGE CACHE: $(_TargetNugetFolder) and $(_TargetNugetRefFolder)" />
|
||||
|
||||
<Copy SourceFiles="@(_OutputFiles)"
|
||||
|
|
|
@ -41,6 +41,7 @@ namespace Windows.UI.Xaml.Controls
|
|||
_revealButton.AddHandler(PointerReleasedEvent, endReveal, handledEventsToo: true);
|
||||
_revealButton.AddHandler(PointerExitedEvent, endReveal, handledEventsToo: true);
|
||||
_revealButton.AddHandler(PointerCanceledEvent, endReveal, handledEventsToo: true);
|
||||
_revealButton.AddHandler(PointerCaptureLostEvent, endReveal, handledEventsToo: true);
|
||||
|
||||
_revealButtonSubscription.Disposable = Disposable.Create(() =>
|
||||
{
|
||||
|
@ -48,6 +49,7 @@ namespace Windows.UI.Xaml.Controls
|
|||
_revealButton.RemoveHandler(PointerReleasedEvent, endReveal);
|
||||
_revealButton.RemoveHandler(PointerExitedEvent, endReveal);
|
||||
_revealButton.RemoveHandler(PointerCanceledEvent, endReveal);
|
||||
_revealButton.RemoveHandler(PointerCaptureLostEvent, endReveal);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче