Merge pull request #2123 from Bilb/add-data-testid-editable

add data-testid to sessionIdEditable
pull/2129/head
Audric Ackermann 3 years ago committed by GitHub
commit 681eeb3b96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,10 +11,21 @@ type Props = {
onPressEnter?: any;
maxLength?: number;
isGroup?: boolean;
dataTestId?: string;
};
export const SessionIdEditable = (props: Props) => {
const { placeholder, onPressEnter, onChange, editable, text, value, maxLength, isGroup } = props;
const {
placeholder,
onPressEnter,
onChange,
editable,
text,
value,
maxLength,
isGroup,
dataTestId,
} = props;
const inputRef = useRef(null);
useFocusMount(inputRef, editable);
@ -48,6 +59,7 @@ export const SessionIdEditable = (props: Props) => {
onBlur={handleChange}
value={value || text}
maxLength={maxLength}
data-testid={dataTestId}
/>
</div>
);

@ -107,7 +107,7 @@ const Seed = (props: SeedProps) => {
<p className="session-modal__description">{i18n('recoveryPhraseSavePromptMain')}</p>
<SpacerXS />
<i data-test-id="recovery-phrase-seed-modal" className="session-modal__text-highlight">
<i data-testid="recovery-phrase-seed-modal" className="session-modal__text-highlight">
{recoveryPhrase}
</i>
</div>

@ -70,7 +70,7 @@ const SignUpSessionIDShown = (props: { continueSignUp: () => void }) => {
{window.i18n('yourUniqueSessionID')}
</div>
</Flex>
<SessionIdEditable editable={false} placeholder={undefined} />
<SessionIdEditable editable={false} placeholder={undefined} dataTestId="session-id-signup" />
<div className="session-description-long">{window.i18n('allUsersAreRandomly...')}</div>
<ContinueSignUpButton continueSignUp={props.continueSignUp} />
<TermsAndConditions />

Loading…
Cancel
Save