From 62e5badb7ea0bfb9839b757a1c45fcff4f891adc Mon Sep 17 00:00:00 2001 From: Jeonghyun Yun Date: Fri, 12 Oct 2018 13:02:43 +0900 Subject: [PATCH] [Xamarin.Forms][Non-ACR] fix xamarin forms manual TCT Change-Id: I887661831338b679a6935f7b4b0984c66e4d8526 Signed-off-by: Jeonghyun Yun --- .../testcase/TSNavigationPage.cs | 71 ++++++++-------------- 1 file changed, 25 insertions(+), 46 deletions(-) diff --git a/tct-suite-vs/Tizen.XamarinForms.Manual.Tests/testcase/TSNavigationPage.cs b/tct-suite-vs/Tizen.XamarinForms.Manual.Tests/testcase/TSNavigationPage.cs index 8e9ad8d..5d99a28 100755 --- a/tct-suite-vs/Tizen.XamarinForms.Manual.Tests/testcase/TSNavigationPage.cs +++ b/tct-suite-vs/Tizen.XamarinForms.Manual.Tests/testcase/TSNavigationPage.cs @@ -914,43 +914,20 @@ namespace Xamarin.Forms.Core.UnitTests { _navigationPage.BarBackgroundColor = Color.Default; _navigationPage.BarTextColor = Color.Default; + var imageRed = new StackLayout() { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.CenterAndExpand, HeightRequest = 100, WidthRequest = 400, - - Children = - { - new Label() - { - VerticalOptions = LayoutOptions.Center, - Text = "Go To Page2 >>", - HorizontalTextAlignment = TextAlignment.Center, - //Font = Font.BoldSystemFontOfSize(NamedSize.Large) - } - } }; - var imageBlue = new StackLayout() { HorizontalOptions = LayoutOptions.CenterAndExpand, VerticalOptions = LayoutOptions.CenterAndExpand, HeightRequest = 100, WidthRequest = 400, - BackgroundColor = Color.White, - - Children = - { - new Label() - { - VerticalOptions = LayoutOptions.Center, - Text = "Go To Page3 >>", - HorizontalTextAlignment = TextAlignment.Center, - //Font = Font.BoldSystemFontOfSize(NamedSize.Large) - } - } }; var imageGreen = new StackLayout() { @@ -958,18 +935,6 @@ namespace Xamarin.Forms.Core.UnitTests VerticalOptions = LayoutOptions.CenterAndExpand, HeightRequest = 100, WidthRequest = 400, - BackgroundColor = Color.White, - - Children = - { - new Label() - { - VerticalOptions = LayoutOptions.Center, - Text = "<< Back To Page1", - HorizontalTextAlignment = TextAlignment.Center, - //Font = Font.BoldSystemFontOfSize(NamedSize.Large) - } - } }; NavigationPage navigationPage = new NavigationPage(new ContentPage @@ -991,29 +956,43 @@ namespace Xamarin.Forms.Core.UnitTests Content = imageGreen }; - var tapGestureRecognizerRed = new TapGestureRecognizer(); - tapGestureRecognizerRed.Tapped += async (s, e) => + var button1 = new Button + { + VerticalOptions = LayoutOptions.Center, + Text = "Go To Page2 >>", + }; + button1.Clicked += async (s, e) => { await navigationPage.PushAsync(page2); await Task.Delay(2000); }; - imageRed.GestureRecognizers.Add(tapGestureRecognizerRed); + imageRed.Children.Add(button1); - var tapGestureRecognizerBlue = new TapGestureRecognizer(); - tapGestureRecognizerBlue.Tapped += async (s, e) => + var button2 = new Button + { + VerticalOptions = LayoutOptions.Center, + Text = "Go To Page3 >>", + BackgroundColor = Color.Black, + }; + button2.Clicked += async (s, e) => { await navigationPage.PushAsync(page3); await Task.Delay(2000); }; - imageBlue.GestureRecognizers.Add(tapGestureRecognizerBlue); + imageBlue.Children.Add(button2); - var tapGestureRecognizerGreen = new TapGestureRecognizer(); - tapGestureRecognizerGreen.Tapped += async (s, e) => + var button3 = new Button + { + VerticalOptions = LayoutOptions.Center, + Text = "<< Back To Page1", + BackgroundColor = Color.Black, + }; + button3.Clicked += async (s, e) => { await navigationPage.PopToRootAsync(); await Task.Delay(2000); }; - imageGreen.GestureRecognizers.Add(tapGestureRecognizerGreen); + imageGreen.Children.Add(button3); await ManualTest.WaitForConfirm(); } @@ -1437,4 +1416,4 @@ namespace Xamarin.Forms.Core.UnitTests navigationPage.Pushed -= OnPushed; } } -} \ No newline at end of file +} -- 2.7.4