mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 22:23:29 -07:00
Merge branch 'master' of https://github.com/microsoft/calculator
This commit is contained in:
commit
87e47e64bc
14 changed files with 25 additions and 15 deletions
|
@ -27,7 +27,7 @@ jobs:
|
|||
downloadDirectory: $(Build.SourcesDirectory)
|
||||
vstsFeed: WindowsInboxApps
|
||||
vstsFeedPackage: calculator-internals
|
||||
vstsPackageVersion: 0.0.53
|
||||
vstsPackageVersion: 0.0.54
|
||||
|
||||
- template: ./build-single-architecture.yaml
|
||||
parameters:
|
||||
|
|
|
@ -80,7 +80,7 @@ jobs:
|
|||
downloadDirectory: $(Build.SourcesDirectory)
|
||||
vstsFeed: WindowsInboxApps
|
||||
vstsFeedPackage: calculator-internals
|
||||
vstsPackageVersion: 0.0.53
|
||||
vstsPackageVersion: 0.0.54
|
||||
|
||||
- powershell: |
|
||||
# Just modify this line to indicate where your en-us PDP file is. Leave the other lines alone.
|
||||
|
|
|
@ -177,6 +177,7 @@
|
|||
<muxc:NavigationViewItem x:Name="AboutButton"
|
||||
x:Uid="AboutButton"
|
||||
Style="{StaticResource NavViewItemStyle}"
|
||||
KeyDown="OnAboutButtonKeyDown"
|
||||
Tapped="OnAboutButtonClick">
|
||||
<muxc:NavigationViewItem.Icon>
|
||||
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}" Glyph=""/>
|
||||
|
|
|
@ -432,6 +432,14 @@ void MainPage::OnAboutButtonClick(Object ^ sender, ItemClickEventArgs ^ e)
|
|||
ShowAboutPage();
|
||||
}
|
||||
|
||||
void MainPage::OnAboutButtonKeyDown(Object ^ sender, KeyRoutedEventArgs ^ e)
|
||||
{
|
||||
if (e->Key == VirtualKey::Space || e->Key == VirtualKey::Enter)
|
||||
{
|
||||
ShowAboutPage();
|
||||
}
|
||||
}
|
||||
|
||||
void MainPage::OnAboutFlyoutOpened(_In_ Object ^ sender, _In_ Object ^ e)
|
||||
{
|
||||
// Keep Ignoring Escape till the About page flyout is opened
|
||||
|
|
|
@ -55,6 +55,7 @@ public
|
|||
_In_ Microsoft::UI::Xaml::Controls::NavigationViewItemInvokedEventArgs ^ e);
|
||||
|
||||
void OnAboutButtonClick(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::Controls::ItemClickEventArgs ^ e);
|
||||
void OnAboutButtonKeyDown(_In_ Platform::Object ^ sender, _In_ Windows::UI::Xaml::Input::KeyRoutedEventArgs ^ e);
|
||||
void OnAboutFlyoutOpened(_In_ Platform::Object ^ sender, _In_ Platform::Object ^ e);
|
||||
void OnAboutFlyoutClosed(_In_ Platform::Object ^ sender, _In_ Platform::Object ^ e);
|
||||
void AlwaysOnTopButtonClick(Platform::Object ^ sender, Windows::UI::Xaml::RoutedEventArgs ^ e);
|
||||
|
|
|
@ -82,7 +82,7 @@ namespace CalculatorUITestFramework
|
|||
|
||||
/// <summary>
|
||||
/// If the Memory label is not displayed, resize the window
|
||||
/// Two attempts are made, the the lable is not found a "not found" exception is thrown
|
||||
/// Two attempts are made, and if the label is not found, a "not found" exception is thrown
|
||||
/// </summary>
|
||||
public void ResizeWindowToDisplayMemoryLabel()
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using OpenQA.Selenium.Appium.Windows;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace CalculatorUITestFramework
|
||||
{
|
||||
|
@ -29,7 +30,7 @@ namespace CalculatorUITestFramework
|
|||
/// <param name="number">Number to be entered into the calculator.</param>
|
||||
public void Input(double number)
|
||||
{
|
||||
string numberStr = number.ToString();
|
||||
string numberStr = number.ToString(CultureInfo.InvariantCulture);
|
||||
if (numberStr.StartsWith("-"))
|
||||
{
|
||||
numberStr = numberStr.Substring(1) + "-";
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace CalculatorUITestFramework
|
|||
Gradians
|
||||
}
|
||||
|
||||
public enum fEButtonState
|
||||
public enum FEButtonState
|
||||
{
|
||||
Normal,
|
||||
Exponential
|
||||
|
@ -133,7 +133,7 @@ namespace CalculatorUITestFramework
|
|||
}
|
||||
}
|
||||
|
||||
public void ResetFEButton(fEButtonState value)
|
||||
public void ResetFEButton(FEButtonState value)
|
||||
{
|
||||
if (this.FixedToExponentialButton.GetAttribute("Toggle.ToggleState") != "0")
|
||||
{
|
||||
|
|
|
@ -90,8 +90,7 @@ namespace CalculatorUITestFramework
|
|||
{
|
||||
throw new NotFoundException("Could not find 'Keep on top' button or 'Back to full view' button");
|
||||
}
|
||||
var ToolTipText = ToolTip.Text.ToString();
|
||||
return ToolTipText;
|
||||
return ToolTip.Text;
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace CalculatorUITestFramework
|
|||
private WindowsDriver<WindowsElement> session => WinAppDriver.Instance.CalculatorSession;
|
||||
|
||||
/// <summary>
|
||||
/// Navigates the caclulator to Standard mode and ensures that it is in standard mode
|
||||
/// Navigates the calculator to Standard mode and ensures that it is in standard mode
|
||||
/// </summary>
|
||||
public void NavigateToStandardCalculator()
|
||||
{
|
||||
|
|
|
@ -38,14 +38,14 @@ namespace CalculatorUITestFramework
|
|||
{
|
||||
this.windowsDriverService = new WindowsDriverServiceBuilder().Build();
|
||||
|
||||
this.windowsDriverService.OutputDataReceived += new DataReceivedEventHandler((sender, e) =>
|
||||
this.windowsDriverService.OutputDataReceived += (sender, e) =>
|
||||
{
|
||||
var outputData = e.Data?.Replace("\0", string.Empty);
|
||||
if (!String.IsNullOrEmpty(outputData))
|
||||
{
|
||||
Console.WriteLine(outputData);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
this.windowsDriverService.Start();
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ namespace CalculatorUITestFramework
|
|||
public Uri ServiceUrl
|
||||
{
|
||||
// Note: append /wd/hub to the URL if you're directing the test at Appium
|
||||
get { return new Uri($"http://{this.IP.ToString()}:{Convert.ToString(this.Port)}"); }
|
||||
get { return new Uri($"http://{this.IP}:{Convert.ToString(this.Port)}"); }
|
||||
}
|
||||
|
||||
private void DestroyProcess()
|
||||
|
@ -158,7 +158,7 @@ namespace CalculatorUITestFramework
|
|||
}
|
||||
else
|
||||
{
|
||||
status = new Uri(service.ToString() + "/status");
|
||||
status = new Uri(service + "/status");
|
||||
}
|
||||
|
||||
DateTime endTime = DateTime.Now.Add(this.InitializationTimeout);
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace CalculatorUITestFramework
|
|||
Thread.Sleep(10);
|
||||
}
|
||||
timer.Stop();
|
||||
Assert.Fail(String.Format("{0} was not displayed in {1} ms", element, timeout));
|
||||
Assert.Fail($"{element} was not displayed in {timeout} ms");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ namespace CalculatorUITests
|
|||
}
|
||||
CalculatorApp.EnsureCalculatorHasFocus();
|
||||
page.ScientificOperators.SetAngleOperator(AngleOperatorState.Degrees);
|
||||
page.ScientificOperators.ResetFEButton(fEButtonState.Normal);
|
||||
page.ScientificOperators.ResetFEButton(FEButtonState.Normal);
|
||||
}
|
||||
|
||||
[TestCleanup]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue