Skip to content

Commit 2fef448

Browse files
Dhivya-SF4094praveenkumarkarunanithi
authored andcommitted
Fixed Test case failure in PR 28560 (#28584)
* Resaved Image For RadioButtonUpdateValueInserBorder * updated test case code --------- Co-authored-by: praveenkumarkarunanithi <praveenkumar.karunanithi@syncfusion.com>
1 parent ae5af8d commit 2fef448

File tree

7 files changed

+20
-2
lines changed

7 files changed

+20
-2
lines changed

src/Controls/tests/TestCases.HostApp/Issues/Issue19109.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,29 @@ public Issue19109()
3030
HorizontalOptions = LayoutOptions.Center
3131
};
3232

33+
var rangeLabel = new Label
34+
{
35+
AutomationId = "RangeLabel",
36+
Text = "Range not set yet",
37+
HorizontalOptions = LayoutOptions.Center
38+
};
39+
3340
button.Clicked += (sender, e) =>
3441
{
3542
entry.Focus();
43+
44+
#if IOS
45+
if (entry.Handler?.PlatformView is UIKit.UITextField textField && textField.SelectedTextRange != null)
46+
{
47+
rangeLabel.Text = $"Start={textField.GetOffsetFromPosition(textField.BeginningOfDocument, textField.SelectedTextRange.Start)}, " +
48+
$"End={textField.GetOffsetFromPosition(textField.BeginningOfDocument, textField.SelectedTextRange.End)}";
49+
}
50+
#endif
3651
};
3752

3853
Content = new StackLayout
3954
{
40-
Children = { entry, button, label },
55+
Children = { entry, button, label, rangeLabel },
4156
Padding = new Thickness(20),
4257
Spacing = 10
4358
};
Binary file not shown.

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue19109.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if IOS
12
using NUnit.Framework;
23
using UITest.Appium;
34
using UITest.Core;
@@ -17,7 +18,9 @@ public void EntryShouldApplyCursorPositionCorrectly()
1718
App.WaitForElement("EntryControl");
1819
App.WaitForElement("FocusButton");
1920
App.Tap("FocusButton");
20-
VerifyScreenshot();
21+
var rangeText = App.WaitForElement("RangeLabel").GetText();
22+
Assert.That(rangeText, Is.EqualTo("Start=5, End=5"), "Cursor position not applied correctly");
2123
}
2224
}
2325
}
26+
#endif
Binary file not shown.
1.37 KB
Loading

0 commit comments

Comments
 (0)