Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,18 @@
<StackPanel Spacing="20">

<ToggleSwitch Header="OFF"
AutomationProperties.AutomationId="fluent_Off"
Foreground="{ThemeResource OnBackgroundBrush}" />
<ToggleSwitch Header="ON"
AutomationProperties.AutomationId="fluent_On"
Foreground="{ThemeResource OnBackgroundBrush}"
IsOn="True" />

<ToggleSwitch Header="DISABLED OFF"
AutomationProperties.AutomationId="fluent_Disabled_Off"
IsEnabled="False" />
<ToggleSwitch Header="DISABLED ON"
AutomationProperties.AutomationId="fluent_Disabled_On"
IsEnabled="False"
IsOn="True" />
</StackPanel>
Expand Down
35 changes: 35 additions & 0 deletions Uno.Gallery/Uno.Gallery.UITest/Given_ToggleSwitch_Fluent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
using Uno.UITest.Helpers.Queries;
using Uno.UITests.Helpers;

namespace Uno.Gallery.UITests
{

public class Given_ToggleSwitch_Fluent : TestBase
{

[Test]
public void WhenToggleSwitchOff()
{
NavigateToSample("ToggleSwitch", "Fluent");

TakeScreenshot("Before On");
var offToggleSwitch = new QueryEx(x => x.All().Marked("fluent_Off"));
App.ScrollDownTo("fluent_Off");
offToggleSwitch.Tap();
TakeScreenshot("After On");
Assert.IsTrue(offToggleSwitch.GetDependencyPropertyValue<bool>("IsOn"));





}

}
}