Skip to content

Commit

Permalink
Merge branch 'next' into mattb/SWCD-2210-add-optional-heading-to-side…
Browse files Browse the repository at this point in the history
…-nav
  • Loading branch information
mattb-hippo authored Jul 29, 2024
2 parents e8419c2 + 9baa867 commit 0d47488
Show file tree
Hide file tree
Showing 18 changed files with 315 additions and 424 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ namespace Childrens_Social_Care_CPD_Tests.Contentful;
public class EntityResolverTests
{
[Test]
[TestCase("accordion", typeof(Accordion))]
[TestCase("accordionSection", typeof(AccordionSection))]
[TestCase("areaOfPractice", typeof(AreaOfPractice))]
[TestCase("areaOfPracticeList", typeof(AreaOfPracticeList))]
[TestCase("applicationFeature", typeof(ApplicationFeature))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ public partial class PartialsFactoryTests
{
private static readonly object[] Successful_Resolves =
{
new object[] { new Accordion(), "_Accordion" },
new object[] { new AccordionSection(), "_AccordionSection" },
new object[] { new AreaOfPractice(), "_AreaOfPractice" },
new object[] { new AreaOfPracticeList(), "_AreaOfPracticeList" },
new object[] { new AudioResource(), "_AudioResource" },
Expand Down
227 changes: 0 additions & 227 deletions Childrens-Social-Care-CPD-Tests/Controllers/FeedbackControllerTests.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ public static class Features
{
public const string ResourcesAndLearning = "resources-learning";
public const string FeedbackControl = "feedback-control";
public const string EmployerStandards = "employer-standards";
}
2 changes: 2 additions & 0 deletions Childrens-Social-Care-CPD/Contentful/EntityResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public Type Resolve(string contentTypeId)
{
return contentTypeId switch
{
"accordion" => typeof(Accordion),
"accordionSection" => typeof(AccordionSection),
"areaOfPractice" => typeof(AreaOfPractice),
"areaOfPracticeList" => typeof(AreaOfPracticeList),
"applicationFeature" => typeof(ApplicationFeature),
Expand Down
9 changes: 9 additions & 0 deletions Childrens-Social-Care-CPD/Contentful/Models/Accordion.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Contentful.Core.Models;

namespace Childrens_Social_Care_CPD.Contentful.Models;

public class Accordion : IContent
{
public string Name { get; set; }
public List<AccordionSection> Sections { get; set; }
}
11 changes: 11 additions & 0 deletions Childrens-Social-Care-CPD/Contentful/Models/AccordionSection.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using Contentful.Core.Models;

namespace Childrens_Social_Care_CPD.Contentful.Models;

public class AccordionSection : IContent
{
public string Name { get; set; }
public string Heading { get; set; }
public string SummaryLine { get; set; }
public List<IContent> Content { get; set; }
}
2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/Contentful/Models/ImageCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ public class ImageCard : IContent
{
public string Id { get; set; }
public Asset Image { get; set; }
public string ImageSide { get; set; }
public Document Text { get; set; }
public string TextPosition { get; set; }
}
2 changes: 2 additions & 0 deletions Childrens-Social-Care-CPD/Contentful/PartialsFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public static string GetPartialFor(IContent item)
{
return item switch
{
Accordion => "_Accordion",
AccordionSection => "_AccordionSection",
AreaOfPractice => "_AreaOfPractice",
AreaOfPracticeList => "_AreaOfPracticeList",
AudioResource => "_AudioResource",
Expand Down
Loading

0 comments on commit 0d47488

Please sign in to comment.