Skip to content

Commit

Permalink
fix: Adjust Dialog test to use the default dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Apr 23, 2020
1 parent e072949 commit 017ed03
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
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/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 017ed03

Please sign in to comment.