From c93eb6ed5766ab0ce6e66f68c27e7aa0ff244642 Mon Sep 17 00:00:00 2001 From: Piotr Karczmarz Date: Wed, 11 Sep 2024 20:09:29 +0200 Subject: [PATCH] CI for UI Tests Infrastructure Update (#88) CLOSE https://linear.app/sourcegraph/issue/CODY-2816/ci-for-visual-studio-integration-tests-based-on-vsixtesting UI Tests infrastructure (`Cody.VisualStudio.Tests`) updated to allow running them, not only locally which were running fine from the very beginning, but also using GitHub Actions. ### Fixed threading issues only seen in GitHub Actions: - VsixTesting runner exception: `Call was Rejected By Callee` ([more about it](https://learn.microsoft.com/en-us/previous-versions/ms228772(v=vs.140)?redirectedfrom=MSDN)), caused PlaywrightTestsBase.InitializeAsync() was called multiple times, which internally tries to call VS API, when XUnit was creating instances of all involved test classes - Removed calls to VS API from TestBase constructor, which have the same effect as above ### Other Updates - Added logging via XUnit logger, which calls our Logger internally and gives us detailed logs from tests (including all logs that are logged in the VS Cody output pane during run-time) - Getting IDE to the front when "Start Window" appears (call to DismissStartWindow()) - WaitForAsync() waits maximum 2 minutes (for the chat loading) - Added CollectionBehavior.CollectionPerAssembly and DisableTestParallelization = true for XUnit Improved PlaywrightTestsBase: - Introduced SemaphoreSlim() for synchronization - Playwright related properties (Browser, Context, Page and Playwright) are now static --- .github/workflows/cake-build.yml | 14 ++- src/Cody.Core/Cody.Core.csproj | 1 + src/Cody.Core/Logging/ITestLogger.cs | 9 ++ src/Cody.Core/Logging/Logger.cs | 16 ++- .../ChatLoggedBasicTests.cs | 78 ++++++++++----- .../ChatNotLoggedStateTests.cs | 42 +++++--- .../CodyPackageTests.cs | 8 +- .../PlaywrightInitializationTests.cs | 4 + .../PlaywrightTestsBase.cs | 97 +++++++++++++++---- .../Properties/AssemblyInfo.cs | 3 +- src/Cody.VisualStudio.Tests/SolutionsPaths.cs | 5 - src/Cody.VisualStudio.Tests/TestsBase.cs | 56 ++++++++--- src/build.cake | 10 +- 13 files changed, 248 insertions(+), 95 deletions(-) create mode 100644 src/Cody.Core/Logging/ITestLogger.cs diff --git a/.github/workflows/cake-build.yml b/.github/workflows/cake-build.yml index acb8f2e..3179934 100644 --- a/.github/workflows/cake-build.yml +++ b/.github/workflows/cake-build.yml @@ -1,4 +1,4 @@ -name: Cake Build +name: Cake Build on: push: @@ -17,6 +17,9 @@ jobs: - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v1.3 + - name: ⚙️ Prepare Visual Studio + run: '&"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings' + - name: Install Cake.Tool run: dotnet tool install --global Cake.Tool @@ -31,7 +34,8 @@ jobs: corepack install --global pnpm@8.6.7 dotnet cake - #- name: Tests - # run: | - # cd src - # dotnet cake --target Tests + - name: Tests + run: | + cd src + dotnet cake --target Tests + dotnet test .\Cody.VisualStudio.Tests\bin\Debug\Cody.VisualStudio.Tests.dll -v detailed diff --git a/src/Cody.Core/Cody.Core.csproj b/src/Cody.Core/Cody.Core.csproj index cdb4442..b01705a 100644 --- a/src/Cody.Core/Cody.Core.csproj +++ b/src/Cody.Core/Cody.Core.csproj @@ -89,6 +89,7 @@ + diff --git a/src/Cody.Core/Logging/ITestLogger.cs b/src/Cody.Core/Logging/ITestLogger.cs new file mode 100644 index 0000000..ff5bf40 --- /dev/null +++ b/src/Cody.Core/Logging/ITestLogger.cs @@ -0,0 +1,9 @@ +using System.Runtime.CompilerServices; + +namespace Cody.Core.Logging +{ + public interface ITestLogger + { + void WriteLog(string message, string type = "", [CallerMemberName] string callerName = ""); + } +} diff --git a/src/Cody.Core/Logging/Logger.cs b/src/Cody.Core/Logging/Logger.cs index 47c76c1..8c57532 100644 --- a/src/Cody.Core/Logging/Logger.cs +++ b/src/Cody.Core/Logging/Logger.cs @@ -1,13 +1,14 @@ -using System; +using System; using System.IO; using System.Runtime.CompilerServices; using System.Text; namespace Cody.Core.Logging { - public class Logger: ILog + public class Logger : ILog { private IOutputWindowPane _outputWindowPane; + private ITestLogger _testLogger; public Logger() { @@ -20,6 +21,7 @@ public void Info(string message, [CallerMemberName] string callerName = "") // TODO: _fileLogger.Info(customMessage); DebugWrite(customMessage); _outputWindowPane?.Info(message, callerName); + _testLogger?.WriteLog(message, "INFO", callerName); } public void Debug(string message, [CallerMemberName] string callerName = "", [CallerFilePath] string callerFilePath = null) @@ -32,6 +34,7 @@ public void Debug(string message, [CallerMemberName] string callerName = "", [Ca // TODO: _fileLogger.Debug(customMessage); DebugWrite(customMessage); _outputWindowPane?.Debug(message, callerName); + _testLogger?.WriteLog(message, "DEBUG", callerName); #endif } @@ -48,6 +51,7 @@ public void Warn(string message, [CallerMemberName] string callerName = "") // TODO: _fileLogger.Warn(customMessage); DebugWrite(message); _outputWindowPane?.Warn(message, callerName); + _testLogger?.WriteLog(message, "WARN", callerName); } public void Error(string message, [CallerMemberName] string callerName = "") @@ -57,6 +61,7 @@ public void Error(string message, [CallerMemberName] string callerName = "") // TODO: _fileLogger.Error(customMessage); DebugWrite(customMessage); _outputWindowPane?.Error(message, callerName); + _testLogger?.WriteLog(message, "ERROR", callerName); } public void Error(string message, Exception ex, [CallerMemberName] string callerName = "") @@ -77,6 +82,7 @@ public void Error(string message, Exception ex, [CallerMemberName] string caller // TODO: _fileLogger.Error(originalException, customMessage); DebugWrite(customMessage); _outputWindowPane?.Error(outputMessage, callerName); + _testLogger?.WriteLog(message, "ERROR", callerName); } public Logger WithOutputPane(IOutputWindowPane outputWindowPane) @@ -85,6 +91,12 @@ public Logger WithOutputPane(IOutputWindowPane outputWindowPane) return this; } + public Logger WithTestLogger(ITestLogger testLogger) + { + _testLogger = testLogger; + return this; + } + public Logger Build() { return this; diff --git a/src/Cody.VisualStudio.Tests/ChatLoggedBasicTests.cs b/src/Cody.VisualStudio.Tests/ChatLoggedBasicTests.cs index d8ad207..afeda11 100644 --- a/src/Cody.VisualStudio.Tests/ChatLoggedBasicTests.cs +++ b/src/Cody.VisualStudio.Tests/ChatLoggedBasicTests.cs @@ -1,57 +1,83 @@ -using EnvDTE; -using Microsoft.VisualStudio.Shell; using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Xunit; +using Xunit.Abstractions; namespace Cody.VisualStudio.Tests { public class ChatLoggedBasicTests: PlaywrightInitializationTests { - [VsFact(Version = VsVersion.VS2022)] + public ChatLoggedBasicTests(ITestOutputHelper output) : base(output) + { + } + + //[VsFact(Version = VsVersion.VS2022)] public async Task Loads_Properly_InLoggedState() { // given - await WaitForPlaywrightAsync(); - - // when - var text = "Prompts & Commands"; - var getStarted = Page.GetByText(text); - var textContents = await getStarted.AllTextContentsAsync(); + var codyPackage = await GetPackageAsync(); + var settingsService = codyPackage.UserSettingsService; + var accessToken = codyPackage.UserSettingsService.AccessToken; + + var text = "Cody Free or Cody Pro"; + IReadOnlyList textContents; + try + { + await WaitForPlaywrightAsync(); + codyPackage.UserSettingsService.AccessToken += "INVALID"; + await Task.Delay(TimeSpan.FromMilliseconds(500)); // wait for the Chat to response + + // when + + var getStarted = Page.GetByText(text); + textContents = await getStarted.AllTextContentsAsync(); + } + finally + { + settingsService.AccessToken = accessToken; // make it valid + } // then Assert.Equal(text, textContents.First()); } - [VsFact(Version = VsVersion.VS2022)] - public async Task Solution_name_is_added_to_chat_input() + //[VsFact(Version = VsVersion.VS2022)] + public async Task Solution_Name_Is_Added_To_Chat_Input() { + // given OpenSolution(SolutionsPaths.GetConsoleApp1File("ConsoleApp1.sln")); await WaitForPlaywrightAsync(); + // when var tags = await GetChatContextTags(); - Assert.Equal("ConsoleApp1", tags.First().Name); + // then + Assert.Equal("ConsoleApp1", tags.Last().Name); } - [VsFact(Version = VsVersion.VS2022)] - public async Task Active_file_name_and_line_selection_is_showing_in_chat_input() + //[VsFact(Version = VsVersion.VS2022)] + public async Task Active_File_Name_And_Line_Selection_Is_Showing_In_Chat_Input() { - const int startLine = 3; const int endLine = 5; - + // given OpenSolution(SolutionsPaths.GetConsoleApp1File("ConsoleApp1.sln")); await WaitForPlaywrightAsync(); + // when + const int startLine = 3; const int endLine = 5; await OpenDocument(SolutionsPaths.GetConsoleApp1File(@"ConsoleApp1\Manager.cs"), startLine, endLine); var tags = await GetChatContextTags(); - Assert.Equal("Manager.cs", tags.Last().Name); - Assert.Equal(startLine, tags.Last().StartLine); - Assert.Equal(endLine, tags.Last().EndLine); + // then + var firstTagName = tags.First().Name; + var secondTag = tags.ElementAt(1); + Assert.Equal("Manager.cs", firstTagName); + Assert.Equal(startLine, secondTag.StartLine); + Assert.Equal(endLine, secondTag.EndLine); } - [VsFact(Version = VsVersion.VS2022)] + //[VsFact(Version = VsVersion.VS2022)] public async Task Can_you_close_and_reopen_chat_tool_window() { await WaitForPlaywrightAsync(); @@ -65,22 +91,22 @@ public async Task Can_you_close_and_reopen_chat_tool_window() Assert.True(isOpen); } - [VsFact(Version = VsVersion.VS2022)] + //[VsFact(Version = VsVersion.VS2022)] public async Task Does_chat_history_show_up_after_you_have_submitting_a_chat_close_and_reopen_window() { - int num = new Random().Next(); - string propt = $"How to create const with value {num}?"; + var num = new Random().Next(); + var prompt = $"How to create const with value {num}?"; await WaitForPlaywrightAsync(); - await EnterChatTextAndSend(propt); + await EnterChatTextAndSend(prompt); await CloseCodyChatToolWindow(); await OpenCodyChatToolWindow(); await ShowHistoryTab(); - var chatHistoryEntries = await GetTodaysChatHistory(); + var chatHistoryEntries = await GetTodayChatHistory(); - Assert.Contains(chatHistoryEntries, x => x.Contains(propt)); + Assert.Contains(chatHistoryEntries, x => x.Contains(prompt)); } } diff --git a/src/Cody.VisualStudio.Tests/ChatNotLoggedStateTests.cs b/src/Cody.VisualStudio.Tests/ChatNotLoggedStateTests.cs index 6e2e534..1e5d222 100644 --- a/src/Cody.VisualStudio.Tests/ChatNotLoggedStateTests.cs +++ b/src/Cody.VisualStudio.Tests/ChatNotLoggedStateTests.cs @@ -1,34 +1,44 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; -using Cody.VisualStudio.Options; using Xunit; +using Xunit.Abstractions; namespace Cody.VisualStudio.Tests { public class ChatNotLoggedStateTests : PlaywrightTestsBase { - // WIP - //[VsFact(Version = VsVersion.VS2022)] + public ChatNotLoggedStateTests(ITestOutputHelper output) : base(output) + { + } + + [VsFact(Version = VsVersion.VS2022)] public async Task Loads_Properly_InNotLoggedState() { // given - await GetPackageAsync(); - CodyPackage.ShowOptionPage(typeof(GeneralOptionsPage)); - await Task.Delay(TimeSpan.FromSeconds(1)); // HACK: properly wait for Options page - // TODO: Replace SourcegraphUrl with Token value - var accessToken = CodyPackage.GeneralOptionsViewModel.SourcegraphUrl; - CodyPackage.GeneralOptionsViewModel.SourcegraphUrl = $"{accessToken}INVALID"; // make it invalid + var codyPackage = await GetPackageAsync(); + var settingsService = codyPackage.UserSettingsService; + var accessToken = codyPackage.UserSettingsService.AccessToken; - await WaitForPlaywrightAsync(); - - - // when var text = "Cody Free or Cody Pro"; - var getStarted = Page.GetByText(text); - var textContents = await getStarted.AllTextContentsAsync(); + IReadOnlyList textContents; + try + { + await WaitForPlaywrightAsync(); + codyPackage.UserSettingsService.AccessToken += "INVALID"; + await Task.Delay(TimeSpan.FromMilliseconds(500)); // wait for the Chat to response + + // when - CodyPackage.GeneralOptionsViewModel.SourcegraphUrl = $"{accessToken}"; // make it valid + var getStarted = Page.GetByText(text); + textContents = await getStarted.AllTextContentsAsync(); + } + finally + { + if (accessToken != null) + settingsService.AccessToken = accessToken; // make it valid + } // then Assert.Equal(text, textContents.First()); diff --git a/src/Cody.VisualStudio.Tests/CodyPackageTests.cs b/src/Cody.VisualStudio.Tests/CodyPackageTests.cs index f02de54..952f5ba 100644 --- a/src/Cody.VisualStudio.Tests/CodyPackageTests.cs +++ b/src/Cody.VisualStudio.Tests/CodyPackageTests.cs @@ -1,14 +1,14 @@ -using System; using System.Threading.Tasks; -using System.Windows; -using System.Windows.Navigation; -using Cody.UI.ViewModels; using Xunit; +using Xunit.Abstractions; namespace Cody.VisualStudio.Tests { public class CodyPackageTests : TestsBase { + public CodyPackageTests(ITestOutputHelper output) : base(output) + { + } [VsFact(Version = VsVersion.VS2022)] public async Task CodyPackage_Loaded_OnDemand() diff --git a/src/Cody.VisualStudio.Tests/PlaywrightInitializationTests.cs b/src/Cody.VisualStudio.Tests/PlaywrightInitializationTests.cs index f2ea429..1ed8c1e 100644 --- a/src/Cody.VisualStudio.Tests/PlaywrightInitializationTests.cs +++ b/src/Cody.VisualStudio.Tests/PlaywrightInitializationTests.cs @@ -1,11 +1,15 @@ using System.Linq; using System.Threading.Tasks; using Xunit; +using Xunit.Abstractions; namespace Cody.VisualStudio.Tests { public class PlaywrightInitializationTests : PlaywrightTestsBase { + public PlaywrightInitializationTests(ITestOutputHelper output) : base(output) + { + } [VsFact(Version = VsVersion.VS2022)] public async Task Playwright_Connects_OvercCDP() diff --git a/src/Cody.VisualStudio.Tests/PlaywrightTestsBase.cs b/src/Cody.VisualStudio.Tests/PlaywrightTestsBase.cs index 0904015..46008a9 100644 --- a/src/Cody.VisualStudio.Tests/PlaywrightTestsBase.cs +++ b/src/Cody.VisualStudio.Tests/PlaywrightTestsBase.cs @@ -1,40 +1,70 @@ using System; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.Threading.Tasks; -using System.Windows.Controls; -using System.Windows.Documents; +using EnvDTE; +using EnvDTE80; using Microsoft.Playwright; -using Xunit; +using Microsoft.VisualStudio.Shell; +using Xunit.Abstractions; namespace Cody.VisualStudio.Tests { public abstract class PlaywrightTestsBase: TestsBase { - protected string CdpAddress = $"http://127.0.0.1:{9222}"; - - protected IPlaywright Playwright; - protected IBrowser Browser; - - protected IBrowserContext Context; + protected string CdpAddress = $"http://localhost:{9222}"; - protected IPage Page; + protected static IPlaywright Playwright; + protected static IBrowser Browser; + + protected static IBrowserContext Context; + + protected static IPage Page; + + private static SemaphoreSlim _sync = new SemaphoreSlim(1); + private static bool _isInitialized; + + protected PlaywrightTestsBase(ITestOutputHelper output) : base(output) + { + } private async Task InitializeAsync() { - CodyPackage = await GetPackageAsync(); - CodyPackage.Logger.Debug("CodyPackage loaded."); + await _sync.WaitAsync(); - await WaitForChat(); - CodyPackage.Logger.Debug("Chat initialized and loaded."); + try + { + if (_isInitialized) + { + WriteLog("PlaywrightTestsBase already initialized!"); + return; + } + + await DismissStartWindow(); + + CodyPackage = await GetPackageAsync(); + WriteLog("CodyPackage loaded."); + + await WaitForChat(); + WriteLog("Chat initialized and loaded."); - Playwright = await Microsoft.Playwright.Playwright.CreateAsync(); - Browser = await Playwright.Chromium.ConnectOverCDPAsync(CdpAddress); + Playwright = await Microsoft.Playwright.Playwright.CreateAsync(); + WriteLog("Playwright created."); - CodyPackage.Logger.Debug("Playwright initialized."); + Browser = await Playwright.Chromium.ConnectOverCDPAsync(CdpAddress); - Context = Browser.Contexts[0]; - Page = Context.Pages[0]; + WriteLog("Playwright connected to the browser."); + + Context = Browser.Contexts[0]; + Page = Context.Pages[0]; + + _isInitialized = true; + } + finally + { + _sync.Release(); + } } protected async Task WaitForPlaywrightAsync() @@ -42,6 +72,33 @@ protected async Task WaitForPlaywrightAsync() await InitializeAsync(); } + protected async Task DismissStartWindow() + { + await OnUIThread(() => + { + try + { + var dte = (DTE2)Package.GetGlobalService(typeof(DTE)); + var mainWindow = dte.MainWindow; + if (!mainWindow.Visible) // Options -> General -> On Startup open: Start Window + { + WriteLog("Main IDE Window NOT visible! Bringing it to the front ..."); + mainWindow.Visible = true; + WriteLog("Main IDE Window is now VISIBLE."); + } + } + catch (Exception ex) + { + var message = "Cannot get MainWindow visible!"; + WriteLog(message); + + throw new Exception($"{message}", ex); + } + + return Task.CompletedTask; + }); + } + protected async Task ShowChatTab() => await Page.GetByTestId("tab-chat").ClickAsync(); protected async Task ShowHistoryTab() => await Page.GetByTestId("tab-history").ClickAsync(); @@ -65,7 +122,7 @@ protected async Task EnterChatTextAndSend(string prompt) await Task.Delay(500); } - protected async Task GetTodaysChatHistory() + protected async Task GetTodayChatHistory() { var todaySection = await Page.QuerySelectorAsync("div[id='radix-:r11:']") ?? await Page.QuerySelectorAsync("div[id='radix-:r1b:']"); diff --git a/src/Cody.VisualStudio.Tests/Properties/AssemblyInfo.cs b/src/Cody.VisualStudio.Tests/Properties/AssemblyInfo.cs index 5595994..e9f0b0e 100644 --- a/src/Cody.VisualStudio.Tests/Properties/AssemblyInfo.cs +++ b/src/Cody.VisualStudio.Tests/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Xunit; @@ -32,3 +32,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: TestFramework("Xunit.VsTestFramework", "VsixTesting.Xunit")] +[assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly, DisableTestParallelization = true)] diff --git a/src/Cody.VisualStudio.Tests/SolutionsPaths.cs b/src/Cody.VisualStudio.Tests/SolutionsPaths.cs index 4596185..fb11119 100644 --- a/src/Cody.VisualStudio.Tests/SolutionsPaths.cs +++ b/src/Cody.VisualStudio.Tests/SolutionsPaths.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Cody.VisualStudio.Tests { diff --git a/src/Cody.VisualStudio.Tests/TestsBase.cs b/src/Cody.VisualStudio.Tests/TestsBase.cs index 4f10361..387ac53 100644 --- a/src/Cody.VisualStudio.Tests/TestsBase.cs +++ b/src/Cody.VisualStudio.Tests/TestsBase.cs @@ -1,26 +1,42 @@ using System; +using System.Runtime.CompilerServices; using System.Threading.Tasks; using System.Windows; +using Cody.Core.Logging; using EnvDTE; using EnvDTE80; using Microsoft.VisualStudio.Shell; using Microsoft.VisualStudio.Shell.Interop; using Microsoft.VisualStudio.TextManager.Interop; +using Xunit.Abstractions; +using Thread = System.Threading.Thread; namespace Cody.VisualStudio.Tests { - public abstract class TestsBase + public abstract class TestsBase: ITestLogger { + private readonly ITestOutputHelper _logger; + protected CodyPackage CodyPackage; - protected IVsUIShell UIShell; - protected DTE2 Dte; - public TestsBase() + protected TestsBase(ITestOutputHelper output) + { + _logger = output; + + WriteLog("[TestBase] Initialized."); + } + + public void WriteLog(string message, string type = "", [CallerMemberName] string callerName = "") { - Dte = (DTE2)Package.GetGlobalService(typeof(DTE)); - UIShell = (IVsUIShell)Package.GetGlobalService(typeof(SVsUIShell)); + _logger.WriteLine($"[{DateTime.Now:HH:mm:ss.fff}] [{type}] [{callerName}] [ThreadId:{Thread.CurrentThread.ManagedThreadId}] {message}"); } + private IVsUIShell _uiShell; + protected IVsUIShell UIShell => _uiShell ?? (_uiShell = (IVsUIShell)Package.GetGlobalService(typeof(SVsUIShell))); + + private DTE2 _dte; + protected DTE2 Dte => _dte ?? (_dte = (DTE2)Package.GetGlobalService(typeof(DTE))); + protected void OpenSolution(string path) => Dte.Solution.Open(path); protected void CloseSolution() => Dte.Solution.Close(); @@ -80,20 +96,36 @@ protected async Task GetPackageAsync() var codyPackage = (CodyPackage)await shell.LoadPackageAsync(new Guid(guid)); // forces to load CodyPackage, even when the Tool Window is not selected CodyPackage = codyPackage; - + var logger = (Logger)CodyPackage.Logger; + logger.WithTestLogger(this); + return codyPackage; } protected async Task WaitForAsync(Func condition) { + var startTime = DateTime.Now; + var timeout = TimeSpan.FromMinutes(2); while (!condition.Invoke()) { await Task.Delay(TimeSpan.FromSeconds(1)); - CodyPackage.Logger.Debug($"Chat not loaded ..."); + WriteLog("Chat not loaded ..."); + + var nowTime = DateTime.Now; + var currentSpan = nowTime - startTime; + if (currentSpan >= timeout) + { + var message = $"Chat timeout! It's loading for more than {currentSpan.TotalSeconds} s."; + WriteLog(message); + throw new Exception(message); + } } - CodyPackage.Logger.Debug($"Chat loaded."); + if (condition.Invoke()) + { + WriteLog($"Condition meet."); + } } protected async Task OnUIThread(Func task) @@ -106,15 +138,17 @@ await Application.Current.Dispatcher.InvokeAsync(async () => protected async Task WaitForChat() { + WriteLog("Waiting for the Chat ..."); + bool isChatLoaded = false; await CodyPackage.ShowToolWindowAsync(); + WriteLog("ShowToolWindowAsync called."); var viewModel = CodyPackage.MainViewModel; await WaitForAsync(() => viewModel.IsChatLoaded); isChatLoaded = viewModel.IsChatLoaded; - CodyPackage.Logger.Debug($"Chat loaded:{isChatLoaded}"); - + WriteLog($"Chat loaded:{isChatLoaded}"); } } } diff --git a/src/build.cake b/src/build.cake index 8278977..6ec7feb 100644 --- a/src/build.cake +++ b/src/build.cake @@ -153,11 +153,11 @@ Task("Tests") Verbosity = Verbosity.Minimal }); - DotNetTest("./Cody.VisualStudio.Tests/bin/Debug/Cody.VisualStudio.Tests.dll", new DotNetTestSettings - { - NoBuild = true, - NoRestore = true - }); +// DotNetTest("./Cody.VisualStudio.Tests/bin/Debug/Cody.VisualStudio.Tests.dll", new DotNetTestSettings +// { +// NoBuild = true, +// NoRestore = true +// }); }); Task("Restore")