chore: add missing accessibilityIds for menu buttons/radio

pull/2971/head
Audric Ackermann 2 years ago
parent 9cc37cc0e7
commit f796c59cef

@ -27,7 +27,7 @@
transform: translateX(100%); transform: translateX(100%);
will-change: transform; will-change: transform;
width: 25vw; width: 25vw;
min-width: 300px; // because the disappear messages don't render will with less than this, and 25% can be less than that min-width: 300px; // because the disappear messages don't render well with less than this, and 25vw can be less than that
z-index: 5; z-index: 5;
background-color: var(--background-primary-color); background-color: var(--background-primary-color);

@ -100,7 +100,7 @@ export type PanelButtonProps = {
disabled?: boolean; disabled?: boolean;
children: ReactNode; children: ReactNode;
onClick: (...args: Array<any>) => void; onClick: (...args: Array<any>) => void;
dataTestId?: string; dataTestId: string;
style?: CSSProperties; style?: CSSProperties;
}; };

@ -281,7 +281,7 @@ export const OverlayRightPanelSettings = () => {
</div> </div>
<SpacerLG /> <SpacerLG />
</> </>
)}{' '} )}
<PanelButtonGroup> <PanelButtonGroup>
{showUpdateGroupNameButton && ( {showUpdateGroupNameButton && (
<PanelIconButton <PanelIconButton
@ -290,6 +290,7 @@ export const OverlayRightPanelSettings = () => {
}} }}
text={isPublic ? window.i18n('editGroup') : window.i18n('editGroupName')} text={isPublic ? window.i18n('editGroup') : window.i18n('editGroupName')}
iconType={null} iconType={null}
dataTestId="edit-group"
/> />
)} )}
{showAddRemoveModeratorsButton && ( {showAddRemoveModeratorsButton && (
@ -300,6 +301,7 @@ export const OverlayRightPanelSettings = () => {
showAddModeratorsByConvoId(selectedConvoKey); showAddModeratorsByConvoId(selectedConvoKey);
}} }}
text={window.i18n('addModerators')} text={window.i18n('addModerators')}
dataTestId="add-moderators"
/> />
<PanelIconButton <PanelIconButton
iconType={null} iconType={null}
@ -307,6 +309,7 @@ export const OverlayRightPanelSettings = () => {
showRemoveModeratorsByConvoId(selectedConvoKey); showRemoveModeratorsByConvoId(selectedConvoKey);
}} }}
text={window.i18n('removeModerators')} text={window.i18n('removeModerators')}
dataTestId="remove-moderators"
/> />
</> </>
)} )}
@ -318,6 +321,7 @@ export const OverlayRightPanelSettings = () => {
void showUpdateGroupMembersByConvoId(selectedConvoKey); void showUpdateGroupMembersByConvoId(selectedConvoKey);
}} }}
text={window.i18n('groupMembers')} text={window.i18n('groupMembers')}
dataTestId="group-members"
/> />
)} )}
@ -325,6 +329,7 @@ export const OverlayRightPanelSettings = () => {
<PanelIconButton <PanelIconButton
iconType={'timer50'} iconType={'timer50'}
text={window.i18n('disappearingMessages')} text={window.i18n('disappearingMessages')}
dataTestId="disappearing-messages"
onClick={() => { onClick={() => {
dispatch(setRightOverlayMode('disappearing-messages')); dispatch(setRightOverlayMode('disappearing-messages'));
}} }}

@ -34,7 +34,7 @@ export const TimeOptions = (props: TimerOptionsProps) => {
setSelected(option.value); setSelected(option.value);
}} }}
disabled={disabled} disabled={disabled}
dataTestId={`disappear-time-${option.value}-option`} dataTestId={option.name.replace(' ', '-')} // we want just "1-minute", etc as accessibility id
/> />
); );
})} })}

Loading…
Cancel
Save