test: write tests for user management (#1316)

* chore: add data-test attributes

* test: add github connection test, add applications modal

* test: write tests for user management
This commit is contained in:
QAComet
2023-10-26 07:12:37 -06:00
committed by GitHub
parent 86611453b5
commit 463e6908b1
17 changed files with 896 additions and 101 deletions

View File

@@ -14,6 +14,7 @@ type ConfirmationDialogProps = {
cancelButtonChildren: React.ReactNode;
confirmButtionChildren: React.ReactNode;
open?: boolean;
'data-test'?: string;
}
export default function ConfirmationDialog(props: ConfirmationDialogProps) {
@@ -26,9 +27,9 @@ export default function ConfirmationDialog(props: ConfirmationDialogProps) {
confirmButtionChildren,
open = true,
} = props;
const dataTest = props['data-test'];
return (
<Dialog open={open} onClose={onClose}>
<Dialog open={open} onClose={onClose} data-test={dataTest}>
{title && (
<DialogTitle>
{title}
@@ -44,11 +45,16 @@ export default function ConfirmationDialog(props: ConfirmationDialogProps) {
<DialogActions>
{(cancelButtonChildren && onClose) && (
<Button onClick={onClose}>{cancelButtonChildren}</Button>
<Button
onClick={onClose}
data-test="confirmation-cancel-button">{cancelButtonChildren}</Button>
)}
{(confirmButtionChildren && onConfirm) && (
<Button onClick={onConfirm} color="error">
<Button
onClick={onConfirm}
color="error"
data-test="confirmation-confirm-button">
{confirmButtionChildren}
</Button>
)}