diff --git a/Assets/Tests/Editor/CliSetupSectionTests.cs b/Assets/Tests/Editor/CliSetupSectionTests.cs index 0bb74f313..54b671318 100644 --- a/Assets/Tests/Editor/CliSetupSectionTests.cs +++ b/Assets/Tests/Editor/CliSetupSectionTests.cs @@ -1,3 +1,5 @@ +using System.Collections.Generic; + using NUnit.Framework; using UnityEditor.UIElements; using UnityEngine.UIElements; @@ -82,51 +84,10 @@ public void IsUninstallCliAction_ReturnsExpectedValue( Assert.That(result, Is.EqualTo(expected)); } - [TestCase(false, false, SkillInstallState.Missing, "Install Skills")] - [TestCase(true, true, SkillInstallState.Missing, "Installing...")] - [TestCase(true, false, SkillInstallState.Checking, "Checking...")] - [TestCase(true, false, SkillInstallState.Outdated, "Update Skills")] - [TestCase(true, false, SkillInstallState.Missing, "Install Skills")] - [TestCase(true, false, SkillInstallState.Installed, "Installed")] - public void GetInstallSkillsButtonText_ReturnsExpectedText( - bool isCliInstalled, - bool isInstallingSkills, - SkillInstallState installState, - string expectedText) - { - string text = CliSetupSection.GetInstallSkillsButtonText( - isCliInstalled, - isInstallingSkills, - installState); - - Assert.That(text, Is.EqualTo(expectedText)); - } - - [TestCase(false, false, SkillInstallState.Missing, false)] - [TestCase(true, true, SkillInstallState.Missing, false)] - [TestCase(true, false, SkillInstallState.Checking, false)] - [TestCase(true, false, SkillInstallState.Installed, false)] - [TestCase(true, false, SkillInstallState.Outdated, true)] - [TestCase(true, false, SkillInstallState.Missing, true)] - public void IsInstallSkillsButtonEnabled_ReturnsExpectedValue( - bool isCliInstalled, - bool isInstallingSkills, - SkillInstallState installState, - bool expectedEnabled) - { - // Verifies that the Skills install button follows only Skills state. - bool enabled = CliSetupSection.IsInstallSkillsButtonEnabled( - isCliInstalled, - isInstallingSkills, - installState); - - Assert.That(enabled, Is.EqualTo(expectedEnabled)); - } - [Test] - public void Update_WhenCliRefreshIsChecking_KeepsSkillsControlsEnabled() + public void Update_WhenCliRefreshIsChecking_ShowsSkillsCheckingState() { - // Verifies that a CLI-only refresh does not gray out Skills controls. + // Verifies that IsChecking routes the shared skills panel into ShowChecking. VisualElement root = CreateRootElement(); CliSetupSection section = new(root); CliSetupData data = CreateData( @@ -138,12 +99,18 @@ public void Update_WhenCliRefreshIsChecking_KeepsSkillsControlsEnabled() Button refreshSkillsButton = root.Q