test: add applications settings tests
This commit is contained in:
@@ -49,6 +49,7 @@ function AdminApplicationAuthClientDialog(props) {
|
||||
) : (
|
||||
<DialogContentText tabIndex={-1} component="div">
|
||||
<Form
|
||||
data-test="auth-client-form"
|
||||
onSubmit={submitHandler}
|
||||
defaultValues={defaultValues}
|
||||
render={({ formState: { isDirty } }) => (
|
||||
@@ -67,6 +68,7 @@ function AdminApplicationAuthClientDialog(props) {
|
||||
<InputCreator key={field.key} schema={field} />
|
||||
))}
|
||||
<LoadingButton
|
||||
data-test="submit-auth-client-form"
|
||||
type="submit"
|
||||
variant="contained"
|
||||
color="primary"
|
||||
|
@@ -43,7 +43,7 @@ function AdminApplicationAuthClients(props) {
|
||||
return (
|
||||
<div>
|
||||
{sortedAuthClients.map((client) => (
|
||||
<Card sx={{ mb: 1 }} key={client.id}>
|
||||
<Card sx={{ mb: 1 }} key={client.id} data-test="auth-client">
|
||||
<CardActionArea
|
||||
component={Link}
|
||||
to={URLS.ADMIN_APP_AUTH_CLIENT(appKey, client.id)}
|
||||
@@ -70,7 +70,7 @@ function AdminApplicationAuthClients(props) {
|
||||
))}
|
||||
<Stack justifyContent="flex-end" direction="row">
|
||||
<Link to={URLS.ADMIN_APP_AUTH_CLIENTS_CREATE(appKey)}>
|
||||
<Button variant="contained" sx={{ mt: 2 }} component="div">
|
||||
<Button variant="contained" sx={{ mt: 2 }} component="div" data-test="create-auth-client-button">
|
||||
{formatMessage('createAuthClient.button')}
|
||||
</Button>
|
||||
</Link>
|
||||
|
@@ -87,6 +87,7 @@ function AdminApplicationSettings(props) {
|
||||
</Stack>
|
||||
<Stack>
|
||||
<LoadingButton
|
||||
data-test="submit-button"
|
||||
type="submit"
|
||||
variant="contained"
|
||||
color="primary"
|
||||
|
@@ -21,7 +21,7 @@ function NoResultFound(props) {
|
||||
);
|
||||
|
||||
return (
|
||||
<Card elevation={0}>
|
||||
<Card elevation={0} data-test="no-results">
|
||||
<CardActionArea component={ActionAreaLink} {...props}>
|
||||
<CardContent>
|
||||
{!!to && <AddCircleIcon color="primary" />}
|
||||
|
@@ -42,6 +42,7 @@ function Switch(props) {
|
||||
{...FormControlLabelProps}
|
||||
control={
|
||||
<MuiSwitch
|
||||
data-test="switch"
|
||||
{...switchProps}
|
||||
{...field}
|
||||
checked={value}
|
||||
|
Reference in New Issue
Block a user