Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Code Coverage in src/screens/OrganizationPeople/OrganizationPeople.tsx #3133

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/screens/OrganizationPeople/AddMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import type {
} from 'utils/interfaces';
import styles from '../../style/app.module.css';
import Avatar from 'components/Avatar/Avatar';
import { t } from 'i18next';
abbi4code marked this conversation as resolved.
Show resolved Hide resolved

const StyledTableCell = styled(TableCell)(() => ({
[`&.${tableCellClasses.head}`]: {
Expand Down Expand Up @@ -110,10 +111,7 @@ function AddMember(): JSX.Element {
orgId: currentUrl,
});
} catch (error: unknown) {
if (error instanceof Error) {
toast.error(error.message);
console.log(error.message);
}
errorHandler(t, error);
abbi4code marked this conversation as resolved.
Show resolved Hide resolved
}
};

Expand Down Expand Up @@ -388,7 +386,7 @@ function AddMember(): JSX.Element {
>
{userDetails.user.image ? (
<img
src={userDetails.user.image ?? undefined}
src={userDetails.user.image}
alt="avatar"
className={styles.TableImage}
/>
Expand Down Expand Up @@ -443,7 +441,10 @@ function AddMember(): JSX.Element {
show={createNewUserModalisOpen}
onHide={toggleCreateNewUserModal}
>
<Modal.Header className={styles.createUserModalHeader}>
<Modal.Header
className={styles.createUserModalHeader}
data-testid="createUser"
>
<Modal.Title>Create User</Modal.Title>
</Modal.Header>
<Modal.Body>
Expand Down
Loading
Loading