Skip to content

Commit b9a817c

Browse files
committed
Merge remote-tracking branch 'origin/main' into storybook-components-tests
2 parents 40199d3 + 01c1cf4 commit b9a817c

17 files changed

Lines changed: 4408 additions & 9 deletions

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

Lines changed: 714 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 647 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 720 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 731 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 865 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 710 additions & 0 deletions
Large diffs are not rendered by default.

packages/smart-forms-renderer/src/components/FormComponents/BooleanItem/BooleanField.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ const BooleanField = memo(function BooleanField(props: BooleanFieldProps) {
114114
alignItems="center"
115115
sx={inputsFlexGrow ? { width: '100%', flexWrap: 'nowrap' } : {}}>
116116
<RadioGroup
117+
data-linkid={qItem.linkId}
118+
data-label={qItem.text}
117119
id={qItem.type + '-' + qItem.linkId}
118120
aria-labelledby={
119121
instructionsId ? `label-${qItem.linkId} ${instructionsId}` : `label-${qItem.linkId}`

packages/smart-forms-renderer/src/components/FormComponents/ChoiceItems/ChoiceRadioSingle.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@ import { StandardRadio } from '../../Radio.styles';
2222

2323
interface ChoiceRadioSingleProps {
2424
value: string;
25-
label: React.ReactNode;
25+
label: string;
26+
styledLabel?: React.ReactNode;
2627
readOnly: boolean;
2728
disabledViaToggleExpression: boolean;
2829
fullWidth: boolean;
2930
}
3031

3132
function ChoiceRadioSingle(props: ChoiceRadioSingleProps) {
32-
const { value, label, readOnly, disabledViaToggleExpression, fullWidth } = props;
33+
const { value, styledLabel, label, readOnly, disabledViaToggleExpression, fullWidth } = props;
3334

3435
const readOnlyVisualStyle = useRendererConfigStore.use.readOnlyVisualStyle();
3536

@@ -55,7 +56,7 @@ function ChoiceRadioSingle(props: ChoiceRadioSingleProps) {
5556
control={
5657
<StandardRadio data-test={`radio-single-${label}`} size="small" readOnly={isHtmlReadOnly} />
5758
}
58-
label={label}
59+
label={styledLabel ?? label}
5960
/>
6061
);
6162
}

packages/smart-forms-renderer/src/components/FormComponents/DateTimeItems/CustomDateItem/CustomDateField.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ function CustomDateField(props: CustomDateFieldProps) {
8686
<StandardTextField
8787
{...(!isTabled && { id: id })}
8888
data-test={'date'}
89+
data-linkid={linkId}
90+
data-label={itemText}
8991
ref={anchorRef}
9092
fullWidth
9193
textFieldWidth={textFieldWidth}

packages/smart-forms-renderer/src/components/FormComponents/GridGroup/GridTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function GridTable(props: GridTableProps) {
103103
}
104104

105105
return (
106-
<TableRow key={qItem.linkId}>
106+
<TableRow key={qItem.linkId} data-linkid={qItem.linkId} data-label={qItem.text}>
107107
<GridRow
108108
qItem={qItem}
109109
qrItem={qrItem ?? null}

0 commit comments

Comments
 (0)