Skip to content

Commit 59535ff

Browse files
Fix broken tests
1 parent eb71a02 commit 59535ff

7 files changed

Lines changed: 10 additions & 9 deletions

apps/smart-forms-app/src/test/aboriginalFormCalculation.test.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import {
88
selectTab,
99
getInputText,
1010
inputDecimal,
11-
getVisibleTab
11+
getVisibleTab,
12+
checkRadioOption
1213
} from './testUtils.ts';
1314
import { AboriginalForm } from './aboriginalFormUtils.tsx';
1415

@@ -110,7 +111,7 @@ describe('New result calculation field', () => {
110111
const dateFieldValueBefore = await getInputText(container, 'obs-heartrhythm-newdate');
111112
expect(dateFieldValueBefore).toBe('');
112113

113-
await chooseSelectOption(container, 'obs-heartrhythm-newresult', 'Regular heart rhythm');
114+
await checkRadioOption(container, 'obs-heartrhythm-newresult', 'Regular heart rhythm');
114115

115116
const dateFieldValueAfter = await getInputText(container, 'obs-heartrhythm-newdate');
116117
const today = new Date();
@@ -127,7 +128,7 @@ describe('New result calculation field', () => {
127128
const dateFieldValueBefore = await getInputText(container, 'obs-heartrhythm-newdate');
128129
expect(dateFieldValueBefore).toBe('');
129130

130-
await chooseSelectOption(container, 'obs-heartrhythm-newresult', 'Irregular heart rhythm');
131+
await checkRadioOption(container, 'obs-heartrhythm-newresult', 'Irregular heart rhythm');
131132

132133
const dateFieldValueAfter = await getInputText(container, 'obs-heartrhythm-newdate');
133134
const today = new Date();

apps/smart-forms-app/src/test/aboriginalFormCompletedFor0To1Years.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ test('Completed questionnaire for 0 years', async () => {
128128
'Aboriginal and/or Torres Strait Islander Health Worker / Health Practitioner',
129129
'practitioner Doe'
130130
);
131-
await chooseSelectOption(container, 'Location of health check', 'Clinic');
131+
await checkRadioOption(container, 'Location of health check', 'Clinic');
132132

133133
//Current priorities
134134
await selectTab(container, 'Current health/patient priorities');

apps/smart-forms-app/src/test/aboriginalFormCompletedFor12To6Years.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ test('Completed questionnaire for 12 years', async () => {
127127
'Aboriginal and/or Torres Strait Islander Health Worker / Health Practitioner',
128128
'practitioner Doe'
129129
);
130-
await chooseSelectOption(container, 'Location of health check', 'Clinic');
130+
await checkRadioOption(container, 'Location of health check', 'Clinic');
131131

132132
//Current priorities
133133
await selectTab(container, 'Current health/patient priorities');

apps/smart-forms-app/src/test/aboriginalFormCompletedFor24To13Years.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ test('Completed questionnaire for 13 years', async () => {
135135
'Aboriginal and/or Torres Strait Islander Health Worker / Health Practitioner',
136136
'practitioner Doe'
137137
);
138-
await chooseSelectOption(container, 'Location of health check', 'Clinic');
138+
await checkRadioOption(container, 'Location of health check', 'Clinic');
139139

140140
//Current priorities
141141
await selectTab(container, 'Current health/patient priorities');

apps/smart-forms-app/src/test/aboriginalFormCompletedFor49To25Years.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ test('Completed questionnaire for 49 years', async () => {
128128
'Aboriginal and/or Torres Strait Islander Health Worker / Health Practitioner',
129129
'practitioner Doe'
130130
);
131-
await chooseSelectOption(container, 'Location of health check', 'Clinic');
131+
await checkRadioOption(container, 'Location of health check', 'Clinic');
132132

133133
//Current priorities
134134
await selectTab(container, 'Current health/patient priorities');

apps/smart-forms-app/src/test/aboriginalFormCompletedFor51Years.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ test('Completed questionnaire for 51 years', async () => {
150150
'Aboriginal and/or Torres Strait Islander Health Worker / Health Practitioner',
151151
'practitioner Doe'
152152
);
153-
await chooseSelectOption(container, 'Location of health check', 'Clinic');
153+
await checkRadioOption(container, 'Location of health check', 'Clinic');
154154

155155
//Current priorities
156156
await selectTab(container, 'Current health/patient priorities');

apps/smart-forms-app/src/test/aboriginalFormCompletedFor5To1Years.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ test('Completed questionnaire for 5 years', async () => {
128128
'Aboriginal and/or Torres Strait Islander Health Worker / Health Practitioner',
129129
'practitioner Doe'
130130
);
131-
await chooseSelectOption(container, 'Location of health check', 'Clinic');
131+
await checkRadioOption(container, 'Location of health check', 'Clinic');
132132

133133
//Current priorities
134134
await selectTab(container, 'Current health/patient priorities');

0 commit comments

Comments
 (0)