Skip to content

Commit 7561b13

Browse files
committed
e2e tests
1 parent f94af4e commit 7561b13

2 files changed

Lines changed: 4 additions & 28 deletions

File tree

src/applications/mhv-medications/components/MedicationList/MedicationListFilter.jsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -79,32 +79,6 @@ const MedicationListFilter = ({ updateFilter, isLoading, filterCount }) => {
7979
[filterOption],
8080
);
8181

82-
// Bold the selected radio option label
83-
useEffect(
84-
() => {
85-
const boldSelectedLabel = () => {
86-
const container = document.querySelector(
87-
'[data-testid="medication-list-filter"]',
88-
);
89-
if (!container) return;
90-
const options = container.querySelectorAll('va-radio-option');
91-
options.forEach(option => {
92-
const label = option.querySelector('label');
93-
if (label) {
94-
label.style.fontWeight =
95-
option.getAttribute('value') === selectedFilterOption
96-
? 'bold'
97-
: '';
98-
}
99-
});
100-
};
101-
// Delay to allow Stencil web components to finish rendering
102-
const timer = setTimeout(boldSelectedLabel, 100);
103-
return () => clearTimeout(timer);
104-
},
105-
[selectedFilterOption],
106-
);
107-
10882
const handleFilterOptionChange = ({ detail }) => {
10983
setSelectedFilterOption(detail.value);
11084
};

src/applications/mhv-medications/sass/medications.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
@import "./prescription-details";
33
@import "./print-download";
44

5-
.medication-list-filter {
5+
.medication-list-filter-panel {
66
va-radio {
77
width: max-content;
88

@@ -11,7 +11,9 @@
1111
}
1212
}
1313

14-
14+
va-radio-option input[type="radio"]:checked + label {
15+
font-weight: bold !important;
16+
}
1517
}
1618

1719
// Side-by-side layout for filter + results on the Medication History page

0 commit comments

Comments
 (0)