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

Add Unit Tests for OrganizationAgendaCategory Component and Search Functionality for Agenda Item Categories #3083

Merged
merged 14 commits into from
Dec 30, 2024
Merged
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
10 changes: 8 additions & 2 deletions src/GraphQl/Queries/AgendaCategoryQueries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import gql from 'graphql-tag';
*/

export const AGENDA_ITEM_CATEGORY_LIST = gql`
query AgendaItemCategoriesByOrganization($organizationId: ID!) {
agendaItemCategoriesByOrganization(organizationId: $organizationId) {
query AgendaItemCategoriesByOrganization(
$organizationId: ID!
$where: AgendaItemCategoryWhereInput
) {
agendaItemCategoriesByOrganization(
organizationId: $organizationId
where: $where
) {
_id
name
description
Expand Down
6 changes: 3 additions & 3 deletions src/components/AgendaCategory/AgendaCategoryContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ function agendaCategoryContainer({
<div className="ms-3">{t('name')}</div>
</Col>
<Col
className="align-self-center fw-bold d-none d-md-block"
className={` align-self-center fw-bold d-none d-md-block`}
md={6}
lg={2}
lg={6}
>
{t('description')}
</Col>
Expand Down Expand Up @@ -242,7 +242,7 @@ function agendaCategoryContainer({
</Col>
<Col
md={6}
lg={2}
lg={6}
className="p-1 d-none d-md-block align-self-center text-body-secondary"
>
{agendaCategory.description}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import { Modal, Form, Button } from 'react-bootstrap';
import type { ChangeEvent } from 'react';
import styles from './OrganizationAgendaCategory.module.css';

import styles from 'style/app.module.css';
im-vedant marked this conversation as resolved.
Show resolved Hide resolved
/**
* InterfaceFormStateType is an object containing the form state
*/
Expand Down Expand Up @@ -48,12 +47,14 @@ const AgendaCategoryCreateModal: React.FC<
}) => {
return (
<Modal
className={styles.AgendaCategoryModal}
className={`mt-5 ${styles.campaignModal}`}
show={agendaCategoryCreateModalIsOpen}
onHide={hideCreateModal}
>
<Modal.Header>
<p className={styles.titlemodal}>{t('agendaCategoryDetails')}</p>
<p className={styles.titlemodalOrganizationEvents}>
{t('agendaCategoryDetails')}
</p>
<Button
variant="danger"
onClick={hideCreateModal}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Modal, Button } from 'react-bootstrap';
import styles from './OrganizationAgendaCategory.module.css';
import styles from 'style/app.module.css';

/**
* InterfaceAgendaCategoryDeleteModalProps is an object containing the props for AgendaCategoryDeleteModal component
Expand Down Expand Up @@ -35,7 +35,7 @@ const AgendaCategoryDeleteModal: React.FC<
<Modal
size="sm"
id={`deleteAgendaCategoryModal`}
className={styles.agendaCategoryModal}
className={styles.campaignModal}
show={agendaCategoryDeleteModalIsOpen}
onHide={toggleDeleteModal}
backdrop="static"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import { Modal, Form, Button } from 'react-bootstrap';

import styles from './OrganizationAgendaCategory.module.css';
import styles from 'style/app.module.css';

/**
* InterfaceFormStateType is an object containing the form state
Expand Down Expand Up @@ -47,12 +47,14 @@ const AgendaCategoryPreviewModal: React.FC<
}) => {
return (
<Modal
className={styles.AgendaCategoryModal}
className={styles.campaignModal}
show={agendaCategoryPreviewModalIsOpen}
onHide={hidePreviewModal}
>
<Modal.Header>
<p className={styles.titlemodal}>{t('agendaCategoryDetails')}</p>
<p className={styles.titlemodalOrganizationEvents}>
{t('agendaCategoryDetails')}
</p>
<Button
onClick={hidePreviewModal}
data-testid="previewAgendaCategoryModalCloseBtn"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Modal, Form, Button } from 'react-bootstrap';
import type { ChangeEvent } from 'react';

import styles from './OrganizationAgendaCategory.module.css';
import styles from 'style/app.module.css';

/**
* InterfaceFormStateType is an object containing the form state
Expand Down Expand Up @@ -49,12 +49,14 @@ const AgendaCategoryUpdateModal: React.FC<
}) => {
return (
<Modal
className={styles.AgendaCategoryModal}
className={styles.campaignModal}
show={agendaCategoryUpdateModalIsOpen}
onHide={hideUpdateModal}
>
<Modal.Header>
<p className={styles.titlemodal}>{t('updateAgendaCategory')}</p>
<p className={styles.titlemodalOrganizationEvents}>
{t('updateAgendaCategory')}
</p>
<Button
onClick={hideUpdateModal}
data-testid="updateAgendaCategoryModalCloseBtn"
Expand Down

This file was deleted.

Loading
Loading