From 0738aea2e893f7c3cae5bf9794b0c75fc30ef03b Mon Sep 17 00:00:00 2001 From: Evgeny Gorbovoy Date: Sun, 8 Dec 2024 18:13:32 +0100 Subject: [PATCH] Dialog template back. Added test to check dialog title is shown --- .../GalleryViews/SomeDialogWindow.axaml | 1 - .../GalleryViews/SomeDialogWindow.axaml.cs | 3 +++ .../Templates/Controls/AllControls.axaml | 2 +- .../Templates/Controls/DialogWindow.axaml | 22 +++++++++---------- .../Consolonia.Gallery.Tests/DialogTests.cs | 2 ++ 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/Consolonia.Gallery/Gallery/GalleryViews/SomeDialogWindow.axaml b/src/Consolonia.Gallery/Gallery/GalleryViews/SomeDialogWindow.axaml index 8f94ebb5..ea22dc1c 100644 --- a/src/Consolonia.Gallery/Gallery/GalleryViews/SomeDialogWindow.axaml +++ b/src/Consolonia.Gallery/Gallery/GalleryViews/SomeDialogWindow.axaml @@ -6,7 +6,6 @@ xmlns:controls="clr-namespace:Consolonia.Core.Controls;assembly=Consolonia.Core" HorizontalAlignment="Center" VerticalAlignment="Center" - Title="Dialog" x:Class="Consolonia.Gallery.Gallery.GalleryViews.SomeDialogWindow"> - @@ -44,4 +43,5 @@ + \ No newline at end of file diff --git a/src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml b/src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml index ef4fb85e..ec584e25 100644 --- a/src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml +++ b/src/Consolonia.Themes/Templates/Controls/DialogWindow.axaml @@ -1,12 +1,12 @@ - - 1,0 - - + + + 1,0 + + + \ No newline at end of file diff --git a/src/Tests/Consolonia.Gallery.Tests/DialogTests.cs b/src/Tests/Consolonia.Gallery.Tests/DialogTests.cs index 4e22c4b8..676db1cc 100644 --- a/src/Tests/Consolonia.Gallery.Tests/DialogTests.cs +++ b/src/Tests/Consolonia.Gallery.Tests/DialogTests.cs @@ -1,5 +1,6 @@ using System.Threading.Tasks; using Avalonia.Input; +using Consolonia.Gallery.Gallery.GalleryViews; using Consolonia.Gallery.Tests.Base; using Consolonia.NUnit; using NUnit.Framework; @@ -16,6 +17,7 @@ public async Task PerformSingleTest() await UITest.KeyInput(Key.Enter); await UITest.KeyInput(Key.Tab); await UITest.AssertHasText("One More"); + await UITest.AssertHasText(SomeDialogWindow.DialogTitle); await UITest.KeyInput(Key.Escape); await UITest.AssertHasNoText("One More"); }