test: add page title test ids to await and await mounting loader components
This commit is contained in:
@@ -44,8 +44,8 @@ export default function CreateRole(): React.ReactElement {
|
||||
enqueueSnackbar(formatMessage('createRole.successfullyCreated'), {
|
||||
variant: 'success',
|
||||
SnackbarProps: {
|
||||
'data-test': 'snackbar-create-role-success'
|
||||
}
|
||||
'data-test': 'snackbar-create-role-success',
|
||||
},
|
||||
});
|
||||
|
||||
navigate(URLS.ROLES);
|
||||
@@ -58,7 +58,9 @@ export default function CreateRole(): React.ReactElement {
|
||||
<Container sx={{ py: 3, display: 'flex', justifyContent: 'center' }}>
|
||||
<Grid container item xs={12} sm={10} md={9}>
|
||||
<Grid item xs={12} sx={{ mb: [2, 5] }}>
|
||||
<PageTitle>{formatMessage('createRolePage.title')}</PageTitle>
|
||||
<PageTitle data-test="create-role-title">
|
||||
{formatMessage('createRolePage.title')}
|
||||
</PageTitle>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} justifyContent="flex-end" sx={{ pt: 5 }}>
|
||||
|
@@ -50,7 +50,7 @@ export default function CreateUser(): React.ReactElement {
|
||||
persist: true,
|
||||
SnackbarProps: {
|
||||
'data-test': 'snackbar-create-user-success',
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
navigate(URLS.USERS);
|
||||
@@ -63,7 +63,9 @@ export default function CreateUser(): React.ReactElement {
|
||||
<Container sx={{ py: 3, display: 'flex', justifyContent: 'center' }}>
|
||||
<Grid container item xs={12} sm={10} md={9}>
|
||||
<Grid item xs={12} sx={{ mb: [2, 5] }}>
|
||||
<PageTitle>{formatMessage('createUserPage.title')}</PageTitle>
|
||||
<PageTitle data-test="create-user-title">
|
||||
{formatMessage('createUserPage.title')}
|
||||
</PageTitle>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} justifyContent="flex-end" sx={{ pt: 5 }}>
|
||||
|
@@ -54,8 +54,8 @@ export default function EditRole(): React.ReactElement {
|
||||
enqueueSnackbar(formatMessage('editRole.successfullyUpdated'), {
|
||||
variant: 'success',
|
||||
SnackbarProps: {
|
||||
'data-test': 'snackbar-edit-role-success'
|
||||
}
|
||||
'data-test': 'snackbar-edit-role-success',
|
||||
},
|
||||
});
|
||||
|
||||
navigate(URLS.ROLES);
|
||||
@@ -70,7 +70,9 @@ export default function EditRole(): React.ReactElement {
|
||||
<Container sx={{ py: 3, display: 'flex', justifyContent: 'center' }}>
|
||||
<Grid container item xs={12} sm={10} md={9}>
|
||||
<Grid item xs={12} sx={{ mb: [2, 5] }}>
|
||||
<PageTitle>{formatMessage('editRolePage.title')}</PageTitle>
|
||||
<PageTitle data-test="edit-role-title">
|
||||
{formatMessage('editRolePage.title')}
|
||||
</PageTitle>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} justifyContent="flex-end" sx={{ pt: 5 }}>
|
||||
|
@@ -57,8 +57,8 @@ export default function EditUser(): React.ReactElement {
|
||||
variant: 'success',
|
||||
SnackbarProps: {
|
||||
'data-test': 'snackbar-edit-user-success',
|
||||
persist: true
|
||||
}
|
||||
persist: true,
|
||||
},
|
||||
});
|
||||
|
||||
navigate(URLS.USERS);
|
||||
@@ -71,7 +71,9 @@ export default function EditUser(): React.ReactElement {
|
||||
<Container sx={{ py: 3, display: 'flex', justifyContent: 'center' }}>
|
||||
<Grid container item xs={12} sm={10} md={9}>
|
||||
<Grid item xs={12} sx={{ mb: [2, 5] }}>
|
||||
<PageTitle>{formatMessage('editUserPage.title')}</PageTitle>
|
||||
<PageTitle data-test="edit-user-title">
|
||||
{formatMessage('editUserPage.title')}
|
||||
</PageTitle>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} justifyContent="flex-end" sx={{ pt: 5 }}>
|
||||
|
@@ -18,16 +18,12 @@ function RolesPage() {
|
||||
<Grid container item xs={12} sm={10} md={9}>
|
||||
<Grid container sx={{ mb: [0, 3] }} columnSpacing={1.5} rowSpacing={3}>
|
||||
<Grid container item xs sm alignItems="center">
|
||||
<PageTitle>{formatMessage('rolesPage.title')}</PageTitle>
|
||||
<PageTitle data-test="roles-page-title">
|
||||
{formatMessage('rolesPage.title')}
|
||||
</PageTitle>
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
container
|
||||
item
|
||||
xs="auto"
|
||||
sm="auto"
|
||||
alignItems="center"
|
||||
>
|
||||
<Grid container item xs="auto" sm="auto" alignItems="center">
|
||||
<ConditionalIconButton
|
||||
type="submit"
|
||||
variant="contained"
|
||||
|
@@ -18,16 +18,12 @@ function UsersPage() {
|
||||
<Grid container item xs={12} sm={10} md={9}>
|
||||
<Grid container sx={{ mb: [0, 3] }} columnSpacing={1.5} rowSpacing={3}>
|
||||
<Grid container item xs sm alignItems="center">
|
||||
<PageTitle>{formatMessage('usersPage.title')}</PageTitle>
|
||||
<PageTitle data-test="users-page-title">
|
||||
{formatMessage('usersPage.title')}
|
||||
</PageTitle>
|
||||
</Grid>
|
||||
|
||||
<Grid
|
||||
container
|
||||
item
|
||||
xs="auto"
|
||||
sm="auto"
|
||||
alignItems="center"
|
||||
>
|
||||
<Grid container item xs="auto" sm="auto" alignItems="center">
|
||||
<ConditionalIconButton
|
||||
type="submit"
|
||||
variant="contained"
|
||||
|
Reference in New Issue
Block a user