Просмотр исходного кода

Add data-testid

- Add data-testid for page comment button and open comment editor button
Mudana-Grune 3 лет назад
Родитель
Сommit
448a29a405

+ 1 - 0
packages/app/src/components/PageComment/CommentEditor.tsx

@@ -230,6 +230,7 @@ export const CommentEditor = (props: CommentEditorProps): JSX.Element => {
             type="button"
             type="button"
             className="btn btn-lg btn-link"
             className="btn btn-lg btn-link"
             onClick={() => setIsReadyToUse(true)}
             onClick={() => setIsReadyToUse(true)}
+            data-testid="openCommentEditorButton"
           >
           >
             <i className="icon-bubble"></i> Add Comment
             <i className="icon-bubble"></i> Add Comment
           </button>
           </button>

+ 1 - 0
packages/app/src/components/PageSideContents.tsx

@@ -60,6 +60,7 @@ export const PageSideContents = (props: PageSideContentsProps): JSX.Element => {
             <button
             <button
               type="button"
               type="button"
               className="btn btn-block btn-outline-secondary grw-btn-page-accessories rounded-pill d-flex justify-content-between align-items-center"
               className="btn btn-block btn-outline-secondary grw-btn-page-accessories rounded-pill d-flex justify-content-between align-items-center"
+              data-testid="openCommentEditorButton"
             >
             >
               <i className="icon-fw icon-bubbles grw-page-accessories-control-icon"></i>
               <i className="icon-fw icon-bubbles grw-page-accessories-control-icon"></i>
               <span>Comments</span>
               <span>Comments</span>