Skip to content

Commit

Permalink
Improve Code Coverage in src/screens/OrganizationPeople/OrganizationP…
Browse files Browse the repository at this point in the history
…eople.tsx (#3133)

* chore: test coverage increase to 100% in organizationpeople component

* unused before each hook removed

* removed testing console logs

* Use consistent translation function for error handling
  • Loading branch information
abbi4code authored Jan 4, 2025
1 parent 5550711 commit 1f2379b
Show file tree
Hide file tree
Showing 3 changed files with 737 additions and 16 deletions.
12 changes: 6 additions & 6 deletions src/screens/OrganizationPeople/AddMember.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,7 @@ function AddMember(): JSX.Element {
orgId: currentUrl,
});
} catch (error: unknown) {
if (error instanceof Error) {
toast.error(error.message);
console.log(error.message);
}
errorHandler(tCommon, error);
}
};

Expand Down Expand Up @@ -388,7 +385,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 +440,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

0 comments on commit 1f2379b

Please sign in to comment.