Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
run: dotnet restore

- name: Build solution
run: dotnet build --configuration Debug
run: dotnet build --configuration Debug --warnings-as-errors

- name: Restore .NET tools
run: dotnet tool restore
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
using SAPPub.Core.Entities.KS4.Absence;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SAPPub.Core.Interfaces.Services.KS4.Absence
{
public interface ILAAbsenceService
{
IEnumerable<LAAbsence> GetAllLAAbsence();
LAAbsence? GetLAAbsence(string urn);
LAAbsence GetLAAbsence(string urn);
}
}
2 changes: 1 addition & 1 deletion SAPPub.Web/Controllers/DataController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class DataController : Controller
{
private IEstablishmentService _service;
private IEstablishmentAbsenceService _absenceService;
private ILAAbsenceService _laAbsenceService;
private ILAAbsenceService _laAbsenceService;
private IEnglandAbsenceService _englandAbsenceService;
private IEstablishmentPerformanceService _performanceService;
private IEstablishmentDestinationsService _destinationsService;
Expand Down
2 changes: 1 addition & 1 deletion Tests/SAPPub.Web.Tests/UI/HomePageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public async Task HomePage_DisplaysMainHeading()
var heading = await Page.Locator("h1").TextContentAsync();

// Assert
Assert.NotNull(heading.Replace(" ",""));
Assert.NotNull(heading?.Replace(" ", ""));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using SAPPub.Web.Tests.UI.Helpers;
using SAPPub.Tests.UI.Infrastructure;
using SAPPub.Tests.UI.Infrastructure;
using SAPPub.Web.Tests.UI.Helpers;

namespace SAPPub.Web.Tests.UI.SecondarySchool;

Expand Down Expand Up @@ -41,7 +41,7 @@ public async Task AboutSchoolPage_DisplaysMainHeading()
var heading = await Page.Locator("h1").TextContentAsync();

// Assert
Assert.NotNull(heading.Replace(" ", ""));
Assert.NotNull(heading?.Replace(" ", ""));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public async Task AcademicPerformanceEnglishAndMathsResultsPage_DisplaysMainHead
var heading = await Page.Locator("h1").TextContentAsync();

// Assert
Assert.NotNull(heading.Replace(" ", ""));
Assert.NotNull(heading?.Replace(" ", ""));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using SAPPub.Web.Tests.UI.Helpers;
using SAPPub.Tests.UI.Infrastructure;
using SAPPub.Tests.UI.Infrastructure;
using SAPPub.Web.Tests.UI.Helpers;

namespace SAPPub.Web.Tests.UI.SecondarySchool;

Expand Down Expand Up @@ -41,7 +41,7 @@ public async Task AcademicPerformancePupilProgressPage_DisplaysMainHeading()
var heading = await Page.Locator("h1").TextContentAsync();

// Assert
Assert.NotNull(heading.Replace(" ", ""));
Assert.NotNull(heading?.Replace(" ", ""));
}

[Fact]
Expand Down Expand Up @@ -72,7 +72,7 @@ public async Task AcademicPerformancePupilProgressPage_Displays_VerticalNavigati
await nav.ShouldHaveOneActiveItemAsync();
await nav.ShouldHaveActiveHrefAsync(_pageUrl);
}

[Fact]
public async Task AcademicPerformancePupilProgressPage_Displays_Sub_Navigation()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public async Task AcademicPerformanceSubjectsEnteredPage_DisplaysMainHeading()
var heading = await Page.Locator("h1").TextContentAsync();

// Assert
Assert.NotNull(heading.Replace(" ", ""));
Assert.NotNull(heading?.Replace(" ", ""));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using SAPPub.Web.Tests.UI.Helpers;
using SAPPub.Tests.UI.Infrastructure;
using SAPPub.Tests.UI.Infrastructure;
using SAPPub.Web.Tests.UI.Helpers;

namespace SAPPub.Web.Tests.UI.SecondarySchool;

Expand Down Expand Up @@ -41,7 +41,7 @@ public async Task CurriculumAndExtraCurricularActivitiesPage_DisplaysMainHeading
var heading = await Page.Locator("h1").TextContentAsync();

// Assert
Assert.NotNull(heading.Replace(" ", ""));
Assert.NotNull(heading?.Replace(" ", ""));
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task DestinationsPage_DisplaysMainHeading()
var heading = await Page.Locator("h1").TextContentAsync();

// Assert
Assert.NotNull(heading.Replace(" ", ""));
Assert.NotNull(heading?.Replace(" ", ""));

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public void Invoke_ReturnsDefaultViewWithModel()
{
// Arrange
var item = new VerticalNavigationModel { URN = "1", SchoolName = "Kes", ActivePage = "About" };

var component = CreateComponent();

// Act
Expand All @@ -24,7 +24,7 @@ public void Invoke_ReturnsDefaultViewWithModel()


var model = result.ViewData!;
Assert.IsType<VerticalNavigationModel>(model.Model);
Assert.IsType<VerticalNavigationModel>(model.Model);
Assert.Equal(item.URN, ((VerticalNavigationModel)model.Model).URN);
Assert.Equal(item.SchoolName, ((VerticalNavigationModel)model.Model).SchoolName);
Assert.Equal(item.ActivePage, ((VerticalNavigationModel)model.Model).ActivePage);
Expand All @@ -43,6 +43,6 @@ public void Invoke_WithNullModel_DoesNotThrow()
Assert.NotNull(result);
Assert.Equal("~/ViewComponents/VerticalNavigation/Default.cshtml", result.ViewName);

Assert.Null(result.ViewData.Model);
Assert.Null(result.ViewData!.Model);
}
}
Loading