Skip to content

Commit a298999

Browse files
Added test id for menu (#1024)
* Added test id for menu * Fix code refactor * Replaced with regex * Removed unwated props passing * Added hyphenate --------- Co-authored-by: bot-bigbinary <[email protected]>
1 parent 8a246b8 commit a298999

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/components/Editor/Menu/Headless/Option/Emoji.jsx

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const Emoji = ({ editor, isActive, setActive, tooltipContent }) => (
1717
delay: [500],
1818
position: "bottom",
1919
},
20+
"data-cy": "ne-emoji-picker",
2021
}}
2122
onClick={() => setActive(active => !active)}
2223
onClose={() => setActive(false)}

src/components/Editor/Menu/Headless/Option/index.jsx

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import React from "react";
22

3+
import { hyphenate } from "neetocist";
4+
35
import { EDITOR_OPTIONS } from "common/constants";
46

57
import Emoji from "./Emoji";
@@ -28,6 +30,7 @@ const Option = ({
2830
<Button
2931
className={isActive ? "ne-headless-btn--active" : ""}
3032
{...{ disabled }}
33+
data-cy={hyphenate(optionName)}
3134
icon={Icon}
3235
tooltipProps={{
3336
content: tooltip,

0 commit comments

Comments
 (0)