-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Setting Switch Off State Color #25068
Open
devanathan-vaithiyanathan
wants to merge
29
commits into
dotnet:main
Choose a base branch
from
devanathan-vaithiyanathan:Fix-7673
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 28 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
e79dbb6
fix added
devanathan-vaithiyanathan e21073d
test added
devanathan-vaithiyanathan 4f1673e
unshipped file changes reverted
devanathan-vaithiyanathan d784dff
attributes added
devanathan-vaithiyanathan df3f69f
test case changes added
devanathan-vaithiyanathan 55ff682
ui test changes added
devanathan-vaithiyanathan e26a041
test case changes added
devanathan-vaithiyanathan fd48c53
code behind click event removed
devanathan-vaithiyanathan 8887789
UI test files name changed
devanathan-vaithiyanathan e1a6f1b
API changes and test case changes added
devanathan-vaithiyanathan 9e65be6
modified test sample
devanathan-vaithiyanathan 19c941c
platform condition added in script file
devanathan-vaithiyanathan 0276226
fix added
devanathan-vaithiyanathan 4aaf0a5
test added
devanathan-vaithiyanathan 122a241
unshipped file changes reverted
devanathan-vaithiyanathan 4991269
attributes added
devanathan-vaithiyanathan 265aa78
test case changes added
devanathan-vaithiyanathan 6ef9238
ui test changes added
devanathan-vaithiyanathan c0f20b4
test case changes added
devanathan-vaithiyanathan eb6b50d
code behind click event removed
devanathan-vaithiyanathan ec64aad
UI test files name changed
devanathan-vaithiyanathan 07b64eb
API changes and test case changes added
devanathan-vaithiyanathan 6157b8b
modified test sample
devanathan-vaithiyanathan eb601dc
platform condition added in script file
devanathan-vaithiyanathan 289705b
OffColor API added in tizen platform
devanathan-vaithiyanathan de6888f
Merge branch 'Fix-7673' of https://github.com/devanathan-vaithiyanath…
devanathan-vaithiyanathan f027068
Merge branch 'main' of https://github.com/devanathan-vaithiyanathan/m…
devanathan-vaithiyanathan 54baa32
sender parameter nullable removed
devanathan-vaithiyanathan 3838533
simplified a test case
devanathan-vaithiyanathan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/Controls/tests/TestCases.HostApp/Issues/Issue15695.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue15695"> | ||
|
||
<StackLayout> | ||
<Switch x:Name="mauiSwitch" AutomationId="Switch" OffColor="Red" OnColor="Green" HorizontalOptions="Center" VerticalOptions="Center"/> | ||
<Button Text="ToggleSwitch" AutomationId="SwitchButton" Clicked="OnButtonClicked"/> | ||
</StackLayout> | ||
</ContentPage> |
16 changes: 16 additions & 0 deletions
16
src/Controls/tests/TestCases.HostApp/Issues/Issue15695.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Maui.Controls.Sample.Issues; | ||
|
||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 15695, "Support for Switch OFF State color", PlatformAffected.All)] | ||
public partial class Issue15695 : ContentPage | ||
{ | ||
public Issue15695() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
private void OnButtonClicked(object sender, EventArgs e) | ||
{ | ||
mauiSwitch.IsToggled = !mauiSwitch.IsToggled; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue15695.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#if !MACCATALYST | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues; | ||
|
||
public class Issue15695 : _IssuesUITest | ||
{ | ||
public override string Issue => "Support for Switch OFF State color"; | ||
|
||
public Issue15695(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
[Test] | ||
[Category(UITestCategories.Switch)] | ||
public void VerifySwitchOffColor() | ||
{ | ||
App.WaitForElement("Switch"); | ||
VerifyScreenshot(); | ||
} | ||
|
||
[Test] | ||
[Category(UITestCategories.Switch)] | ||
public void VerifySwitchOnColor() | ||
{ | ||
App.WaitForElement("Switch"); | ||
App.Tap("SwitchButton"); | ||
VerifyScreenshot(); | ||
} | ||
|
||
[Test] | ||
[Category(UITestCategories.Switch)] | ||
public void VerifySwitchOffColorAfterToggling() | ||
{ | ||
App.WaitForElement("Switch"); | ||
App.Tap("SwitchButton"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pending snapshots. Already available on the latest build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added snapshots for all platforms