Initial cut of required tags for registration and login flows.
This commit is contained in:
parent
52dccff229
commit
f7fc03cdc9
3 changed files with 17 additions and 4 deletions
|
@ -88,6 +88,7 @@ export const LoginPage: FC = () => {
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
prefix="@"
|
prefix="@"
|
||||||
suffix={`:${Config.defaultServerName()}`}
|
suffix={`:${Config.defaultServerName()}`}
|
||||||
|
data-testid="login_username"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
|
@ -96,6 +97,7 @@ export const LoginPage: FC = () => {
|
||||||
ref={passwordRef}
|
ref={passwordRef}
|
||||||
placeholder={t("Password")}
|
placeholder={t("Password")}
|
||||||
label={t("Password")}
|
label={t("Password")}
|
||||||
|
data-testid="login_password"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
{error && (
|
{error && (
|
||||||
|
@ -104,7 +106,11 @@ export const LoginPage: FC = () => {
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
)}
|
)}
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
<Button type="submit" disabled={loading}>
|
<Button
|
||||||
|
type="submit"
|
||||||
|
disabled={loading}
|
||||||
|
data-testid="login_login"
|
||||||
|
>
|
||||||
{loading ? t("Logging in…") : t("Login")}
|
{loading ? t("Logging in…") : t("Login")}
|
||||||
</Button>
|
</Button>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
|
|
|
@ -166,6 +166,7 @@ export const RegisterPage: FC = () => {
|
||||||
autoCapitalize="none"
|
autoCapitalize="none"
|
||||||
prefix="@"
|
prefix="@"
|
||||||
suffix={`:${Config.defaultServerName()}`}
|
suffix={`:${Config.defaultServerName()}`}
|
||||||
|
data-testid="register_username"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
|
@ -179,6 +180,7 @@ export const RegisterPage: FC = () => {
|
||||||
value={password}
|
value={password}
|
||||||
placeholder={t("Password")}
|
placeholder={t("Password")}
|
||||||
label={t("Password")}
|
label={t("Password")}
|
||||||
|
data-testid="register_password"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
|
@ -193,6 +195,7 @@ export const RegisterPage: FC = () => {
|
||||||
placeholder={t("Confirm password")}
|
placeholder={t("Confirm password")}
|
||||||
label={t("Confirm password")}
|
label={t("Confirm password")}
|
||||||
ref={confirmPasswordRef}
|
ref={confirmPasswordRef}
|
||||||
|
data-testid="register_confirm_password"
|
||||||
/>
|
/>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
<Caption>
|
<Caption>
|
||||||
|
@ -217,7 +220,11 @@ export const RegisterPage: FC = () => {
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
)}
|
)}
|
||||||
<FieldRow>
|
<FieldRow>
|
||||||
<Button type="submit" disabled={registering}>
|
<Button
|
||||||
|
type="submit"
|
||||||
|
disabled={registering}
|
||||||
|
data-testid="register_register"
|
||||||
|
>
|
||||||
{registering ? t("Registering…") : t("Register")}
|
{registering ? t("Registering…") : t("Register")}
|
||||||
</Button>
|
</Button>
|
||||||
</FieldRow>
|
</FieldRow>
|
||||||
|
|
|
@ -186,14 +186,14 @@ export const UnauthenticatedView: FC = () => {
|
||||||
</main>
|
</main>
|
||||||
<footer className={styles.footer}>
|
<footer className={styles.footer}>
|
||||||
<Body className={styles.mobileLoginLink}>
|
<Body className={styles.mobileLoginLink}>
|
||||||
<Link color="primary" to="/login">
|
<Link color="primary" to="/login" data-testid="home_login">
|
||||||
{t("Login to your account")}
|
{t("Login to your account")}
|
||||||
</Link>
|
</Link>
|
||||||
</Body>
|
</Body>
|
||||||
<Body>
|
<Body>
|
||||||
<Trans>
|
<Trans>
|
||||||
Not registered yet?{" "}
|
Not registered yet?{" "}
|
||||||
<Link color="primary" to="/register">
|
<Link color="primary" to="/register" data-testid="home_register">
|
||||||
Create an account
|
Create an account
|
||||||
</Link>
|
</Link>
|
||||||
</Trans>
|
</Trans>
|
||||||
|
|
Loading…
Add table
Reference in a new issue