File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,27 @@ describe("<ItemFile />", () => {
61
61
expect ( container . querySelector ( "svg" ) ) . toHaveClass ( "af-icon__success" ) ;
62
62
} ) ;
63
63
64
+ it ( "renders the component with success with default aria-label and filename" , ( ) => {
65
+ const currentFileName = "ItemFile.test.tsx" ;
66
+ const { container } = render (
67
+ < ItemFile
68
+ title = "IMG_879687880"
69
+ subTitle = "0.12"
70
+ state = { itemFileVariants . success }
71
+ filename = { currentFileName }
72
+ /> ,
73
+ ) ;
74
+ const itemFileVisibility = screen . getAllByRole ( "button" , {
75
+ name : `Observer le fichier ${ currentFileName } ` ,
76
+ } ) ;
77
+ const itemFileDelete = screen . getAllByRole ( "button" , {
78
+ name : `Suppression du fichier ${ currentFileName } ` ,
79
+ } ) ;
80
+ expect ( itemFileVisibility [ 0 ] ) . toBeInTheDocument ( ) ;
81
+ expect ( itemFileDelete [ 0 ] ) . toBeInTheDocument ( ) ;
82
+ expect ( container . querySelector ( "svg" ) ) . toHaveClass ( "af-icon__success" ) ;
83
+ } ) ;
84
+
64
85
it ( "shouldn't have an accessibility violation" , async ( ) => {
65
86
const { container } = render (
66
87
< ItemFile
Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ export { InputDate } from "./Form/InputDate/InputDateApollo";
34
34
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo" ;
35
35
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo" ;
36
36
export { ItemFile , itemFileVariants } from "./Form/ItemFile/ItemFileApollo" ;
37
- export { Dropdown } from "./Form/Dropdown/DropdownApollo" ;
38
37
export { TextArea } from "./Form/TextArea/TextAreaApollo" ;
39
38
export { Radio } from "./Form/Radio/Radio/RadioApollo" ;
40
39
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioApollo" ;
You can’t perform that action at this time.
0 commit comments