@ -90,7 +90,7 @@ namespace Avalonia.IntegrationTests.Appium
try
{
_ session . FindElementByAccessibilityId ( "WindowState" ) . SendClick ( ) ;
_ session . FindElementByName ( "Normal" ) . SendClick ( ) ;
_ session . FindElementByAccessibilityId ( "WindowState Normal" ) . SendClick ( ) ;
// Wait for animations to run.
if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) )
@ -155,11 +155,11 @@ namespace Avalonia.IntegrationTests.Appium
Assert . Equal ( "Normal" , windowState . GetComboBoxValue ( ) ) ;
windowState . Click ( ) ;
_ session . FindElementByName ( "Maximized" ) . SendClick ( ) ;
_ session . FindElementByAccessibilityId ( "WindowState Maximized" ) . SendClick ( ) ;
Assert . Equal ( "Maximized" , windowState . GetComboBoxValue ( ) ) ;
windowState . Click ( ) ;
_ session . FindElementByName ( "Normal" ) . SendClick ( ) ;
_ session . FindElementByAccessibilityId ( "WindowState Normal" ) . SendClick ( ) ;
var current = GetWindowInfo ( ) ;
Assert . Equal ( original . Position , current . Position ) ;
@ -169,7 +169,7 @@ namespace Avalonia.IntegrationTests.Appium
if ( ! RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) | | mode = = ShowWindowMode . NonOwned )
{
windowState . Click ( ) ;
_ session . FindElementByName ( "FullScreen" ) . SendClick ( ) ;
_ session . FindElementByAccessibilityId ( "WindowState FullScreen" ) . SendClick ( ) ;
Assert . Equal ( "FullScreen" , windowState . GetComboBoxValue ( ) ) ;
current = GetWindowInfo ( ) ;
@ -179,7 +179,7 @@ namespace Avalonia.IntegrationTests.Appium
windowState . SendClick ( ) ;
_ session . FindElementByName ( "Normal" ) . SendClick ( ) ;
_ session . FindElementByAccessibilityId ( "WindowState Normal" ) . SendClick ( ) ;
current = GetWindowInfo ( ) ;
Assert . Equal ( original . Position , current . Position ) ;
@ -223,13 +223,13 @@ namespace Avalonia.IntegrationTests.Appium
// Not sure how to handle testing minimized windows currently.
if ( state = = Controls . WindowState . Minimized )
continue ;
// Child/Modal windows cannot be fullscreen on macOS.
if ( RuntimeInformation . IsOSPlatform ( OSPlatform . OSX ) & &
state = = Controls . WindowState . FullScreen & &
mode ! = ShowWindowMode . NonOwned )
continue ;
data . Add ( size , mode , state ) ;
}
}
@ -286,7 +286,7 @@ namespace Avalonia.IntegrationTests.Appium
_ session . FindElementByName ( location . ToString ( ) ) . SendClick ( ) ;
stateComboBox . Click ( ) ;
_ session . FindElementByName ( state . ToString ( ) ) . SendClick ( ) ;
_ session . FindElementByAccessibilityId ( $"ShowWindowState{state}" ) . SendClick ( ) ;
return showButton . OpenWindowWithClick ( ) ;
}