Skip to content

Commit

Permalink
chore: match datatestid with figma
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilb committed Oct 30, 2024
1 parent 0dd0869 commit d958543
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
14 changes: 10 additions & 4 deletions ts/components/MemberListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import styled from 'styled-components';

import { GroupPubkeyType, PubkeyType } from 'libsession_util_nodejs';
import { isEmpty } from 'lodash';
import { useNicknameOrProfileNameOrShortenedPubkey } from '../hooks/useParamSelector';
import { promoteUsersInGroup } from '../interactions/conversationInteractions';
import { PubKey } from '../session/types';
Expand Down Expand Up @@ -35,7 +36,6 @@ import {
MetaGroupWrapperActions,
UserGroupsWrapperActions,
} from '../webworker/workers/browser/libsession_worker_interface';
import { isEmpty } from 'lodash';

const AvatarContainer = styled.div`
position: relative;
Expand Down Expand Up @@ -191,7 +191,7 @@ const GroupStatusText = ({ groupPk, pubkey }: { pubkey: PubkeyType; groupPk: Gro
}
return (
<StyledGroupStatusText
data-testid={'group-member-status-text'}
data-testid={'contact-status'}
isFailure={
(groupPromotionFailed && !groupPromotionSending) ||
(groupInviteFailed && !groupInviteSending)
Expand Down Expand Up @@ -353,7 +353,7 @@ export const MemberListItem = ({
margin="0 var(--margins-md)"
alignItems="flex-start"
>
<StyledName data-testid={'group-member-name'} maxName={maxNameWidth}>
<StyledName data-testid={'contact'} maxName={maxNameWidth}>
{ourName || memberName}
</StyledName>
<GroupStatusContainer
Expand All @@ -368,7 +368,13 @@ export const MemberListItem = ({

{!inMentions && !hideRadioButton && (
<StyledCheckContainer>
<SessionRadio active={isSelected} value={pubkey} inputName={pubkey} label="" />
<SessionRadio
active={isSelected}
value={pubkey}
inputName={pubkey}
label=""
inputDataTestId="select-contact"
/>
</StyledCheckContainer>
)}
</StyledSessionMemberItem>
Expand Down
2 changes: 1 addition & 1 deletion ts/components/NoticeBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const StyledGroupInviteBanner = styled(Flex)`

export const GroupInviteRequiredVersionBanner = () => {
return (
<StyledGroupInviteBanner data-testid="invite-warning">
<StyledGroupInviteBanner data-testid="version-warning">
{window.i18n('groupInviteVersion')}
</StyledGroupInviteBanner>
);
Expand Down
2 changes: 1 addition & 1 deletion ts/components/dialog/InviteContactsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
useIsPrivate,
useIsPublic,
useSortedGroupMembers,
useZombies
useZombies,
} from '../../hooks/useParamSelector';
import { useSet } from '../../hooks/useSet';
import { ClosedGroup } from '../../session/group/closed-group';
Expand Down
2 changes: 1 addition & 1 deletion ts/components/dialog/OpenUrlModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function OpenUrlModal(props: OpenUrlModalState) {
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={onClickOpen}
dataTestId="session-confirm-ok-button"
dataTestId="open-url-confirm-button"
/>
<SessionButton
text={window.i18n('urlCopy')}
Expand Down
5 changes: 5 additions & 0 deletions ts/react.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ declare module 'react' {
// to sort
| 'restore-using-recovery'
| 'link-device'
| 'select-contact'
| 'contact' // this is way too generic
| 'contact-status'
| 'version-warning'
| 'open-url-confirm-button'
| 'continue-session-button'
| 'next-new-conversation-button'
| 'reveal-recovery-phrase'
Expand Down

0 comments on commit d958543

Please sign in to comment.