Skip to content

Commit b4c6e6e

Browse files
committed
feat(apollo,look&feel): commit concernant les retours sur aria labels dans les tests
1 parent 97746a6 commit b4c6e6e

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

client/apollo/react/src/Form/ItemFile/__tests__/ItemFile.test.tsx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,27 @@ describe("<ItemFile />", () => {
6161
expect(container.querySelector("svg")).toHaveClass("af-icon__success");
6262
});
6363

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+
6485
it("shouldn't have an accessibility violation", async () => {
6586
const { container } = render(
6687
<ItemFile

client/apollo/react/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ export { InputDate } from "./Form/InputDate/InputDateApollo";
3434
export { ItemLabel } from "./Form/ItemLabel/ItemLabelApollo";
3535
export { ItemMessage } from "./Form/ItemMessage/ItemMessageApollo";
3636
export { ItemFile, itemFileVariants } from "./Form/ItemFile/ItemFileApollo";
37-
export { Dropdown } from "./Form/Dropdown/DropdownApollo";
3837
export { TextArea } from "./Form/TextArea/TextAreaApollo";
3938
export { Radio } from "./Form/Radio/Radio/RadioApollo";
4039
export { CardRadio } from "./Form/Radio/CardRadio/CardRadioApollo";

0 commit comments

Comments
 (0)