Skip to content

Commit

Permalink
fix: Right path for BitmapIcon and changes for android
Browse files Browse the repository at this point in the history
  • Loading branch information
eriklimakc committed Aug 30, 2024
1 parent 6b2617f commit 5198fee
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ public async Task When_ComplexContentDialogNavigateSecondPage()

App.WaitElement("DialogsContentDialogsSecondPageNavigationBar");

App.Tap("DialogsContentDialogsSecondPageBackButton");
PlatformHelpers.On(
iOS: () => App.FastTap("BackButton"),
Android: () => App.FastTap(q => q.Marked("DialogsContentDialogsSecondPageNavigationBar").Descendant("AppCompatImageButton")),
Browser: () => App.Tap("DialogsContentDialogsSecondPageBackButton")
);

await Task.Delay(AppExtensions.UIWaitTimeInMilliseconds);

Expand Down
4 changes: 4 additions & 0 deletions testing/TestHarness/TestHarness/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Uno.Extensions.Diagnostics;
using Windows.Graphics.Display;

namespace TestHarness;
public partial class App : Application
Expand Down Expand Up @@ -67,4 +68,7 @@ protected override async void OnLaunched(LaunchActivatedEventArgs args)
}
_window.Activate();
}
#if USE_UITESTS
public static string GetDisplayScreenScaling(string value) => (DisplayInformation.GetForCurrentView().LogicalDpi * 100f / 96f).ToString(CultureInfo.InvariantCulture);
#endif
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,18 @@
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<utu:NavigationBar Content="Content Dialogs - Second Page"
AutomationProperties.AutomationId="DialogsContentDialogsSecondPageNavigationBar" >
<utu:NavigationBar Content="Content Dialogs - Second Page" AutomationProperties.AutomationId="DialogsContentDialogsSecondPageNavigationBar">
<utu:NavigationBar.MainCommand>
<AppBarButton AutomationProperties.AutomationId="DialogsContentDialogsSecondPageBackButton">
<AppBarButton.Icon>
<BitmapIcon UriSource="ms-appx:///Assets/Icons/back.png" />
<BitmapIcon UriSource="ms-appx:///Assets/Images/back.png" />
</AppBarButton.Icon>
</AppBarButton>
</utu:NavigationBar.MainCommand>
</utu:NavigationBar>

<ScrollViewer Grid.Row="1">
<StackPanel>

</StackPanel>
<StackPanel />
</ScrollViewer>
</Grid>
</Page>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Android.OS;
using Android.Views;
using Android.Widget;
using Java.Interop;

namespace TestHarness.Droid;
[Activity(
Expand All @@ -12,4 +13,6 @@ namespace TestHarness.Droid;
)]
public class MainActivity : Microsoft.UI.Xaml.ApplicationActivity
{
[Export("GetDisplayScreenScaling")]
public string GetDisplayScreenScaling(string value) => App.GetDisplayScreenScaling(value);
}

0 comments on commit 5198fee

Please sign in to comment.