diff --git a/src/screens/LoginPage/LoginPage.module.css b/src/screens/LoginPage/LoginPage.module.css
deleted file mode 100644
index 6f58138c34..0000000000
--- a/src/screens/LoginPage/LoginPage.module.css
+++ /dev/null
@@ -1,269 +0,0 @@
-.login_background {
- min-height: 100vh;
-}
-
-.communityLogo {
- object-fit: contain;
-}
-
-.row .left_portion {
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- height: 100vh;
-}
-
-.selectOrgText input {
- outline: none !important;
-}
-
-.row .left_portion .inner .palisadoes_logo {
- width: 600px;
- height: auto;
-}
-
-.row .right_portion {
- min-height: 100vh;
- position: relative;
- overflow-y: scroll;
- display: flex;
- flex-direction: column;
- justify-content: center;
- padding: 1rem 2.5rem;
- background: var(--bs-white);
-}
-
-.row .right_portion::-webkit-scrollbar {
- display: none;
-}
-
-.row .right_portion .langChangeBtn {
- margin: 0;
- position: absolute;
- top: 1rem;
- left: 1rem;
-}
-
-.langChangeBtnStyle {
- width: 7.5rem;
- height: 2.2rem;
- padding: 0;
-}
-
-.row .right_portion .talawa_logo {
- height: 5rem;
- width: 5rem;
- display: block;
- margin: 1.5rem auto 1rem;
- -webkit-animation: zoomIn 0.3s ease-in-out;
- animation: zoomIn 0.3s ease-in-out;
-}
-
-.row .orText {
- display: block;
- position: absolute;
- top: 0;
- left: calc(50% - 2.6rem);
- margin: 0 auto;
- padding: 0.35rem 2rem;
- z-index: 100;
- background: var(--bs-white);
- color: var(--bs-secondary);
-}
-
-.email_button {
- position: absolute;
- z-index: 10;
- bottom: 0;
- right: 0;
- height: 100%;
- display: flex;
- background-color: var(--search-button-bg);
- border-color: var(--search-button-border);
- justify-content: center;
- align-items: center;
-}
-
-.login_btn {
- background-color: var(--search-button-bg);
- border-color: var(--search-button-border);
- margin-top: 1rem;
- /* mt-3: Bootstrap margin spacing utility (3 = 1rem) */
- margin-bottom: 1rem;
- /* mb-3: Bootstrap margin spacing utility (3 = 1rem) */
- width: 100%;
-}
-
-.reg_btn {
- background-color: var(--dropdown-border-color);
- border-color: var(--dropdown-border-color);
- margin-top: 1rem;
- color: white;
- /* mt-3: Bootstrap margin spacing utility (3 = 1rem) */
- margin-bottom: 1rem;
- /* mb-3: Bootstrap margin spacing utility (3 = 1rem) */
- width: 100%;
-}
-
-@media (max-width: 992px) {
- .row .left_portion {
- padding: 0 2rem;
- }
-
- .row .left_portion .inner .palisadoes_logo {
- width: 100%;
- }
-}
-
-@media (max-width: 769px) {
- .row {
- flex-direction: column-reverse;
- }
-
- .row .right_portion,
- .row .left_portion {
- height: unset;
- }
-
- .row .right_portion {
- min-height: 100vh;
- overflow-y: unset;
- }
-
- .row .left_portion .inner {
- display: flex;
- justify-content: center;
- }
-
- .row .left_portion .inner .palisadoes_logo {
- height: 70px;
- width: unset;
- position: absolute;
- margin: 0.5rem;
- top: 0;
- right: 0;
- z-index: 100;
- }
-
- .row .left_portion .inner p {
- margin-bottom: 0;
- padding: 1rem;
- }
-
- .socialIcons {
- margin-bottom: 1rem;
- }
-}
-
-@media (max-width: 577px) {
- .row .right_portion {
- padding: 1rem 1rem 0 1rem;
- }
-
- .row .right_portion .langChangeBtn {
- position: absolute;
- margin: 1rem;
- left: 0;
- top: 0;
- }
-
- .marginTopForReg {
- margin-top: 4rem !important;
- }
-
- .row .right_portion .talawa_logo {
- height: 120px;
- margin: 0 auto 2rem auto;
- }
-
- .socialIcons {
- margin-bottom: 1rem;
- }
-}
-
-.active_tab {
- -webkit-animation: fadeIn 0.3s ease-in-out;
- animation: fadeIn 0.3s ease-in-out;
-}
-
-@-webkit-keyframes zoomIn {
- 0% {
- opacity: 0;
- -webkit-transform: scale(0.5);
- transform: scale(0.5);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: scale(1);
- transform: scale(1);
- }
-}
-
-@keyframes zoomIn {
- 0% {
- opacity: 0;
- -webkit-transform: scale(0.5);
- transform: scale(0.5);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: scale(1);
- transform: scale(1);
- }
-}
-
-@-webkit-keyframes fadeIn {
- 0% {
- opacity: 0;
- -webkit-transform: translateY(2rem);
- transform: translateY(2rem);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-}
-
-@keyframes fadeIn {
- 0% {
- opacity: 0;
- -webkit-transform: translateY(2rem);
- transform: translateY(2rem);
- }
-
- 100% {
- opacity: 1;
- -webkit-transform: translateY(0);
- transform: translateY(0);
- }
-}
-
-.socialIcons {
- display: flex;
- gap: 16px;
- justify-content: center;
-}
-
-.password_checks {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- flex-direction: column;
-}
-
-.password_check_element {
- margin-top: -10px;
-}
-
-.password_check_element_top {
- margin-top: 18px;
-}
-
-.password_check_element_bottom {
- margin-bottom: -20px;
-}
diff --git a/src/screens/LoginPage/LoginPage.tsx b/src/screens/LoginPage/LoginPage.tsx
index 180009926c..605811c834 100644
--- a/src/screens/LoginPage/LoginPage.tsx
+++ b/src/screens/LoginPage/LoginPage.tsx
@@ -30,7 +30,7 @@ import LoginPortalToggle from 'components/LoginPortalToggle/LoginPortalToggle';
import { errorHandler } from 'utils/errorHandler';
import useLocalStorage from 'utils/useLocalstorage';
import { socialMediaLinks } from '../../constants';
-import styles from './LoginPage.module.css';
+import styles from 'style/app.module.css';
import type { InterfaceQueryOrganizationListObject } from 'utils/interfaces';
import { Autocomplete, TextField } from '@mui/material';
import useSession from 'utils/useSession';
diff --git a/src/screens/MemberDetail/MemberDetail.tsx b/src/screens/MemberDetail/MemberDetail.tsx
index cd552c80a0..cc528a8de3 100644
--- a/src/screens/MemberDetail/MemberDetail.tsx
+++ b/src/screens/MemberDetail/MemberDetail.tsx
@@ -3,7 +3,7 @@ import { useMutation, useQuery } from '@apollo/client';
import Button from 'react-bootstrap/Button';
import { useTranslation } from 'react-i18next';
import { useLocation, useNavigate, useParams } from 'react-router-dom';
-import styles from './MemberDetail.module.css';
+import styles from '../../style/app.module.css';
import { languages } from 'utils/languages';
import { UPDATE_USER_MUTATION } from 'GraphQl/Mutations/mutations';
import { USER_DETAILS } from 'GraphQl/Queries/Queries';
@@ -433,7 +433,7 @@ const MemberDetail: React.FC
= ({ id }): JSX.Element => {
{t('birthDate')}
{
afterEach(() => {
localStorage.clear();
cleanup();
+ jest.clearAllMocks();
});
describe('Organisations Page testing as SuperAdmin', () => {
setItem('id', '123');
-
const link = new StaticMockLink(MOCKS, true);
const link2 = new StaticMockLink(MOCKS_EMPTY, true);
const link3 = new StaticMockLink(MOCKS_WITH_ERROR, true);
@@ -475,7 +475,6 @@ describe('Organisations Page testing as SuperAdmin', () => {
describe('Organisations Page testing as Admin', () => {
const link = new StaticMockLink(MOCKS_ADMIN, true);
-
test('Create organization modal should not be present in the page for Admin', async () => {
setItem('id', '123');
setItem('SuperAdmin', false);
@@ -501,35 +500,47 @@ describe('Organisations Page testing as Admin', () => {
setItem('SuperAdmin', false);
setItem('AdminFor', [{ name: 'adi', _id: 'a0', image: '' }]);
- await act(async () => {
- render(
-
-
-
-
-
-
-
-
- ,
- );
-
- await wait();
- });
- const sortDropdown = await waitFor(() => screen.getByTestId('sort'));
+ render(
+
+
+
+
+
+
+
+
+ ,
+ );
+
+ await wait();
+
+ const sortDropdown = screen.getByTestId('sort');
expect(sortDropdown).toBeInTheDocument();
const sortToggle = screen.getByTestId('sortOrgs');
- fireEvent.click(sortToggle);
- const latestOption = await waitFor(() => screen.getByTestId('latest'));
+ await act(async () => {
+ fireEvent.click(sortToggle);
+ });
+
+ const latestOption = screen.getByTestId('latest');
- fireEvent.click(latestOption);
+ await act(async () => {
+ fireEvent.click(latestOption);
+ });
expect(sortDropdown).toBeInTheDocument();
- fireEvent.click(sortToggle);
+
+ await act(async () => {
+ fireEvent.click(sortToggle);
+ });
+
const oldestOption = await waitFor(() => screen.getByTestId('oldest'));
- fireEvent.click(oldestOption);
+
+ await act(async () => {
+ fireEvent.click(oldestOption);
+ });
+
expect(sortDropdown).toBeInTheDocument();
});
});
diff --git a/src/screens/OrgList/OrgList.tsx b/src/screens/OrgList/OrgList.tsx
index 37a4276982..f30bb8f1ea 100644
--- a/src/screens/OrgList/OrgList.tsx
+++ b/src/screens/OrgList/OrgList.tsx
@@ -233,6 +233,8 @@ function orgList(): JSX.Element {
};
if (errorList || errorUser) {
+ errorHandler(t, errorList || errorUser);
+ localStorage.clear();
window.location.assign('/');
}
diff --git a/src/screens/OrgList/OrganizationModal.tsx b/src/screens/OrgList/OrganizationModal.tsx
index fb3589d1e5..20b131eeb9 100644
--- a/src/screens/OrgList/OrganizationModal.tsx
+++ b/src/screens/OrgList/OrganizationModal.tsx
@@ -301,7 +301,7 @@ const OrganizationModal: React.FC = ({
{tCommon('OR')}
- {(adminFor.length > 0 || superAdmin) && (
+ {((adminFor && adminFor.length > 0) || superAdmin) && (