Skip to content

Commit

Permalink
Merge pull request #2090 from unoplatform/dev/jela/uitests-adjust
Browse files Browse the repository at this point in the history
[Uno] Adjust UI Tests, force mono version for macOS builds
  • Loading branch information
dansiegel committed Apr 23, 2020
2 parents 1d4a962 + b0dcdee commit 291d1fe
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
2 changes: 2 additions & 0 deletions build/jobs/uno-uitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
clean: all

steps:
- template: ../steps/set-runtime.yml

- bash: |
build/scripts/android-uitest-run.sh
Expand Down Expand Up @@ -82,6 +83,7 @@ jobs:
clean: all

steps:
- template: ../steps/set-runtime.yml

- bash: |
build/scripts/ios-uitest-run.sh
Expand Down
32 changes: 16 additions & 16 deletions e2e/Uno/HelloUnoWorld.Shared/ViewModels/ShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,20 @@ private void ShowDialog()
var message = "This is a message that should be shown in the dialog.";

//using the dialog service as-is
//_dialogService.Show("NotificationDialog", new DialogParameters($"message={message}"), r =>
_dialogService.ShowDialog("NotificationDialog", new DialogParameters($"message={message}"), r =>
{
if (r.Result == ButtonResult.None)
Title = "Result is None";
else if (r.Result == ButtonResult.OK)
Title = "Result is OK";
else if (r.Result == ButtonResult.Cancel)
Title = "Result is Cancel";
else
Title = "I Don't know what you did!?";
});

//using custom extenions methods to simplify the app's dialogs
//_dialogService.ShowNotification(message, r =>
//{
// if (r.Result == ButtonResult.None)
// Title = "Result is None";
Expand All @@ -54,8 +67,7 @@ private void ShowDialog()
// Title = "I Don't know what you did!?";
//});

//using custom extenions methods to simplify the app's dialogs
//_dialogService.ShowNotification(message, r =>
//_dialogService.ShowConfirmation(message, r =>
//{
// if (r.Result == ButtonResult.None)
// Title = "Result is None";
Expand All @@ -67,7 +79,7 @@ private void ShowDialog()
// Title = "I Don't know what you did!?";
//});

//_dialogService.ShowConfirmation(message, r =>
//_dialogService.ShowNotificationInAnotherContentDialog(message, r =>
//{
// if (r.Result == ButtonResult.None)
// Title = "Result is None";
Expand All @@ -78,18 +90,6 @@ private void ShowDialog()
// else
// Title = "I Don't know what you did!?";
//});

_dialogService.ShowNotificationInAnotherContentDialog(message, r =>
{
if (r.Result == ButtonResult.None)
Title = "Result is None";
else if (r.Result == ButtonResult.OK)
Title = "Result is OK";
else if (r.Result == ButtonResult.Cancel)
Title = "Result is Cancel";
else
Title = "I Don't know what you did!?";
});
}
}

Expand Down
2 changes: 1 addition & 1 deletion e2e/Uno/HelloUnoWorld.UITests/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public class Constants
public readonly static string AndroidAppName = "com.prismlibrary.helloworld";
public readonly static string iOSDeviceNameOrId = "iPad Pro (12.9-inch) (3rd generation)";

public readonly static Platform CurrentPlatform = Platform.Android;
public readonly static Platform CurrentPlatform = Platform.Browser;
}
}
2 changes: 1 addition & 1 deletion e2e/Uno/HelloUnoWorld.UITests/Dialog_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Sample.UITests
public class Dialog_Tests : TestBase
{
[Test]
public void TestViewA()
public void ShowDialog()
{
Query testSelector = q => q.Marked("showDialog");
Query OkSelector = q => q.Marked("OKButton");
Expand Down

0 comments on commit 291d1fe

Please sign in to comment.