<Compile Include="$(MSBuildThisFileDirectory)Bugzilla39458.cs" />
<Compile Include="$(MSBuildThisFileDirectory)Bugzilla39853.cs" />
<Compile Include="$(MSBuildThisFileDirectory)MultipleClipToBounds.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)_TemplateMarkup.xaml.cs">
+ <DependentUpon>_TemplateMarkup.xaml</DependentUpon>
+ <SubType>Code</SubType>
+ </Compile>
<Compile Include="$(MSBuildThisFileDirectory)PerformanceGallery\PerformanceDataManager.cs" />
<Compile Include="$(MSBuildThisFileDirectory)PerformanceGallery\PerformanceGallery.cs" />
<Compile Include="$(MSBuildThisFileDirectory)PerformanceGallery\PerformanceScenario.cs" />
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
+ <EmbeddedResource Include="$(MSBuildThisFileDirectory)_TemplateMarkup.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </EmbeddedResource>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Issue5801.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
// Initialize ui here instead of ctor
Content = new Label
{
- AutomationId = "IssuePageLabel",
+ AutomationId = "Issue1Label",
Text = "See if I'm here"
};
+
+ BindingContext = new ViewModelIssue1();
}
#if UITEST
public void Issue1Test()
{
// Delete this and all other UITEST sections if there is no way to automate the test. Otherwise, be sure to rename the test and update the Category attribute on the class. Note that you can add multiple categories.
- RunningApp.Screenshot ("I am at Issue 1");
- RunningApp.WaitForElement (q => q.Marked ("IssuePageLabel"));
- RunningApp.Screenshot ("I see the Label");
+ RunningApp.Screenshot("I am at Issue1");
+ RunningApp.WaitForElement(q => q.Marked("Issue1Label"));
+ RunningApp.Screenshot("I see the Label");
}
#endif
}
+
+ [Preserve(AllMembers = true)]
+ public class ViewModelIssue1
+ {
+ public ViewModelIssue1()
+ {
+
+ }
+ }
+
+ [Preserve(AllMembers = true)]
+ public class ModelIssue1
+ {
+ public ModelIssue1()
+ {
+
+ }
+ }
}
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8" ?>
+<controls:TestContentPage
+ xmlns="http://xamarin.com/schemas/2014/forms"
+ xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
+ xmlns:controls="clr-namespace:Xamarin.Forms.Controls"
+ x:Class="Xamarin.Forms.Controls.Issues._TemplateMarkup">
+
+ <Grid>
+ <Label AutomationId="Issue2Label" Text="See if I'm here (Markup)"/>
+ </Grid>
+</controls:TestContentPage>
\ No newline at end of file
--- /dev/null
+using Xamarin.Forms.CustomAttributes;
+using Xamarin.Forms.Internals;
+using Xamarin.Forms.Xaml;
+
+#if UITEST
+using Xamarin.Forms.Core.UITests;
+using Xamarin.UITest;
+using NUnit.Framework;
+#endif
+
+namespace Xamarin.Forms.Controls.Issues
+{
+#if UITEST
+ [Category(UITestCategories.ManualReview)]
+#endif
+#if APP
+ [XamlCompilation(XamlCompilationOptions.Compile)]
+#endif
+ [Preserve(AllMembers = true)]
+ [Issue(IssueTracker.Github, 2, "Issue Description (Markup)", PlatformAffected.Default)]
+ public partial class _TemplateMarkup : TestContentPage
+ {
+ public _TemplateMarkup()
+ {
+#if APP
+ InitializeComponent();
+#endif
+ }
+
+ protected override void Init()
+ {
+ BindingContext = new ViewModelIssue2();
+ }
+
+#if UITEST
+ [Test]
+ public void Issue2Test()
+ {
+ // Delete this and all other UITEST sections if there is no way to automate the test. Otherwise, be sure to rename the test and update the Category attribute on the class. Note that you can add multiple categories.
+ RunningApp.Screenshot("I am at Issue2");
+ RunningApp.WaitForElement(q => q.Marked("Issue2Label"));
+ RunningApp.Screenshot("I see the Label");
+ }
+#endif
+ }
+
+ [Preserve(AllMembers = true)]
+ public class ViewModelIssue2
+ {
+ public ViewModelIssue2()
+ {
+
+ }
+ }
+
+ [Preserve(AllMembers = true)]
+ public class ModelIssue2
+ {
+ public ModelIssue2()
+ {
+
+ }
+ }
+}
\ No newline at end of file