diff --git a/build/pipelines/templates/build-app-internal.yaml b/build/pipelines/templates/build-app-internal.yaml index 9c55b30a..9e082815 100644 --- a/build/pipelines/templates/build-app-internal.yaml +++ b/build/pipelines/templates/build-app-internal.yaml @@ -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: diff --git a/build/pipelines/templates/prepare-release-internalonly.yaml b/build/pipelines/templates/prepare-release-internalonly.yaml index b14d5979..56bce41d 100644 --- a/build/pipelines/templates/prepare-release-internalonly.yaml +++ b/build/pipelines/templates/prepare-release-internalonly.yaml @@ -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. diff --git a/src/Calculator/Views/MainPage.xaml b/src/Calculator/Views/MainPage.xaml index 8d0af906..c0febd59 100644 --- a/src/Calculator/Views/MainPage.xaml +++ b/src/Calculator/Views/MainPage.xaml @@ -177,6 +177,7 @@ diff --git a/src/Calculator/Views/MainPage.xaml.cpp b/src/Calculator/Views/MainPage.xaml.cpp index f0c0b5e8..876ff72c 100644 --- a/src/Calculator/Views/MainPage.xaml.cpp +++ b/src/Calculator/Views/MainPage.xaml.cpp @@ -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 diff --git a/src/Calculator/Views/MainPage.xaml.h b/src/Calculator/Views/MainPage.xaml.h index 2b71bdd6..88451d3b 100644 --- a/src/Calculator/Views/MainPage.xaml.h +++ b/src/Calculator/Views/MainPage.xaml.h @@ -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); diff --git a/src/CalculatorUITestFramework/MemoryPanel.cs b/src/CalculatorUITestFramework/MemoryPanel.cs index f1233d16..e8cc3f80 100644 --- a/src/CalculatorUITestFramework/MemoryPanel.cs +++ b/src/CalculatorUITestFramework/MemoryPanel.cs @@ -82,7 +82,7 @@ namespace CalculatorUITestFramework /// /// 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 /// public void ResizeWindowToDisplayMemoryLabel() { diff --git a/src/CalculatorUITestFramework/NumberPad.cs b/src/CalculatorUITestFramework/NumberPad.cs index 5e5bcf2f..306baaab 100644 --- a/src/CalculatorUITestFramework/NumberPad.cs +++ b/src/CalculatorUITestFramework/NumberPad.cs @@ -3,6 +3,7 @@ using OpenQA.Selenium.Appium.Windows; using System; +using System.Globalization; namespace CalculatorUITestFramework { @@ -29,7 +30,7 @@ namespace CalculatorUITestFramework /// Number to be entered into the calculator. public void Input(double number) { - string numberStr = number.ToString(); + string numberStr = number.ToString(CultureInfo.InvariantCulture); if (numberStr.StartsWith("-")) { numberStr = numberStr.Substring(1) + "-"; diff --git a/src/CalculatorUITestFramework/ScientificOperatorsPanel.cs b/src/CalculatorUITestFramework/ScientificOperatorsPanel.cs index 11ad88b9..0971ddda 100644 --- a/src/CalculatorUITestFramework/ScientificOperatorsPanel.cs +++ b/src/CalculatorUITestFramework/ScientificOperatorsPanel.cs @@ -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") { diff --git a/src/CalculatorUITestFramework/StandardAoTCalculatorPage.cs b/src/CalculatorUITestFramework/StandardAoTCalculatorPage.cs index 1a4070eb..79a8777d 100644 --- a/src/CalculatorUITestFramework/StandardAoTCalculatorPage.cs +++ b/src/CalculatorUITestFramework/StandardAoTCalculatorPage.cs @@ -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; } ///// diff --git a/src/CalculatorUITestFramework/StandardCalculatorPage.cs b/src/CalculatorUITestFramework/StandardCalculatorPage.cs index 72439b5e..aa56c893 100644 --- a/src/CalculatorUITestFramework/StandardCalculatorPage.cs +++ b/src/CalculatorUITestFramework/StandardCalculatorPage.cs @@ -20,7 +20,7 @@ namespace CalculatorUITestFramework private WindowsDriver session => WinAppDriver.Instance.CalculatorSession; /// - /// 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 /// public void NavigateToStandardCalculator() { diff --git a/src/CalculatorUITestFramework/WinAppDriver.cs b/src/CalculatorUITestFramework/WinAppDriver.cs index bf61f4df..70901256 100644 --- a/src/CalculatorUITestFramework/WinAppDriver.cs +++ b/src/CalculatorUITestFramework/WinAppDriver.cs @@ -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(); diff --git a/src/CalculatorUITestFramework/WindowsDriverLocalService.cs b/src/CalculatorUITestFramework/WindowsDriverLocalService.cs index df3e0e54..8d6c4a50 100644 --- a/src/CalculatorUITestFramework/WindowsDriverLocalService.cs +++ b/src/CalculatorUITestFramework/WindowsDriverLocalService.cs @@ -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); diff --git a/src/CalculatorUITestFramework/WindowsElementExtensions.cs b/src/CalculatorUITestFramework/WindowsElementExtensions.cs index 773548d6..a1937727 100644 --- a/src/CalculatorUITestFramework/WindowsElementExtensions.cs +++ b/src/CalculatorUITestFramework/WindowsElementExtensions.cs @@ -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"); } } } diff --git a/src/CalculatorUITests/ScientificModeFunctionalTests.cs b/src/CalculatorUITests/ScientificModeFunctionalTests.cs index c576de0e..eaccc1ee 100644 --- a/src/CalculatorUITests/ScientificModeFunctionalTests.cs +++ b/src/CalculatorUITests/ScientificModeFunctionalTests.cs @@ -54,7 +54,7 @@ namespace CalculatorUITests } CalculatorApp.EnsureCalculatorHasFocus(); page.ScientificOperators.SetAngleOperator(AngleOperatorState.Degrees); - page.ScientificOperators.ResetFEButton(fEButtonState.Normal); + page.ScientificOperators.ResetFEButton(FEButtonState.Normal); } [TestCleanup]