Skip to content

Commit

Permalink
Use the correct property in the test for the logic to function
Browse files Browse the repository at this point in the history
This commit modifies the logic to use the correct property of the object
to allow the test to function as expected

To Test:
- locally have a guidance listing page and an ig_guidance page
of the type Panel Guidance and an ig_guidance page of another type (eg external)
- load the guidance listing page
- confirm that there is no label 'Panel Guidance' in the panel guidance page's card
- confirm that the expected label is displayed on the card for the page that has a different type
  • Loading branch information
jkeasley committed Sep 10, 2024
1 parent 1f65e4f commit 2a57a40
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/templates/ig_guidance/_partials/guidance.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<div class="nhsuk-promo">

<a href="{{ guidance.url }}" class="nhsuk-promo__link-wrapper">

{% if guidance.guidance_type != "Panel Guidance" %}
{% if guidance.content_type.name != "Panel Guidance" %}
<span class="nhsai_resource__category">{{ guidance|guidance_type }}</span>
{% endif %}

Expand Down

0 comments on commit 2a57a40

Please sign in to comment.