test(postit): pin inoperative toolbar buttons (ACL, Mes cercles, [DEV] Signature) with headless UI tests
Three buttons on MainPage's toolbar are reported as inoperative in the running app: ACL, Mes cercles, and [DEV] Signature. They click but no dialog / page opens. This commit adds headless UI tests that drive each button via the Avalonia headless harness (KeyPressQwerty(Enter) on a focused, x:Name'd button, per the CalculatorTests pattern in Avalonia.Samples) and asserts the post-click top of NavRoot.NavigationStack is a non-null Page. The tests fail today on every button (stack size before == after == 1): the click does not push anything. The bug is the user's real complaint — the test is now wired to catch it. To make the buttons reachable by the harness without walking the visual tree (which does not see buttons hosted inside a NavigationPage), name the two unnamed buttons: - ACL -> ManageAclButton - Mes cercles -> OpenCirclesButton ([DEV] Signature was already named OpenSignatureDevButton.) The XAML change is cosmetic; bindings and commands are untouched. The test pattern follows SessionStatusBannerTests: new MainWindow().Show(), PushAsync(MainPage), drive controls via their generated x:Name fields.
This commit is contained in:
parent
f36679aa65
commit
84f3ffa9c2
2 changed files with 213 additions and 2 deletions
|
|
@ -33,8 +33,12 @@
|
|||
<Button Command="{Binding Search}" Content="Filter" />
|
||||
<Button Command="{Binding Save}" Content="Save" />
|
||||
<Button Command="{Binding Delete}" Content="Delete" />
|
||||
<Button Command="{Binding ManageAcl}" Content="ACL" />
|
||||
<Button Command="{Binding OpenCircles}" Content="Mes cercles" />
|
||||
<Button x:Name="ManageAclButton"
|
||||
Command="{Binding ManageAcl}"
|
||||
Content="ACL" />
|
||||
<Button x:Name="OpenCirclesButton"
|
||||
Command="{Binding OpenCircles}"
|
||||
Content="Mes cercles" />
|
||||
<!-- Publication toggle: a CheckBox wired to
|
||||
DraftIsPublished. Clicking it fires
|
||||
TogglePublishCommand, which pushes the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue