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

Code Coverage #3523

Closed
Show file tree
Hide file tree
Changes from all commits
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
25 changes: 1 addition & 24 deletions docs/docs/auto-docs/screens/OrgList/OrgList/functions/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,7 @@

> **default**(): `JSX.Element`

Defined in: [src/screens/OrgList/OrgList.tsx:56](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrgList.tsx#L56)

## CSS Strategy Explanation:

To ensure consistency across the application and reduce duplication, common styles
(such as button styles) have been moved to the global CSS file. Instead of using
component-specific classes (e.g., `.greenregbtnOrganizationFundCampaign`, `.greenregbtnPledge`), a single reusable
class (e.g., .addButton) is now applied.

### Benefits:
- **Reduces redundant CSS code.
- **Improves maintainability by centralizing common styles.
- **Ensures consistent styling across components.

### Global CSS Classes used:
- `.inputField`
- `.searchButton`
- `.btnsContainer`
- `.input`
- `.btnsBlock`
- `.dropdown`
- `.modalHeader`

For more details on the reusable classes, refer to the global CSS file.
Defined in: [src/screens/OrgList/OrgList.tsx:68](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrgList.tsx#L68)

## Returns

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **default**(`props`, `deprecatedLegacyContext`?): `ReactNode`

Defined in: [src/screens/OrgList/OrganizationModal.tsx:64](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L64)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:65](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L65)

Represents the organization modal component.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# Interface: InterfaceOrganizationModalProps

Defined in: [src/screens/OrgList/OrganizationModal.tsx:49](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L49)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:50](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L50)

Represents the properties of the OrganizationModal component.

Expand All @@ -14,7 +14,7 @@ Represents the properties of the OrganizationModal component.

> **createOrg**: (`e`) => `Promise`\<`void`\>

Defined in: [src/screens/OrgList/OrganizationModal.tsx:54](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L54)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:55](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L55)

#### Parameters

Expand All @@ -32,15 +32,15 @@ Defined in: [src/screens/OrgList/OrganizationModal.tsx:54](https://github.com/Pa

> **formState**: `InterfaceFormStateType`

Defined in: [src/screens/OrgList/OrganizationModal.tsx:52](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L52)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:53](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L53)

***

### setFormState()

> **setFormState**: (`state`) => `void`

Defined in: [src/screens/OrgList/OrganizationModal.tsx:53](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L53)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:54](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L54)

#### Parameters

Expand All @@ -58,15 +58,15 @@ Defined in: [src/screens/OrgList/OrganizationModal.tsx:53](https://github.com/Pa

> **showModal**: `boolean`

Defined in: [src/screens/OrgList/OrganizationModal.tsx:50](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L50)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:51](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L51)

***

### t()

> **t**: (`key`) => `string`

Defined in: [src/screens/OrgList/OrganizationModal.tsx:55](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L55)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:56](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L56)

#### Parameters

Expand All @@ -84,7 +84,7 @@ Defined in: [src/screens/OrgList/OrganizationModal.tsx:55](https://github.com/Pa

> **tCommon**: (`key`) => `string`

Defined in: [src/screens/OrgList/OrganizationModal.tsx:56](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L56)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:57](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L57)

#### Parameters

Expand All @@ -102,7 +102,7 @@ Defined in: [src/screens/OrgList/OrganizationModal.tsx:56](https://github.com/Pa

> **toggleModal**: () => `void`

Defined in: [src/screens/OrgList/OrganizationModal.tsx:51](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L51)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:52](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L52)

#### Returns

Expand All @@ -114,4 +114,4 @@ Defined in: [src/screens/OrgList/OrganizationModal.tsx:51](https://github.com/Pa

> **userData**: [`InterfaceCurrentUserTypePG`](../../../../utils/interfaces/interfaces/InterfaceCurrentUserTypePG.md)

Defined in: [src/screens/OrgList/OrganizationModal.tsx:57](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L57)
Defined in: [src/screens/OrgList/OrganizationModal.tsx:58](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/OrgList/OrganizationModal.tsx#L58)
19 changes: 19 additions & 0 deletions src/components/GroupChatDetails/GroupChatDetails.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -595,4 +595,23 @@ describe('GroupChatDetails', () => {

fireEvent.change(fileInput);
});

it('renders chat name correctly', async () => {
render(
<I18nextProvider i18n={i18n}>
<MockedProvider mocks={mocks} addTypename={false}>
<GroupChatDetails
toggleGroupChatDetailsModal={vi.fn()}
groupChatDetailsModalisOpen={true}
chat={mockChat}
chatRefetch={vi.fn()}
/>
</MockedProvider>
</I18nextProvider>,
);

await wait();

expect(screen.getByText('Test Group')).toBeInTheDocument();
});
});