diff --git a/src/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js b/src/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js index 1d631f5713..d8becda3a4 100644 --- a/src/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js +++ b/src/elements/content-sidebar/activity-feed/annotations/AnnotationActivity.js @@ -123,6 +123,7 @@ const AnnotationActivity = ({ : { ...linkMessage, values: { number: linkValue } }; const tetherProps = { attachment: 'top right', + className: 'bcs-AnnotationActivity-deleteConfirmationModal', constraints: [{ to: 'scrollParent', attachment: 'together' }], targetAttachment: 'bottom right', }; @@ -227,7 +228,7 @@ const AnnotationActivity = ({ )} renderElement={ref => { return isConfirmingDelete ? ( -
+
{ + const item = { + ...mockAnnotation, + permissions: { can_delete: true }, + }; + + const wrapper = getWrapper({ item }); + + const tetherComponent = wrapper.find(TetherComponent); + expect(tetherComponent.exists()).toBe(true); + // Find the TetherComponent that has the delete confirmation modal className + const modalTetherComponent = tetherComponent.findWhere( + node => node.prop('className') === 'bcs-AnnotationActivity-deleteConfirmationModal', + ); + expect(modalTetherComponent.exists()).toBe(true); + expect(modalTetherComponent.prop('className')).toBe('bcs-AnnotationActivity-deleteConfirmationModal'); + }); }); describe('SelectableActivityCard', () => {