diff --git a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Persons/Layout.cshtml b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Persons/Layout.cshtml index 68f8a1551..e96d91f41 100644 --- a/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Persons/Layout.cshtml +++ b/TeachingRecordSystem/src/TeachingRecordSystem.SupportUi/Pages/Persons/Layout.cshtml @@ -28,7 +28,7 @@ @if (FeatureProvider.IsEnabled(FeatureNames.Induction)) { -
  • +
  • Induction
  • } diff --git a/TeachingRecordSystem/tests/TeachingRecordSystem.SupportUi.Tests/PageTests/Persons/PersonDetail/InductionTests.cs b/TeachingRecordSystem/tests/TeachingRecordSystem.SupportUi.Tests/PageTests/Persons/PersonDetail/InductionTests.cs index d8a22b33e..464b4eefb 100644 --- a/TeachingRecordSystem/tests/TeachingRecordSystem.SupportUi.Tests/PageTests/Persons/PersonDetail/InductionTests.cs +++ b/TeachingRecordSystem/tests/TeachingRecordSystem.SupportUi.Tests/PageTests/Persons/PersonDetail/InductionTests.cs @@ -16,8 +16,30 @@ public class InductionTests(HostFixture hostFixture) : TestBase(hostFixture) [Fact] public async Task Get_FeatureFlagOff_NoInductionTabShown() { + // Arrange FeatureProvider.Features.Clear(); - throw new NotImplementedException(); + var person = await TestData.CreatePersonAsync(); + + // Act + var response = await HttpClient.GetAsync($"/persons/{person.ContactId}"); + + // Assert + var doc = await AssertEx.HtmlResponseAsync(response); + Assert.Null(doc.GetElementByTestId("induction-tab")); + } + + [Fact] + public async Task Get_FeatureFlagOn_InductionTabShown() + { + // Arrange + var person = await TestData.CreatePersonAsync(); + + // Act + var response = await HttpClient.GetAsync($"/persons/{person.ContactId}"); + + // Assert + var doc = await AssertEx.HtmlResponseAsync(response); + Assert.NotNull(doc.GetElementByTestId("induction-tab")); } [Fact]