mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-01-27 06:27:25 +01:00
Compare commits
1 Commits
jay/lsv2
...
niels9001/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c8b2f38c9 |
@@ -150,7 +150,7 @@ namespace LightSwitch.UITests
|
||||
var modeCombobox = testBase.Session.Find<Element>(By.AccessibilityId("ModeSelection_LightSwitch"), 5000);
|
||||
Assert.IsNotNull(modeCombobox, "Mode combobox not found.");
|
||||
|
||||
var neededTabs = 6;
|
||||
var neededTabs = 5;
|
||||
|
||||
if (modeCombobox.Text != "Manual")
|
||||
{
|
||||
@@ -167,7 +167,7 @@ namespace LightSwitch.UITests
|
||||
Assert.IsNotNull(timeline, "Timeline not found.");
|
||||
|
||||
var helpText = timeline.GetAttribute("HelpText");
|
||||
string originalEndValue = GetHelpTextValue(helpText, "End");
|
||||
string originalStartValue = GetHelpTextValue(helpText, "Start");
|
||||
|
||||
for (int i = 0; i < neededTabs; i++)
|
||||
{
|
||||
@@ -179,12 +179,12 @@ namespace LightSwitch.UITests
|
||||
testBase.Session.SendKeys(Key.Enter);
|
||||
|
||||
helpText = timeline.GetAttribute("HelpText");
|
||||
string updatedEndValue = GetHelpTextValue(helpText, "End");
|
||||
string updatedStartValue = GetHelpTextValue(helpText, "Start");
|
||||
|
||||
Assert.AreNotEqual(originalEndValue, updatedEndValue, "Timeline end time should have been updated.");
|
||||
Assert.AreNotEqual(originalStartValue, updatedStartValue, "Timeline start time should have been updated.");
|
||||
|
||||
helpText = timeline.GetAttribute("HelpText");
|
||||
string originalStartValue = GetHelpTextValue(helpText, "Start");
|
||||
string originalEndValue = GetHelpTextValue(helpText, "End");
|
||||
|
||||
testBase.Session.SendKeys(Key.Tab);
|
||||
testBase.Session.SendKeys(Key.Enter);
|
||||
@@ -192,9 +192,9 @@ namespace LightSwitch.UITests
|
||||
testBase.Session.SendKeys(Key.Enter);
|
||||
|
||||
helpText = timeline.GetAttribute("HelpText");
|
||||
string updatedStartValue = GetHelpTextValue(helpText, "Start");
|
||||
string updatedEndValue = GetHelpTextValue(helpText, "End");
|
||||
|
||||
Assert.AreNotEqual(originalStartValue, updatedStartValue, "Timeline start time should have been updated.");
|
||||
Assert.AreNotEqual(originalEndValue, updatedEndValue, "Timeline end time should have been updated.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -259,7 +259,11 @@ namespace LightSwitch.UITests
|
||||
// Click the select city button
|
||||
var setLocationButton = testBase.Session.Find<Element>(By.AccessibilityId("SetLocationButton_LightSwitch"), 5000);
|
||||
Assert.IsNotNull(setLocationButton, "Set location button not found.");
|
||||
setLocationButton.Click(msPostAction: 8000);
|
||||
setLocationButton.Click();
|
||||
|
||||
var syncLocationButton = testBase.Session.Find<Element>(By.AccessibilityId("SyncLocationButton_LightSwitch"), 5000);
|
||||
Assert.IsNotNull(syncLocationButton, "Sync location button not found.");
|
||||
syncLocationButton.Click(msPostAction: 8000);
|
||||
|
||||
var latLong = testBase.Session.Find<Element>(By.AccessibilityId("LocationResultText_LightSwitch"), 5000);
|
||||
Assert.IsFalse(string.IsNullOrWhiteSpace(latLong.Text));
|
||||
@@ -301,7 +305,6 @@ namespace LightSwitch.UITests
|
||||
string originalStartValue = GetHelpTextValue(helpText, "Start");
|
||||
|
||||
sunriseOffset.Click();
|
||||
testBase.Session.SendKeys(Key.Up);
|
||||
|
||||
helpText = timeline.GetAttribute("HelpText");
|
||||
string updatedStartValue = GetHelpTextValue(helpText, "Start");
|
||||
@@ -316,7 +319,6 @@ namespace LightSwitch.UITests
|
||||
string originalEndValue = GetHelpTextValue(helpText, "End");
|
||||
|
||||
sunsetOffset.Click();
|
||||
testBase.Session.SendKeys(Key.Up);
|
||||
|
||||
helpText = timeline.GetAttribute("HelpText");
|
||||
string updatedEndValue = GetHelpTextValue(helpText, "End");
|
||||
@@ -336,15 +338,9 @@ namespace LightSwitch.UITests
|
||||
var scrollViewer = testBase.Session.Find<Element>(By.AccessibilityId("PageScrollViewer"));
|
||||
systemCheckbox.EnsureVisible(scrollViewer);
|
||||
|
||||
int neededTabs = 10;
|
||||
|
||||
// How do I handle when something is off screen?
|
||||
if (!systemCheckbox.Selected)
|
||||
{
|
||||
for (int i = 0; i < neededTabs; i++)
|
||||
{
|
||||
testBase.Session.SendKeys(Key.Tab);
|
||||
}
|
||||
|
||||
systemCheckbox.Click();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@ using System.Globalization;
|
||||
using Microsoft.PowerToys.Settings.UI.Helpers;
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Automation;
|
||||
using Microsoft.UI.Xaml.Automation.Peers;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Shapes;
|
||||
using Windows.Foundation;
|
||||
@@ -80,11 +79,6 @@ namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
this.IsEnabledChanged += Timeline_IsEnabledChanged;
|
||||
}
|
||||
|
||||
protected override AutomationPeer OnCreateAutomationPeer()
|
||||
{
|
||||
return new TimelineAutomationPeer(this);
|
||||
}
|
||||
|
||||
private void Timeline_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CheckEnabledState();
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
// Copyright (c) Microsoft Corporation
|
||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Automation;
|
||||
using Microsoft.UI.Xaml.Automation.Peers;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Controls
|
||||
{
|
||||
public partial class TimelineAutomationPeer : FrameworkElementAutomationPeer
|
||||
{
|
||||
public TimelineAutomationPeer(Timeline owner)
|
||||
: base(owner)
|
||||
{
|
||||
}
|
||||
|
||||
protected override string GetClassNameCore() => "Timeline";
|
||||
|
||||
protected override AutomationControlType GetAutomationControlTypeCore()
|
||||
=> AutomationControlType.Custom;
|
||||
|
||||
protected override string GetAutomationIdCore()
|
||||
{
|
||||
var owner = (Timeline)Owner;
|
||||
var id = AutomationProperties.GetAutomationId(owner);
|
||||
return string.IsNullOrEmpty(id) ? base.GetAutomationIdCore() : id;
|
||||
}
|
||||
|
||||
protected override string GetNameCore()
|
||||
{
|
||||
var owner = (Timeline)Owner;
|
||||
var name = AutomationProperties.GetName(owner);
|
||||
return !string.IsNullOrEmpty(name)
|
||||
? name
|
||||
: $"Timeline from {owner.StartTime} to {owner.EndTime}";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2893,7 +2893,7 @@ Right-click to remove the key combination, thereby deactivating the shortcut.</v
|
||||
<value>Crosshairs fixed length (px)</value>
|
||||
<comment>px = pixels</comment>
|
||||
</data>
|
||||
<data name="MouseUtils_MousePointerCrosshairs_CrosshairsOrientation" xml:space="preserve">
|
||||
<data name="MouseUtils_MousePointerCrosshairs_CrosshairsOrientation.Header" xml:space="preserve">
|
||||
<value>Crosshairs orientation</value>
|
||||
</data>
|
||||
<data name="MouseUtils_MousePointerCrosshairs_CrosshairsOrientation_Both.Content" xml:space="preserve">
|
||||
|
||||
Reference in New Issue
Block a user