mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
fix: add testIds for hosted auth
This commit is contained in:
parent
191423ff7b
commit
59a8385322
@ -10,8 +10,9 @@ import AuthOptions from '../common/AuthOptions/AuthOptions';
|
|||||||
import DividerText from '../../common/DividerText/DividerText';
|
import DividerText from '../../common/DividerText/DividerText';
|
||||||
import ConditionallyRender from '../../common/ConditionallyRender';
|
import ConditionallyRender from '../../common/ConditionallyRender';
|
||||||
import PasswordField from '../../common/PasswordField/PasswordField';
|
import PasswordField from '../../common/PasswordField/PasswordField';
|
||||||
import { useAuthApi } from "../../../hooks/api/actions/useAuthApi/useAuthApi";
|
import { useAuthApi } from '../../../hooks/api/actions/useAuthApi/useAuthApi';
|
||||||
import { useAuthUser } from '../../../hooks/api/getters/useAuth/useAuthUser';
|
import { useAuthUser } from '../../../hooks/api/getters/useAuth/useAuthUser';
|
||||||
|
import { LOGIN_EMAIL_ID, LOGIN_PASSWORD_ID } from '../../../testIds';
|
||||||
|
|
||||||
const HostedAuth = ({ authDetails }) => {
|
const HostedAuth = ({ authDetails }) => {
|
||||||
const commonStyles = useCommonStyles();
|
const commonStyles = useCommonStyles();
|
||||||
@ -19,7 +20,7 @@ const HostedAuth = ({ authDetails }) => {
|
|||||||
const { refetchUser } = useAuthUser();
|
const { refetchUser } = useAuthUser();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const params = useQueryParams();
|
const params = useQueryParams();
|
||||||
const { passwordAuth } = useAuthApi()
|
const { passwordAuth } = useAuthApi();
|
||||||
const [username, setUsername] = useState(params.get('email') || '');
|
const [username, setUsername] = useState(params.get('email') || '');
|
||||||
const [password, setPassword] = useState('');
|
const [password, setPassword] = useState('');
|
||||||
const [errors, setErrors] = useState({
|
const [errors, setErrors] = useState({
|
||||||
@ -108,6 +109,7 @@ const HostedAuth = ({ authDetails }) => {
|
|||||||
helperText={usernameError}
|
helperText={usernameError}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
size="small"
|
size="small"
|
||||||
|
data-test={LOGIN_EMAIL_ID}
|
||||||
/>
|
/>
|
||||||
<PasswordField
|
<PasswordField
|
||||||
label="Password"
|
label="Password"
|
||||||
@ -116,6 +118,7 @@ const HostedAuth = ({ authDetails }) => {
|
|||||||
value={password}
|
value={password}
|
||||||
error={!!passwordError}
|
error={!!passwordError}
|
||||||
helperText={passwordError}
|
helperText={passwordError}
|
||||||
|
data-test={LOGIN_PASSWORD_ID}
|
||||||
/>
|
/>
|
||||||
<Grid container>
|
<Grid container>
|
||||||
<Button
|
<Button
|
||||||
|
Loading…
Reference in New Issue
Block a user