From 56b2b13ebcd7a1c7c1d8aabd842ca04d5d0895c8 Mon Sep 17 00:00:00 2001 From: Summit Bajracharya Date: Sat, 30 May 2026 05:42:25 +0000 Subject: [PATCH] fix: typos and redundant null checks in ConditionallySetupDataverse --- .../Config/TestSettingExtensions.cs | 2 +- src/Microsoft.PowerApps.TestEngine/PowerFx/PowerFxEngine.cs | 4 ++-- src/Microsoft.PowerApps.TestEngine/SingleTestRunner.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Microsoft.PowerApps.TestEngine/Config/TestSettingExtensions.cs b/src/Microsoft.PowerApps.TestEngine/Config/TestSettingExtensions.cs index 45ea971d7..1ea18dc4f 100644 --- a/src/Microsoft.PowerApps.TestEngine/Config/TestSettingExtensions.cs +++ b/src/Microsoft.PowerApps.TestEngine/Config/TestSettingExtensions.cs @@ -45,7 +45,7 @@ public class TestSettingExtensions #endif /// - /// List of allowed .Net Namespaces that deney load unless explict allow is defined + /// List of allowed .Net Namespaces that deny load unless explicit allow is defined /// public HashSet DenyNamespaces { get; set; } = new HashSet(); diff --git a/src/Microsoft.PowerApps.TestEngine/PowerFx/PowerFxEngine.cs b/src/Microsoft.PowerApps.TestEngine/PowerFx/PowerFxEngine.cs index dc6e97270..a3c75a17b 100644 --- a/src/Microsoft.PowerApps.TestEngine/PowerFx/PowerFxEngine.cs +++ b/src/Microsoft.PowerApps.TestEngine/PowerFx/PowerFxEngine.cs @@ -326,13 +326,13 @@ private CultureInfo GetLocaleFromTestSettings(string strLocale) /// private void ConditionallySetupDataverse(TestSettings testSettings, PowerFxConfig powerFxConfig) { - if (testSettings == null || !testSettings.ExtensionModules.Parameters.ContainsKey(ENABLE_DATAVERSE_FUNCTIONS) || (testSettings != null && testSettings.ExtensionModules.Parameters[ENABLE_DATAVERSE_FUNCTIONS].ToString().ToLower() != "true")) + if (testSettings == null || !testSettings.ExtensionModules.Parameters.ContainsKey(ENABLE_DATAVERSE_FUNCTIONS) || testSettings.ExtensionModules.Parameters[ENABLE_DATAVERSE_FUNCTIONS].ToString().ToLower() != "true") { return; } // Must have dataverse enabled to enable AI Functions - if (testSettings != null && testSettings.ExtensionModules.Parameters.ContainsKey(ENABLE_AI_FUNCTIONS) && testSettings.ExtensionModules.Parameters[ENABLE_AI_FUNCTIONS].ToString().ToLower() == "true") + if (testSettings.ExtensionModules.Parameters.ContainsKey(ENABLE_AI_FUNCTIONS) && testSettings.ExtensionModules.Parameters[ENABLE_AI_FUNCTIONS].ToString().ToLower() == "true") { enableAIFunctions = true; } diff --git a/src/Microsoft.PowerApps.TestEngine/SingleTestRunner.cs b/src/Microsoft.PowerApps.TestEngine/SingleTestRunner.cs index cae8f3c48..2ee8e448a 100644 --- a/src/Microsoft.PowerApps.TestEngine/SingleTestRunner.cs +++ b/src/Microsoft.PowerApps.TestEngine/SingleTestRunner.cs @@ -194,13 +194,13 @@ public async Task RunTestAsync(string testRunId, string testRunDirectory, TestSu } catch (Exception ex) { - // That failed warn that faild but allow to continue so that can perform negative tests + // That failed warn that failed but allow to continue so that can perform negative tests // For example the test could fail because the user is Unlicensed or the app is not shared with test user persona // In the example of a canvas application Power Fx test steps like the following could be added for error dialog // Assert(ErrorDialogTitle="Start a Power Apps trial?") Logger.LogError(ex, "Found error setting up initial provider state"); - Logger.LogInformation("Error found during login, proceeding wuth test"); + Logger.LogInformation("Error found during login, proceeding with test"); } } else