зеркало из https://github.com/DeGsoft/maui-linux.git
Merge branch '3.6.0' into 4.0.0
This commit is contained in:
Коммит
fd2dd4a342
|
@ -1,13 +0,0 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<ProguardConfiguration Include="$(MSBuildThisFileDirectory)proguard.cfg" />
|
||||
</ItemGroup>
|
||||
<Target Name="ValidateTargetFrameworkVersionForForms" BeforeTargets="CoreCompile" Condition="'$(XFDisableTargetFrameworkValidation)' != 'True'">
|
||||
<PropertyGroup>
|
||||
<MinTargetFrameworkVersionForForms>8.1</MinTargetFrameworkVersionForForms>
|
||||
<TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</TargetFrameworkVersionWithoutV>
|
||||
</PropertyGroup>
|
||||
<Error Code="XF005" Condition="$(TargetFrameworkVersionWithoutV) < $(MinTargetFrameworkVersionForForms)"
|
||||
Text="The %24(TargetFrameworkVersion) for $(ProjectName) ($(TargetFrameworkVersion)) is less than the minimum required %24(TargetFrameworkVersion) for Xamarin.Forms ($(MinTargetFrameworkVersionForForms)). You need to increase the %24(TargetFrameworkVersion) for $(ProjectName)." />
|
||||
</Target>
|
||||
</Project>
|
|
@ -154,7 +154,6 @@
|
|||
<file src="..\Xamarin.Forms.Xaml.Design\bin\$Configuration$\Xamarin.Forms.Xaml.Design.dll" target="lib\tizen40\Design" />
|
||||
|
||||
<!--Android 10-->
|
||||
<file src="Xamarin.Forms.Android.targets" target="build\MonoAndroid10\Xamarin.Forms.targets" />
|
||||
<file src="proguard.cfg" target="build\MonoAndroid10\proguard.cfg" />
|
||||
|
||||
<!--Android 81-->
|
||||
|
|
|
@ -143,4 +143,36 @@
|
|||
<Compile Include="@(_CSSOutputs)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
Platform Specific Targets.
|
||||
We can't use a framework specific targets file because it breaks shared projects i.e. /build/MonoAndroid10/Xamarin.Forms.targets
|
||||
-->
|
||||
|
||||
<!-- MonoAndroid targets. -->
|
||||
<PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == 'MonoAndroid'">
|
||||
<CoreCompileDependsOn>
|
||||
IncludeProguardForAndroid;
|
||||
$(CoreCompileDependsOn);
|
||||
</CoreCompileDependsOn>
|
||||
<PrepareForBuildDependsOn>
|
||||
ValidateTargetFrameworkVersionForForms;
|
||||
$(PrepareForBuildDependsOn);
|
||||
</PrepareForBuildDependsOn>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="IncludeProguardForAndroid">
|
||||
<ItemGroup>
|
||||
<ProguardConfiguration Include="$(MSBuildThisFileDirectory)MonoAndroid10\proguard.cfg" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ValidateTargetFrameworkVersionForForms" Condition="'$(XFDisableTargetFrameworkValidation)' != 'True'">
|
||||
<PropertyGroup>
|
||||
<MinTargetFrameworkVersionForForms>8.1</MinTargetFrameworkVersionForForms>
|
||||
<TargetFrameworkVersionWithoutV>$(TargetFrameworkVersion.TrimStart('vV'))</TargetFrameworkVersionWithoutV>
|
||||
</PropertyGroup>
|
||||
<Error Code="XF005" Condition="$(TargetFrameworkVersionWithoutV) < $(MinTargetFrameworkVersionForForms)"
|
||||
Text="The %24(TargetFrameworkVersion) for $(ProjectName) ($(TargetFrameworkVersion)) is less than the minimum required %24(TargetFrameworkVersion) for Xamarin.Forms ($(MinTargetFrameworkVersionForForms)). You need to increase the %24(TargetFrameworkVersion) for $(ProjectName)." />
|
||||
</Target>
|
||||
</Project>
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace Xamarin.Forms.Core.UITests
|
|||
{ "button", "ControlType.Button" }
|
||||
};
|
||||
|
||||
readonly WindowsDriver<WindowsElement> _session;
|
||||
WindowsDriver<WindowsElement> _session;
|
||||
|
||||
readonly Dictionary<string, string> _translatePropertyAccessor = new Dictionary<string, string>
|
||||
{
|
||||
|
@ -42,9 +42,19 @@ namespace Xamarin.Forms.Core.UITests
|
|||
WindowsElement _window;
|
||||
|
||||
public WinDriverApp(WindowsDriver<WindowsElement> session)
|
||||
{
|
||||
Init(session);
|
||||
}
|
||||
|
||||
void Init(WindowsDriver<WindowsElement> session)
|
||||
{
|
||||
_session = session;
|
||||
TestServer = new WindowsTestServer(_session);
|
||||
TestServer = new WindowsTestServer(_session, this);
|
||||
}
|
||||
|
||||
public void RestartFromCrash()
|
||||
{
|
||||
Init(WindowsTestBase.CreateWindowsDriver());
|
||||
}
|
||||
|
||||
public void Back()
|
||||
|
@ -511,7 +521,7 @@ namespace Xamarin.Forms.Core.UITests
|
|||
MouseClickAt(x, y);
|
||||
}
|
||||
|
||||
public ITestServer TestServer { get; }
|
||||
public ITestServer TestServer { get; private set; }
|
||||
|
||||
public void TouchAndHold(Func<AppQuery, AppQuery> query)
|
||||
{
|
||||
|
|
|
@ -1,20 +1,11 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Resources;
|
||||
using System.Text;
|
||||
using NUnit.Framework;
|
||||
using OpenQA.Selenium;
|
||||
using OpenQA.Selenium.Appium.MultiTouch;
|
||||
using OpenQA.Selenium.Appium.Windows;
|
||||
using OpenQA.Selenium.Interactions.Internal;
|
||||
using OpenQA.Selenium.Remote;
|
||||
using Xamarin.Forms.Xaml;
|
||||
using Xamarin.UITest;
|
||||
using OpenQA.Selenium.Appium;
|
||||
using System.Collections.Generic;
|
||||
using OpenQA.Selenium.Appium.Windows;
|
||||
using OpenQA.Selenium.Interactions;
|
||||
using OpenQA.Selenium.Appium.Windows.Enums;
|
||||
using System.Windows.Input;
|
||||
using Xamarin.UITest;
|
||||
|
||||
namespace Xamarin.Forms.Core.UITests
|
||||
{
|
||||
|
@ -26,19 +17,24 @@ namespace Xamarin.Forms.Core.UITests
|
|||
public static IApp ConfigureApp()
|
||||
{
|
||||
if (Session == null)
|
||||
{
|
||||
AppiumOptions options = new AppiumOptions();
|
||||
options.AddAdditionalCapability("app", "0d4424f6-1e29-4476-ac00-ba22c3789cb6_ph1m9x8skttmg!App");
|
||||
options.AddAdditionalCapability("appArguments", "RunningAsUITests");
|
||||
Session = new WindowsDriver<WindowsElement>(new Uri(WindowsApplicationDriverUrl), options);
|
||||
Assert.IsNotNull(Session);
|
||||
Session.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1);
|
||||
Reset();
|
||||
}
|
||||
Session = CreateWindowsDriver();
|
||||
|
||||
return new WinDriverApp(Session);
|
||||
}
|
||||
|
||||
public static WindowsDriver<WindowsElement> CreateWindowsDriver()
|
||||
{
|
||||
AppiumOptions options = new AppiumOptions();
|
||||
options.AddAdditionalCapability("app", "0d4424f6-1e29-4476-ac00-ba22c3789cb6_ph1m9x8skttmg!App");
|
||||
options.AddAdditionalCapability("appArguments", "RunningAsUITests");
|
||||
Session = new WindowsDriver<WindowsElement>(new Uri(WindowsApplicationDriverUrl), options);
|
||||
Assert.IsNotNull(Session);
|
||||
Session.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(1);
|
||||
Reset();
|
||||
|
||||
return Session;
|
||||
}
|
||||
|
||||
internal static void HandleAppClosed(Exception ex)
|
||||
{
|
||||
if (ex is InvalidOperationException && ex.Message == "Currently selected window has been closed")
|
||||
|
|
|
@ -7,10 +7,12 @@ namespace Xamarin.Forms.Core.UITests
|
|||
internal class WindowsTestServer : ITestServer
|
||||
{
|
||||
readonly WindowsDriver<WindowsElement> _session;
|
||||
readonly WinDriverApp _winDriverApp;
|
||||
|
||||
public WindowsTestServer(WindowsDriver<WindowsElement> session)
|
||||
public WindowsTestServer(WindowsDriver<WindowsElement> session, WinDriverApp winDriverApp)
|
||||
{
|
||||
_session = session;
|
||||
_winDriverApp = winDriverApp;
|
||||
}
|
||||
|
||||
public string Post(string endpoint, object arguments = null)
|
||||
|
@ -31,6 +33,11 @@ namespace Xamarin.Forms.Core.UITests
|
|||
{
|
||||
return _session.CurrentWindowHandle;
|
||||
}
|
||||
catch (OpenQA.Selenium.WebDriverException we)
|
||||
when (we.Message.Contains("Currently selected window has been closed"))
|
||||
{
|
||||
_winDriverApp.RestartFromCrash();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
WindowsTestBase.HandleAppClosed(exception);
|
||||
|
|
|
@ -31,15 +31,23 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
|
||||
protected override void OnElementChanged(ElementChangedEventArgs<Editor> e)
|
||||
{
|
||||
// create label so it can get updated during the initial setup loop
|
||||
_placeholderLabel = new UILabel
|
||||
bool initializing = false;
|
||||
if (e.NewElement != null && _placeholderLabel == null)
|
||||
{
|
||||
BackgroundColor = UIColor.Clear
|
||||
};
|
||||
initializing = true;
|
||||
// create label so it can get updated during the initial setup loop
|
||||
_placeholderLabel = new UILabel
|
||||
{
|
||||
BackgroundColor = UIColor.Clear
|
||||
};
|
||||
}
|
||||
|
||||
base.OnElementChanged(e);
|
||||
|
||||
CreatePlaceholderLabel();
|
||||
if (e.NewElement != null && initializing)
|
||||
{
|
||||
CreatePlaceholderLabel();
|
||||
}
|
||||
}
|
||||
|
||||
protected internal override void UpdateFont()
|
||||
|
@ -63,6 +71,9 @@ namespace Xamarin.Forms.Platform.iOS
|
|||
|
||||
void CreatePlaceholderLabel()
|
||||
{
|
||||
if (Control == null)
|
||||
return;
|
||||
|
||||
Control.AddSubview(_placeholderLabel);
|
||||
|
||||
var edgeInsets = TextView.TextContainerInset;
|
||||
|
|
|
@ -26,7 +26,6 @@ EndProject
|
|||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuspec", ".nuspec", "{7E12C50D-A570-4DF1-94E1-8599843FA87C}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
.nuspec\proguard.cfg = .nuspec\proguard.cfg
|
||||
.nuspec\Xamarin.Forms.Android.targets = .nuspec\Xamarin.Forms.Android.targets
|
||||
.nuspec\Xamarin.Forms.AppLinks.nuspec = .nuspec\Xamarin.Forms.AppLinks.nuspec
|
||||
.nuspec\Xamarin.Forms.Debug.targets = .nuspec\Xamarin.Forms.Debug.targets
|
||||
.nuspec\Xamarin.Forms.DefaultItems.props = .nuspec\Xamarin.Forms.DefaultItems.props
|
||||
|
|
Загрузка…
Ссылка в новой задаче