diff --git a/CHANGELOG.md b/CHANGELOG.md index 293ac0045..5a244c904 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Added download for Ofsted specific data to Ofsted pages +- Added SharePoint folder link to details page ### Changed diff --git a/DfE.FindInformationAcademiesTrusts/Pages/OtherServicesLinkBuilder.cs b/DfE.FindInformationAcademiesTrusts/Pages/OtherServicesLinkBuilder.cs index b88b68d33..fa5a94e45 100644 --- a/DfE.FindInformationAcademiesTrusts/Pages/OtherServicesLinkBuilder.cs +++ b/DfE.FindInformationAcademiesTrusts/Pages/OtherServicesLinkBuilder.cs @@ -8,6 +8,7 @@ public interface IOtherServicesLinkBuilder string? FindSchoolPerformanceDataListingLink(string uid, TrustType trustType, string? satAcademyUrn); string GetInformationAboutSchoolsListingLinkForTrust(string trustUid); string GetInformationAboutSchoolsListingLinkForAcademy(string urn); + string SharepointFolderLink(string groupId); string? FinancialBenchmarkingInsightsToolListingLink(string? companiesHouseNumber); } @@ -25,6 +26,8 @@ public class OtherServicesLinkBuilder : IOtherServicesLinkBuilder private const string FindSchoolPerformanceDataBaseUrl = "https://www.find-school-performance-data.service.gov.uk"; + private const string SharepointBaseUrl = "https://educationgovuk.sharepoint.com"; + public string GetInformationAboutSchoolsListingLinkForTrust(string trustUid) { return $"{GetInformationAboutSchoolsBaseUrl}/Groups/Group/Details/{trustUid}"; @@ -59,4 +62,10 @@ public string GetInformationAboutSchoolsListingLinkForAcademy(string urn) _ => null }; } + + public string SharepointFolderLink(string groupId) + { + return + $"{SharepointBaseUrl}/_layouts/15/sharepoint.aspx?oobRefiners=%7B%22FileType%22%3A%5B%22other%22%5D%7D&q={groupId}&v=%2Fsearch"; + } } diff --git a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml index e8b40c620..298634d69 100644 --- a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml +++ b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml @@ -42,6 +42,17 @@ @Model.TrustOverview.RegionAndTerritory + @if (Model.SharepointLink is not null) + { +
+
+ SharePoint folder (opens in a new tab) +
+
+ Find this trust's SharePoint folder +
+
+ }
Information from other services (opens in a new tab) @@ -49,27 +60,27 @@
@if (Model.CompaniesHouseLink is not null) { -

- Companies House -

+

+ Companies House +

} @if (Model.GetInformationAboutSchoolsLink is not null) { -

- Get information about schools -

+

+ Get information about schools +

} @if (Model.FinancialBenchmarkingInsightsToolLink is not null) { -

- Financial Benchmarking and Insights Tool -

+

+ Financial Benchmarking and Insights Tool +

} @if (Model.FindSchoolPerformanceLink is not null) { -

- Find school college and performance data in England -

+

+ Find school college and performance data in England +

}
diff --git a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml.cs b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml.cs index 0ec1349d0..15e61b6db 100644 --- a/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml.cs +++ b/DfE.FindInformationAcademiesTrusts/Pages/Trusts/Overview/TrustDetails.cshtml.cs @@ -18,6 +18,7 @@ public class TrustDetailsModel( public string? GetInformationAboutSchoolsLink { get; set; } public string? FinancialBenchmarkingInsightsToolLink { get; set; } public string? FindSchoolPerformanceLink { get; set; } + public string SharepointLink { get; set; } = string.Empty; public override async Task OnGetAsync() { @@ -33,6 +34,7 @@ public override async Task OnGetAsync() FindSchoolPerformanceLink = otherServicesLinkBuilder.FindSchoolPerformanceDataListingLink(TrustOverview.Uid, TrustOverview.Type, TrustOverview.SingleAcademyTrustAcademyUrn); + SharepointLink = otherServicesLinkBuilder.SharepointFolderLink(TrustOverview.GroupId); return Page(); } diff --git a/tests/DFE.FindInformationAcademiesTrusts.CypressTests/cypress/e2e/regression/trusts/governance-page.cy.ts b/tests/DFE.FindInformationAcademiesTrusts.CypressTests/cypress/e2e/regression/trusts/governance-page.cy.ts index f4acdc9af..b05bc7889 100644 --- a/tests/DFE.FindInformationAcademiesTrusts.CypressTests/cypress/e2e/regression/trusts/governance-page.cy.ts +++ b/tests/DFE.FindInformationAcademiesTrusts.CypressTests/cypress/e2e/regression/trusts/governance-page.cy.ts @@ -135,7 +135,7 @@ describe("Testing the components of the Governance page", () => { const trustsWithNoGovernanceData = [ { typeOfTrust: "single academy trust with no governance data", - uid: 17737 + uid: 4009 }, { typeOfTrust: "multi academy trust with no governance data", diff --git a/tests/DfE.FindInformationAcademiesTrusts.UnitTests/Pages/OtherServicesLinkBuilderTests.cs b/tests/DfE.FindInformationAcademiesTrusts.UnitTests/Pages/OtherServicesLinkBuilderTests.cs index ff512157a..0a190a7be 100644 --- a/tests/DfE.FindInformationAcademiesTrusts.UnitTests/Pages/OtherServicesLinkBuilderTests.cs +++ b/tests/DfE.FindInformationAcademiesTrusts.UnitTests/Pages/OtherServicesLinkBuilderTests.cs @@ -78,4 +78,16 @@ public void FindSchoolPerformanceDataListingLink_should_be_null_if_trust_is_sing _sut.FindSchoolPerformanceDataListingLink("1234", TrustType.SingleAcademyTrust, null); result.Should().BeNull(); } + + [Theory] + [InlineData("TR02345", "https://educationgovuk.sharepoint.com/_layouts/15/sharepoint.aspx?oobRefiners=%7B%22FileType%22%3A%5B%22other%22%5D%7D&q=TR02345&v=%2Fsearch")] + [InlineData("", "https://educationgovuk.sharepoint.com/_layouts/15/sharepoint.aspx?oobRefiners=%7B%22FileType%22%3A%5B%22other%22%5D%7D&q=&v=%2Fsearch")] + public void SharepointFolderLink_should_return_url_containing_GroupId(string trn, string expected) + { + var result = + _sut.SharepointFolderLink(trn); + + result.Should() + .Be(expected); + } }