File tree 1 file changed +14
-5
lines changed
src/design-system/file-upload 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,20 @@ export const FileUpload = ({
48
48
alignItems = "center"
49
49
justifyContent = "center"
50
50
>
51
- < UploadIcon />
51
+ < UploadIcon data-testid = "upload-icon" />
52
52
</ Flex >
53
53
< Box w = "$fill" >
54
54
< Box >
55
55
< Box mb = "$8" >
56
- < Text . Body . Normal weight = "$medium" > { label } </ Text . Body . Normal >
56
+ < Text . Body . Normal weight = "$medium" data-testid = "file-upload-label" >
57
+ { label }
58
+ </ Text . Body . Normal >
57
59
</ Box >
58
- < Text . Body . Small color = "secondary" weight = "$medium" >
60
+ < Text . Body . Small
61
+ color = "secondary"
62
+ weight = "$medium"
63
+ data-testid = "supported-formats-label"
64
+ >
59
65
{ supportedFormats }
60
66
</ Text . Body . Small >
61
67
</ Box >
@@ -65,13 +71,16 @@ export const FileUpload = ({
65
71
{ files . map ( ( file , index ) => (
66
72
< Box key = { file } >
67
73
< Flex mb = "$8" >
68
- < Text . Body . Small weight = "$medium" > { file } </ Text . Body . Small >
74
+ < Text . Body . Small weight = "$medium" data-testid = { 'file-name' } >
75
+ { file }
76
+ </ Text . Body . Small >
69
77
< Box className = { cx . checkIconBox } ml = "$8" >
70
- < CheckFileUploadIcon />
78
+ < CheckFileUploadIcon data-testid = "check-icon" />
71
79
</ Box >
72
80
</ Flex >
73
81
< button
74
82
className = { cx . removeButtonBox }
83
+ data-testid = "remove-button"
75
84
onClick = { ( event ) : void => {
76
85
if ( onRemove ) {
77
86
event . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments