Skip to content

Commit 74c1eb6

Browse files
committed
Adjust css for medical info
- Rename card-with-status rules to use app- prefix - Remove unnecessary position: relative rule for app-card-with-status (the card component that gets rendered inside this component has its own position rule specified)
1 parent 49aa1f4 commit 74c1eb6

File tree

3 files changed

+6
-10
lines changed

3 files changed

+6
-10
lines changed

manage_breast_screening/assets/sass/components/_card-with-status.scss

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
@use "../vendor/nhsuk-frontend/base" as *;
22

3-
.card-with-status {
4-
position: relative;
5-
}
6-
7-
.card-with-status__tag {
3+
.app-card-with-status__tag {
84
position: absolute;
95
top: nhsuk-spacing(3);
106
right: nhsuk-spacing(3);

manage_breast_screening/mammograms/jinja2/mammograms/components/card_with_status.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
{% macro card_with_status(section, anchor, status_tag_properties, action_button_properties=None, csrf_input=None) %}
55
{% set outer_caller = caller if caller is defined else none %}
6-
<div id="{{ anchor }}" class="card-with-status">
6+
<div id="{{ anchor }}" class="app-card-with-status">
77
{% call card({
88
"heading": section.label
99
}) %}
10-
<div class="card-with-status__tag">
10+
<div class="app-card-with-status__tag">
1111
{{ tag(status_tag_properties) }}
1212
</div>
1313

manage_breast_screening/tests/system/clinical/test_reviewing_medical_information.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ def and_i_am_on_the_record_medical_information_page(self):
5050

5151
def then_section_has_to_review_tag(self, section_heading: str):
5252
card = self._medical_information_card(section_heading)
53-
expect(card.locator(".card-with-status__tag")).to_contain_text("To review")
53+
expect(card.locator(".app-card-with-status__tag")).to_contain_text("To review")
5454

5555
def when_i_mark_section_as_reviewed(self, section_heading: str):
5656
card = self._medical_information_card(section_heading)
5757
card.get_by_role("button", name="Mark as reviewed").click()
5858

5959
def then_section_has_reviewed_tag(self, section_heading: str):
6060
card = self._medical_information_card(section_heading)
61-
expect(card.locator(".card-with-status__tag")).to_contain_text("Reviewed")
61+
expect(card.locator(".app-card-with-status__tag")).to_contain_text("Reviewed")
6262

6363
def when_i_click_next_section(self, section_heading: str):
6464
card = self._medical_information_card(section_heading)
@@ -88,5 +88,5 @@ def _medical_information_sections(self):
8888
def _medical_information_card(self, heading: str):
8989
section_heading = self.page.get_by_role("heading", level=2, name=heading)
9090
return section_heading.locator(
91-
"xpath=ancestor::div[contains(@class,'card-with-status')][1]"
91+
"xpath=ancestor::div[contains(@class,'app-card-with-status')][1]"
9292
)

0 commit comments

Comments
 (0)