Post comments were invisible in Individual Post Page with Image

**What kind of change does this PR introduce?**

BugFix: Comments were not visible for posts with images.

**Issue Number:**

Fixes #2333

**Did you add tests for your changes?**

Yes

**Snapshots/Videos:**

https://github.com/PalisadoesFoundation/talawa/assets/93479496/2eb8603d-b3dc-48d2-9226-3d1af27aafab

![first](https://github.com/PalisadoesFoundation/talawa/assets/93479496/d1aecd46-bbc3-4ca3-86b8-a6065dae2665)
![seconf](https://github.com/PalisadoesFoundation/talawa/assets/93479496/c1145888-9115-4e0c-9359-fb1c8aa5ff7c)
![third](https://github.com/PalisadoesFoundation/talawa/assets/93479496/499cc804-7414-4f0f-a46d-7e5414313294)

<!--Add snapshots or videos wherever possible.-->

**If relevant, did you update the documentation?**

<!--Add link to Talawa-Docs.-->

**Summary**

Comments were not visible for posts with images

**Does this PR introduce a breaking change?**

No

**Other information**

The bug was there because app was trying to get the complete post data for fetching comments of the post and the `imageurl`  was to be sent in proper format by api for this. That's how `fetchPostsByOrganisation` was working. Now since only comments were needed I removed the extra data fecthed along with comments.

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?**

<!--Yes or No-->
Yes

Bug: Post comments are invisible in Individual Post Page.
**Describe the bug**
`Post comments` in `individual post page` are empty and `invisible` despite the `existence` of comments.

**To Reproduce**
Steps to reproduce the behavior:

1. Login and Join an organisation.
2. Create a post in case of empty posts.
3. Find the created post in news feed and click on its comment option.
4. Add a new comment.
5. Navigate back to news feed.
6. Once again click on same post comment option.

**Expected behavior**
The previously created comment should be visible.

**Actual behavior**
The comment list is empty despite the comment icon showing non zero value.

**Screenshots**

https://github.com/PalisadoesFoundation/talawa/assets/120930148/981d45d6-854d-4823-9028-f3d2a058ff81

**Additional details**
Add any other context or screenshots about the feature request here.

**Potential internship candidates**
Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359

@noman2002 @Cioppolo14
 Can you please assign this to me

I have found the cause of bug and will try to create a PR to fix this till tomorrow.

diff --git a/lib/services/comment_service.dart b/lib/services/comment_service.dart
index 7b25338eb9..b118b6c003 100644
--- a/lib/services/comment_service.dart
+++ b/lib/services/comment_service.dart
@@ -4,7 +4,6 @@ import 'package:talawa/locator.dart';
 import 'package:talawa/services/database_mutation_functions.dart';
 import 'package:talawa/services/navigation_service.dart';
 import 'package:talawa/utils/comment_queries.dart';
-import 'package:talawa/utils/post_queries.dart';

 /// CommentService class have different member functions which provides service in the context of commenting.
 ///
@@ -62,7 +61,7 @@ class CommentService {
   /// * `Future<List<dynamic>>`: promise that will be fulfilled with list of comments.
   ///
   Future<List<dynamic>> getCommentsForPost(String postId) async {
-    final String getCommmentQuery = PostQueries().getPostById(postId);
+    final String getCommmentQuery = CommentQueries().getPostsComments(postId);

     final dynamic result = await _dbFunctions.gqlAuthMutation(getCommmentQuery);

diff --git a/lib/utils/comment_queries.dart b/lib/utils/comment_queries.dart
index 6c6b36bc34..fa11f6c18b 100644
--- a/lib/utils/comment_queries.dart
+++ b/lib/utils/comment_queries.dart
@@ -1,9 +1,12 @@
-// ignore_for_file: talawa_api_doc
-// ignore_for_file: talawa_good_doc_comments
-
 ///This class creates the queries dealing with comments.
 class CommentQueries {
-  //Returns a query for creating a comment
+  /// Creating a comment.
+  ///
+  /// **params**:
+  ///   None
+  ///
+  /// **returns**:
+  /// * `String`: The query for creating a comment
   String createComment() {
     return """
      mutation createComment(\$postId: ID!, \$text: String!) {
@@ -18,20 +21,29 @@ class CommentQueries {
   """;
   }

-  //Returns a query to get the comments of a post
+  /// Get all comments for a post.
+  ///
+  /// **params**:
+  /// * `postId`: The id of the post to get comments for.
+  ///
+  /// **returns**:
+  /// * `String`: The query for getting all comments for a post.
   String getPostsComments(String postId) {
     return """
-    query{
-      commentsByPost(id: "$postId"){
-        _id
-        text
-        createdAt
+     query {
+        post(id: "$postId")
+        {  _id,
+          comments{
+             _id,
+            text,
+             createdAt
         creator{
           firstName
           lastName
         }
+          }
+        }
       }
-    }
-    """;
+""";
   }
 }
diff --git a/lib/utils/post_queries.dart b/lib/utils/post_queries.dart
index 365c940d00..4d763032d7 100644
--- a/lib/utils/post_queries.dart
+++ b/lib/utils/post_queries.dart
@@ -73,7 +73,7 @@ class PostQueries {
             _id
           }
           comments{
-            _id,
+           _id,
             text,
              createdAt
         creator{

diff --git a/test/service_tests/comment_service_test.dart b/test/service_tests/comment_service_test.dart
index 71233621d7..4a8af56952 100644
--- a/test/service_tests/comment_service_test.dart
+++ b/test/service_tests/comment_service_test.dart
@@ -6,7 +6,6 @@ import 'package:talawa/locator.dart';
 import 'package:talawa/services/comment_service.dart';
 import 'package:talawa/services/database_mutation_functions.dart';
 import 'package:talawa/utils/comment_queries.dart';
-import 'package:talawa/utils/post_queries.dart';
 import '../helpers/test_helpers.dart';

 void main() {
@@ -75,7 +74,7 @@ void main() {
     test('test for getCommentsForPost', () async {
       final dataBaseMutationFunctions = locator<DataBaseMutationFunctions>();
       final String getCommmentQuery =
-          PostQueries().getPostById('Ayush s postid');
+          CommentQueries().getPostsComments('Ayush s postid');

       when(
         dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery),
@@ -167,7 +166,7 @@ void main() {
       final dataBaseMutationFunctions = locator<DataBaseMutationFunctions>();

       final String getCommmentQuery =
-          PostQueries().getPostById('Ayush s postid');
+          CommentQueries().getPostsComments('Ayush s postid');
       when(
         dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery),
       ).thenAnswer(
@@ -221,7 +220,7 @@ void main() {
       final dataBaseMutationFunctions = locator<DataBaseMutationFunctions>();

       final String getCommmentQuery =
-          PostQueries().getPostById('Ayush s postid');
+          CommentQueries().getPostsComments('Ayush s postid');
       when(
         dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery),
       ).thenAnswer(
@@ -273,7 +272,7 @@ void main() {
       final dataBaseMutationFunctions = locator<DataBaseMutationFunctions>();

       final String getCommmentQuery =
-          PostQueries().getPostById('Ayush s postid');
+          CommentQueries().getPostsComments('Ayush s postid');
       when(
         dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery),
       ).thenAnswer(
@@ -325,7 +324,7 @@ void main() {
       final dataBaseMutationFunctions = locator<DataBaseMutationFunctions>();

       final String getCommmentQuery =
-          PostQueries().getPostById('Ayush s postid');
+          CommentQueries().getPostsComments('Ayush s postid');
       when(
         dataBaseMutationFunctions.gqlAuthMutation(getCommmentQuery),
       ).thenAnswer(
diff --git a/test/utils/comment_queries_test.dart b/test/utils/comment_queries_test.dart
index f73df7de7f..d9b34b9b7f 100644
--- a/test/utils/comment_queries_test.dart
+++ b/test/utils/comment_queries_test.dart
@@ -1,6 +1,3 @@
-// ignore_for_file: talawa_api_doc
-// ignore_for_file: talawa_good_doc_comments
-
 import 'package:flutter_test/flutter_test.dart';
 import 'package:talawa/utils/comment_queries.dart';

@@ -8,18 +5,21 @@ void main() {
   group("Tests for comment_queries.dart", () {
     test("Check if getPostsComments works correctly", () {
       const data = """
-    query{
-      commentsByPost(id: "abc"){
-        _id
-        text
-        createdAt
+     query {
+        post(id: "abc")
+        {  _id,
+          comments{
+             _id,
+            text,
+             createdAt
         creator{
           firstName
           lastName
         }
+          }
+        }
       }
-    }
-    """;
+""";
       final fnData = CommentQueries().getPostsComments("abc");
       expect(fnData, data);
     });
diff --git a/test/utils/post_queries_test.dart b/test/utils/post_queries_test.dart
index 5f5029d245..203d193ab5 100644
--- a/test/utils/post_queries_test.dart
+++ b/test/utils/post_queries_test.dart
@@ -54,6 +54,47 @@ void main() {
       expect(fnData, data);
     });

+    test("Check if getPostById works correctly", () {
+      const data = """
+      query {
+        post(id: "abc")
+        {
+          _id
+          text
+          createdAt
+          imageUrl
+          videoUrl
+          title
+          commentCount
+          likeCount
+          creator{
+            _id
+            firstName
+            lastName
+            image
+          }
+          organization{
+            _id
+          }
+          likedBy{
+            _id
+          }
+          comments{
+           _id,
+            text,
+             createdAt
+        creator{
+          firstName
+          lastName
+        }
+          }
+        }
+      }
+""";
+      final fnData = PostQueries().getPostById("abc");
+      expect(fnData, data);
+    });
+
     test("Check if removeLike works correctly", () {
       const data = """
      mutation unlikePost(\$postID: ID!) {


converted private orgs to userRegistrationRequired orgs

<!--
This section can be deleted after reading.

We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:

- `develop`: For unstable code: New features and bug fixes.
- `master`: Where the stable production ready code lies. Only security related bugs.

NOTE!!!

ONLY SUBMIT PRS AGAINST OUR `DEVELOP` BRANCH. THE DEFAULT IS `MAIN`, SO YOU WILL HAVE TO MODIFY THIS BEFORE SUBMITTING YOUR PR FOR REVIEW. PRS MADE AGAINST `MAIN` WILL BE CLOSED.
-->

<!--
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
-->

**What kind of change does this PR introduce?**

This PR converts all the support & references of `private organizations` to `userRegistrationRequired organizations`.

**Issue Number:**

Fixes #2287

**Did you add tests for your changes?**

Yes

**Snapshots/Videos:**

<!--Add snapshots or videos wherever possible.-->

**If relevant, did you update the documentation?**

<!--Add link to Talawa-Docs.-->

**Summary**

The motive of this PR is to transform all the references and code of `private` organizatioins to `userRegistrationRequired` organizations.
The above transformation is achieved by replacing the `isPublic` attribute of `Organisation` model with `userRegistrationRequired` attribute in entire code base and making respective change to the logic.

**Does this PR introduce a breaking change?**

No

**Other information**

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?**

Yes

Mobile - Remove Support for Private Organizations
**Is your feature request related to a problem? Please describe.**
We need to reduce and simplify some of the Talawa features.

The concept of private organizations is unlikely given that most organizations using Talawa will be non-profits where transparency will be important.

**Describe the solution you'd like**

Remove all support for private organizations in:
1. Screens, sections of screens and supporting code that reference the feature

Other:

1. All tests must be valid and pass
1. No other functionality must be affected.

**Describe alternatives you've considered**
- N/A

**Approach to be followed (optional)**
- See above

**Additional context**
Related issues include:
1. https://github.com/PalisadoesFoundation/talawa-api/issues/1604
2. https://github.com/PalisadoesFoundation/talawa-admin/issues/1327
3. https://github.com/PalisadoesFoundation/talawa/issues/2287

**Potential internship candidates**
- Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359

@noman2002 @Cioppolo14 @Kevoniat can any one of you please assign this issue to me. I would like to work on this.
Can I work on this issue?
@AVtheking If the issue has already been assigned, please don't ask to be assigned. We want everyone to get a chance.
@palisadoes a small clarification, the `membership request` feature is only available for private orgs right ?
It should be valid for all types of organizations
@palisadoes if we remove the support for private orgs then i think the `membership request feature` is of no use because the public orgs allow the users to directly participate.

![Screenshot from 2024-01-04 17-01-58](https://github.com/PalisadoesFoundation/talawa/assets/120930148/eadf5fd7-1201-4a05-be62-f3c5c66af68d)

and in above context the concept of waiting screen also makes no sense.
so i am planning to remove both `waiting screen` and `membership request feature` from the application.
1. When users first create their accounts, they register to an organization and the Admin approves it.
2. The Admin portal has a request approvals screen for this.
3. We should consider whether organizations want to have the option of automatic registration or not.

@rishav-jha-mech @aashimawadhwa @beingnoble03 What is the current workflow in the web Admin and User portals?
**Admin Panel**

1. The first registered user becomes Superadmin, others will be just the users
2. The superadmin creates Organizations, and can manually add any user to it
3. The superadmin can change the role of any user, from user to admin and vice-versa
4. An admin cannot change the role of other admin
5. We have a membership requests page, on Admin Panel, only admins who are not approved by an admin will be listed there, it is redundant now, so that will be removed
6. We dont have Membership Requests screen at the moment for the organization, we have to create one
@rishav-jha-mech please clarify

1. if an organisation is public, then the users can directly join that org right? No need of sending a  membership request and waiting for the approval.
> so i am planning to remove both waiting screen and membership request feature from the application.

@palisadoes please suggest, what would be the appropriate solution shall I remove the above screens or leave them as it is.
> @rishav-jha-mech please clarify
>
> 1. if an organisation is public, then the users can directly join that org right? No need of sending a  membership request and waiting for the approval.

There may be a requirement by the admin to require  registration approvals for public orgs.

Please reference the issues mentioned in the other tepos
Please work with @rishav-jha-mech on this
Please refer to this discussion before proceeding
- https://github.com/PalisadoesFoundation/talawa-api/pull/1643#issuecomment-1879947274
@palisadoes this is for your kind information,
as soon as [this](https://github.com/PalisadoesFoundation/talawa-api/pull/1643) PR gets merged i will work on this issue.
FYI - The issue blocking this has been completed
- https://github.com/PalisadoesFoundation/talawa-api/issues/1604
Thanks @palisadoes , I will start working on it.

diff --git a/lib/models/organization/org_info.dart b/lib/models/organization/org_info.dart
index 1ab789ad52..28b790924c 100644
--- a/lib/models/organization/org_info.dart
+++ b/lib/models/organization/org_info.dart
@@ -14,7 +14,7 @@ class OrgInfo {
     this.description,
     this.id,
     this.image,
-    this.isPublic,
+    this.userRegistrationRequired,
     this.name,
   });

@@ -34,7 +34,9 @@ class OrgInfo {
       name: json['name'] != null ? json['name'] as String? : null,
       description:
           json['description'] != null ? json['description'] as String? : null,
-      isPublic: json['isPublic'] != null ? json['isPublic'] as bool? : null,
+      userRegistrationRequired: json['userRegistrationRequired'] != null
+          ? json['userRegistrationRequired'] as bool?
+          : null,
       creatorInfo: json['creator'] != null
           ? User.fromJson(
               json['creator'] as Map<String, dynamic>,
@@ -112,9 +114,9 @@ class OrgInfo {
   @HiveField(5)
   String? description;

-  /// The org visibility.
+  /// The org registration is required.
   @HiveField(6)
-  bool? isPublic;
+  bool? userRegistrationRequired;

   /// The org creatorInfo.
   @HiveField(7)
diff --git a/lib/models/organization/org_info.g.dart b/lib/models/organization/org_info.g.dart
index fea56e918d..91985214a7 100644
--- a/lib/models/organization/org_info.g.dart
+++ b/lib/models/organization/org_info.g.dart
@@ -1,6 +1,3 @@
-// ignore_for_file: talawa_api_doc
-// ignore_for_file: talawa_good_doc_comments
-
 // GENERATED CODE - DO NOT MODIFY BY HAND

 part of 'org_info.dart';
@@ -26,7 +23,7 @@ class OrgInfoAdapter extends TypeAdapter<OrgInfo> {
       description: fields[5] as String?,
       id: fields[1] as String?,
       image: fields[0] as String?,
-      isPublic: fields[6] as bool?,
+      userRegistrationRequired: fields[6] as bool?,
       name: fields[2] as String?,
     );
   }
@@ -48,7 +45,7 @@ class OrgInfoAdapter extends TypeAdapter<OrgInfo> {
       ..writeByte(5)
       ..write(obj.description)
       ..writeByte(6)
-      ..write(obj.isPublic)
+      ..write(obj.userRegistrationRequired)
       ..writeByte(7)
       ..write(obj.creatorInfo);
   }
diff --git a/lib/router.dart b/lib/router.dart
index 86fd7f8a19..3d2f124867 100644
--- a/lib/router.dart
+++ b/lib/router.dart
@@ -43,7 +43,7 @@ import 'package:talawa/views/pre_auth_screens/select_language.dart';
 import 'package:talawa/views/pre_auth_screens/select_organization.dart';
 import 'package:talawa/views/pre_auth_screens/set_url.dart';
 import 'package:talawa/views/pre_auth_screens/signup_details.dart';
-import 'package:talawa/views/pre_auth_screens/waiting_to_join_private_org.dart';
+import 'package:talawa/views/pre_auth_screens/waiting_screen.dart';

 /// The MaterialApp provides us with a property called generateRoute where.
 ///
diff --git a/lib/utils/queries.dart b/lib/utils/queries.dart
index 446c66880f..dacc866ce7 100644
--- a/lib/utils/queries.dart
+++ b/lib/utils/queries.dart
@@ -35,7 +35,7 @@ class Queries {
                   name
                   image
                   description
-                  isPublic
+                  userRegistrationRequired
                   creator{
                     _id
                     firstName
@@ -48,7 +48,7 @@ class Queries {
                   name
                   image
                   description
-                  isPublic
+                  userRegistrationRequired
                   creator{
                     _id
                     firstName
@@ -62,7 +62,7 @@ class Queries {
                     name
                     image
                     description
-                    isPublic
+                    userRegistrationRequired
                     creator{
                       _id
                       firstName
@@ -106,7 +106,7 @@ class Queries {
                 name
                 image
                 description
-                isPublic
+                userRegistrationRequired
                 creator{
                   _id
                   firstName
@@ -119,7 +119,7 @@ class Queries {
                 name
                 image
                 description
-                isPublic
+                userRegistrationRequired
                 creator{
                   _id
                   firstName
@@ -133,7 +133,7 @@ class Queries {
                   name
                   image
                   description
-                  isPublic
+                  userRegistrationRequired
                   creator{
                     _id
                     firstName
@@ -207,7 +207,7 @@ class Queries {
         _id
         name
         image
-        isPublic
+        userRegistrationRequired
         creator{
           firstName
           lastName
@@ -229,7 +229,7 @@ class Queries {
         where:{
           name_starts_with: \$nameStartsWith,
           visibleInSearch: true,
-          isPublic: true,
+          userRegistrationRequired: true,
         }
         first: \$first,
         skip: \$skip,
@@ -239,7 +239,7 @@ class Queries {
         _id
         name
         image
-        isPublic
+        userRegistrationRequired
         creator{
           firstName
           lastName
@@ -266,7 +266,7 @@ class Queries {
             name
             image
             description
-            isPublic
+            userRegistrationRequired
             creator{
               _id
               firstName
@@ -297,7 +297,7 @@ class Queries {
               name
               image
               description
-              isPublic
+              userRegistrationRequired
               creator{
                 _id
                 firstName
@@ -324,7 +324,7 @@ class Queries {
               name
               image
               description
-              isPublic
+              userRegistrationRequired
               creator{
                 _id
                 firstName
@@ -338,7 +338,7 @@ class Queries {
               name
               image
               description
-              isPublic
+              userRegistrationRequired
               creator{
                 _id
                 firstName
@@ -351,7 +351,7 @@ class Queries {
                 _id
                 name
                 image
-                isPublic
+                userRegistrationRequired
                 creator{
                   _id
                   firstName
@@ -420,7 +420,7 @@ class Queries {
         _id
         name
         image
-        isPublic
+        userRegistrationRequired
         creator{
           firstName
           lastName
@@ -480,7 +480,7 @@ class Queries {
           _id
         }
         description
-        isPublic
+        userRegistrationRequired
         creator{
           _id
           firstName
diff --git a/lib/view_model/pre_auth_view_models/select_organization_view_model.dart b/lib/view_model/pre_auth_view_models/select_organization_view_model.dart
index 688b6878a0..f2a0c911c4 100644
--- a/lib/view_model/pre_auth_view_models/select_organization_view_model.dart
+++ b/lib/view_model/pre_auth_view_models/select_organization_view_model.dart
@@ -123,9 +123,8 @@ class SelectOrganizationViewModel extends BaseModel {
         selectedOrganization = item;
         notifyListeners();
         onTapJoin();
-        // print(selectedOrganization.isPublic);

-        if (!selectedOrganization.isPublic!) {
+        if (selectedOrganization.userRegistrationRequired!) {
           navigationService.pushScreen(
             Routes.requestAccess,
             arguments: selectedOrganization,
@@ -186,8 +185,8 @@ class SelectOrganizationViewModel extends BaseModel {
   /// **returns**:
   /// * `Future<void>`: None
   Future<void> onTapJoin() async {
-    // if `selectedOrganization` is public.
-    if (selectedOrganization.isPublic == true) {
+    // if `selectedOrganization` registrations is not required.
+    if (selectedOrganization.userRegistrationRequired == false) {
       try {
         // run the graph QL mutation
         final QueryResult result = await databaseFunctions.gqlAuthMutation(
diff --git a/lib/view_model/pre_auth_view_models/signup_details_view_model.dart b/lib/view_model/pre_auth_view_models/signup_details_view_model.dart
index e25261cdc1..8456887dce 100644
--- a/lib/view_model/pre_auth_view_models/signup_details_view_model.dart
+++ b/lib/view_model/pre_auth_view_models/signup_details_view_model.dart
@@ -142,8 +142,8 @@ class SignupDetailsViewModel extends BaseModel {
           final bool tokenRefreshed = await graphqlConfig.getToken() as bool;
           // if user successfully saved and access token is also generated.
           if (userSaved && tokenRefreshed) {
-            // if the selected organization is public.
-            if (selectedOrganization.isPublic!) {
+            // if the selected organization userRegistration not required.
+            if (!selectedOrganization.userRegistrationRequired!) {
               try {
                 final QueryResult result =
                     await databaseFunctions.gqlAuthMutation(
diff --git a/lib/views/pre_auth_screens/waiting_to_join_private_org.dart b/lib/views/pre_auth_screens/waiting_screen.dart
similarity index 96%
rename from lib/views/pre_auth_screens/waiting_to_join_private_org.dart
rename to lib/views/pre_auth_screens/waiting_screen.dart
index 011f5a5fb9..5615793c15 100644
--- a/lib/views/pre_auth_screens/waiting_to_join_private_org.dart
+++ b/lib/views/pre_auth_screens/waiting_screen.dart
@@ -1,6 +1,3 @@
-// ignore_for_file: talawa_api_doc
-// ignore_for_file: talawa_good_doc_comments
-
 import 'package:flutter/material.dart';
 import 'package:talawa/enums/enums.dart';
 import 'package:talawa/services/size_config.dart';
@@ -12,7 +9,7 @@ import 'package:talawa/widgets/raised_round_edge_button.dart';
 import 'package:talawa/widgets/rich_text.dart';
 import 'package:talawa/widgets/signup_progress_indicator.dart';

-/// This class returns a widget which shows the request sent by the user to join a private organization.
+/// Displays a screen instructing the user to wait for approval.
 class WaitingPage extends StatelessWidget {
   const WaitingPage({super.key});

diff --git a/lib/widgets/custom_list_tile.dart b/lib/widgets/custom_list_tile.dart
index 54c02ddfa0..26eb497368 100644
--- a/lib/widgets/custom_list_tile.dart
+++ b/lib/widgets/custom_list_tile.dart
@@ -110,8 +110,10 @@ class CustomListTile extends StatelessWidget {
                 child: type != TileType.user
                     ? type == TileType.org
                         ? Icon(
-                            orgInfo!.isPublic! ? Icons.lock_open : Icons.lock,
-                            color: orgInfo!.isPublic!
+                            !orgInfo!.userRegistrationRequired!
+                                ? Icons.lock_open
+                                : Icons.lock,
+                            color: !orgInfo!.userRegistrationRequired!
                                 ? const Color(0xFF34AD64)
                                 : const Color(0xffFABC57),
                           )

diff --git a/test/helpers/test_helpers.dart b/test/helpers/test_helpers.dart
index 71ebf67576..9de98325bc 100644
--- a/test/helpers/test_helpers.dart
+++ b/test/helpers/test_helpers.dart
@@ -111,7 +111,7 @@ final fakeOrgInfo = OrgInfo(
     firstName: "ravidi",
     lastName: "shaikh",
   ),
-  isPublic: false,
+  userRegistrationRequired: true,
 );

 void _removeRegistrationIfExists<T extends Object>() {
@@ -363,13 +363,13 @@ UserConfig getAndRegisterUserConfig() {
         OrgInfo(
           id: '3',
           name: 'test org 3',
-          isPublic: true,
+          userRegistrationRequired: false,
           creatorInfo: User(firstName: 'test', lastName: '1'),
         ),
         OrgInfo(
           id: '4',
           name: 'test org 4',
-          isPublic: false,
+          userRegistrationRequired: true,
           creatorInfo: User(firstName: 'test', lastName: '2'),
         ),
         OrgInfo(
@@ -381,13 +381,13 @@ UserConfig getAndRegisterUserConfig() {
         OrgInfo(
           id: '1',
           name: 'test org',
-          isPublic: false,
+          userRegistrationRequired: true,
           creatorInfo: User(firstName: 'test', lastName: 'test'),
         ),
         OrgInfo(
           id: '2',
           name: 'test org',
-          isPublic: false,
+          userRegistrationRequired: true,
           creatorInfo: User(firstName: 'test', lastName: 'test'),
         ),
       ],
diff --git a/test/model_tests/organization/org_info_test.dart b/test/model_tests/organization/org_info_test.dart
index fb96537579..9bbca3d8c9 100644
--- a/test/model_tests/organization/org_info_test.dart
+++ b/test/model_tests/organization/org_info_test.dart
@@ -16,7 +16,7 @@ void main() {
       'image': 'image_url',
       'name': 'Name',
       'description': 'Description',
-      'isPublic': true,
+      'userRegistrationRequired': false,
       'creator': userJson,
       'members': [userJson],
       'admins': [userJson],
@@ -26,7 +26,7 @@ void main() {
       'image': 'image_url',
       'name': 'Name',
       'description': 'Description',
-      'isPublic': true,
+      'userRegistrationRequired': false,
       'creator': userJson,
       'members': [userJson],
       'admins': [userJson],
@@ -39,7 +39,7 @@ void main() {
       expect(result.image, 'image_url');
       expect(result.name, 'Name');
       expect(result.description, 'Description');
-      expect(result.isPublic, true);
+      expect(result.userRegistrationRequired, false);
       expect(result.creatorInfo!.authToken, ' ');
       expect(result.creatorInfo!.refreshToken, ' ');
       expect(result.creatorInfo!.id, 'user_id');
@@ -64,7 +64,7 @@ void main() {
       expect(result.image, 'image_url');
       expect(result.name, 'Name');
       expect(result.description, 'Description');
-      expect(result.isPublic, true);
+      expect(result.userRegistrationRequired, false);
       expect(result.creatorInfo!.authToken, ' ');
       expect(result.creatorInfo!.refreshToken, ' ');
       expect(result.creatorInfo!.id, 'user_id');
@@ -92,7 +92,7 @@ void main() {
         expect(result.image, 'image_url');
         expect(result.name, 'Name');
         expect(result.description, 'Description');
-        expect(result.isPublic, true);
+        expect(result.userRegistrationRequired, false);
         expect(result.creatorInfo!.authToken, ' ');
         expect(result.creatorInfo!.refreshToken, ' ');
         expect(result.creatorInfo!.id, 'user_id');
@@ -124,7 +124,7 @@ void main() {
       expect(res[0].image, 'image_url');
       expect(res[0].name, 'Name');
       expect(res[0].description, 'Description');
-      expect(res[0].isPublic, true);
+      expect(res[0].userRegistrationRequired, false);
       expect(res[0].creatorInfo!.authToken, ' ');
       expect(res[0].creatorInfo!.refreshToken, ' ');
       expect(res[0].creatorInfo!.id, 'user_id');
@@ -141,7 +141,7 @@ void main() {
       expect(res[1].image, 'image_url');
       expect(res[1].name, 'Name');
       expect(res[1].description, 'Description');
-      expect(res[1].isPublic, true);
+      expect(res[1].userRegistrationRequired, false);
       expect(res[1].creatorInfo!.authToken, ' ');
       expect(res[1].creatorInfo!.refreshToken, ' ');
       expect(res[1].creatorInfo!.id, 'user_id');
@@ -158,7 +158,7 @@ void main() {
       expect(res[2].image, 'image_url');
       expect(res[2].name, 'Name');
       expect(res[2].description, 'Description');
-      expect(res[2].isPublic, true);
+      expect(res[2].userRegistrationRequired, false);
       expect(res[2].creatorInfo!.authToken, ' ');
       expect(res[2].creatorInfo!.refreshToken, ' ');
       expect(res[2].creatorInfo!.id, 'user_id');
diff --git a/test/model_tests/user/user_info_test.dart b/test/model_tests/user/user_info_test.dart
index 00262f3689..f4611e34b0 100644
--- a/test/model_tests/user/user_info_test.dart
+++ b/test/model_tests/user/user_info_test.dart
@@ -11,14 +11,14 @@ import 'package:talawa/models/user/user_info.dart';
 final encodedOrg = {
   "name": 'test_org',
   "image": 'https://testimg.com',
-  "isPublic": false,
+  "userRegistrationRequired": true,
 };

 /// Updated Organization.
 final updatedOrg = OrgInfo.fromJson({
   "name": 'test_org_updated',
   "image": 'https://testimg_updated.com',
-  "isPublic": true,
+  "userRegistrationRequired": false,
 });

 /// Membership Request Organization.
@@ -136,7 +136,7 @@ void main() {
       expect(userInfo.joinedOrganizations!.length, 2);
       expect(userInfo.joinedOrganizations![0].name, 'test_org');
       expect(userInfo.joinedOrganizations![0].image, 'https://testimg.com');
-      expect(userInfo.joinedOrganizations![0].isPublic, false);
+      expect(userInfo.joinedOrganizations![0].userRegistrationRequired, true);

       userInfo.updateJoinedOrg([updatedOrg, updatedOrg, updatedOrg]);

@@ -146,7 +146,7 @@ void main() {
         userInfo.joinedOrganizations![0].image,
         'https://testimg_updated.com',
       );
-      expect(userInfo.joinedOrganizations![0].isPublic, true);
+      expect(userInfo.joinedOrganizations![0].userRegistrationRequired, false);
     });

     test('Check if the method updateCreatedOrg works', () async {
@@ -155,7 +155,7 @@ void main() {
       expect(userInfo.createdOrganizations!.length, 2);
       expect(userInfo.createdOrganizations![0].name, 'test_org');
       expect(userInfo.createdOrganizations![0].image, 'https://testimg.com');
-      expect(userInfo.createdOrganizations![0].isPublic, false);
+      expect(userInfo.createdOrganizations![0].userRegistrationRequired, true);

       userInfo.updateCreatedOrg([updatedOrg, updatedOrg, updatedOrg]);

@@ -165,7 +165,7 @@ void main() {
         userInfo.createdOrganizations![0].image,
         'https://testimg_updated.com',
       );
-      expect(userInfo.createdOrganizations![0].isPublic, true);
+      expect(userInfo.createdOrganizations![0].userRegistrationRequired, false);
     });

     test('Check if the method updateMemberRequestOrg works', () async {
@@ -174,7 +174,7 @@ void main() {
       expect(userInfo.membershipRequests!.length, 2);
       expect(userInfo.membershipRequests![0].name, 'test_org');
       expect(userInfo.membershipRequests![0].image, 'https://testimg.com');
-      expect(userInfo.membershipRequests![0].isPublic, false);
+      expect(userInfo.membershipRequests![0].userRegistrationRequired, true);

       userInfo.updateMemberRequestOrg([updatedOrg, updatedOrg, updatedOrg]);

@@ -184,7 +184,7 @@ void main() {
         userInfo.membershipRequests![3].image,
         'https://testimg_updated.com',
       );
-      expect(userInfo.membershipRequests![3].isPublic, true);
+      expect(userInfo.membershipRequests![3].userRegistrationRequired, false);
     });

     test('Check if the method updateAdminFor works', () async {
@@ -193,14 +193,14 @@ void main() {
       expect(userInfo.adminFor!.length, 2);
       expect(userInfo.adminFor![0].name, 'test_org');
       expect(userInfo.adminFor![0].image, 'https://testimg.com');
-      expect(userInfo.adminFor![0].isPublic, false);
+      expect(userInfo.adminFor![0].userRegistrationRequired, true);

       userInfo.updateAdminFor([updatedOrg, updatedOrg, updatedOrg]);

       expect(userInfo.adminFor!.length, 3);
       expect(userInfo.adminFor![0].name, 'test_org_updated');
       expect(userInfo.adminFor![0].image, 'https://testimg_updated.com');
-      expect(userInfo.adminFor![0].isPublic, true);
+      expect(userInfo.adminFor![0].userRegistrationRequired, false);
     });

     test('Check if Hive storage works', () async {
diff --git a/test/router_test.dart b/test/router_test.dart
index a46d7a2f93..71c6260862 100644
--- a/test/router_test.dart
+++ b/test/router_test.dart
@@ -41,7 +41,7 @@ import 'package:talawa/views/pre_auth_screens/change_password.dart';
 import 'package:talawa/views/pre_auth_screens/select_language.dart';
 import 'package:talawa/views/pre_auth_screens/select_organization.dart';
 import 'package:talawa/views/pre_auth_screens/set_url.dart';
-import 'package:talawa/views/pre_auth_screens/waiting_to_join_private_org.dart';
+import 'package:talawa/views/pre_auth_screens/waiting_screen.dart';

 class MockBuildContext extends Mock implements BuildContext {}

diff --git a/test/service_tests/database_mutations_function_test.dart b/test/service_tests/database_mutations_function_test.dart
index 75b821c2c6..dff3fc097d 100644
--- a/test/service_tests/database_mutations_function_test.dart
+++ b/test/service_tests/database_mutations_function_test.dart
@@ -58,7 +58,7 @@ void main() async {
     'image': 'sampleimg',
     'id': 'XYZ',
     'name': 'Sample1',
-    'isPublic': true,
+    'userRegistrationRequired': false,
     'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'},
   });

@@ -145,7 +145,7 @@ void main() async {
                 'id': 'XYZ',
                 'image': 'sampleimg',
                 'name': 'Sample1',
-                'isPublic': true,
+                'userRegistrationRequired': false,
                 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'},
               },
             ],
@@ -159,7 +159,7 @@ void main() async {
       expect(org.id, testOrg.id);
       expect(org.name, testOrg.name);
       expect(org.image, testOrg.image);
-      expect(org.isPublic, testOrg.isPublic);
+      expect(org.userRegistrationRequired, testOrg.userRegistrationRequired);
       expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName);
     });

@@ -374,7 +374,7 @@ void main() async {
                 'id': 'XYZ',
                 'image': 'sampleimg',
                 'name': 'Sample1',
-                'isPublic': true,
+                'userRegistrationRequired': false,
                 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'},
               },
             ],
@@ -391,7 +391,7 @@ void main() async {
       expect(org.id, testOrg.id);
       expect(org.name, testOrg.name);
       expect(org.image, testOrg.image);
-      expect(org.isPublic, testOrg.isPublic);
+      expect(org.userRegistrationRequired, testOrg.userRegistrationRequired);
       expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName);
     });

@@ -501,7 +501,7 @@ void main() async {
                 'id': 'XYZ',
                 'image': 'sampleimg',
                 'name': 'Sample1',
-                'isPublic': true,
+                'userRegistrationRequired': false,
                 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'},
               },
             ],
@@ -518,7 +518,7 @@ void main() async {
       expect(org.id, testOrg.id);
       expect(org.name, testOrg.name);
       expect(org.image, testOrg.image);
-      expect(org.isPublic, testOrg.isPublic);
+      expect(org.userRegistrationRequired, testOrg.userRegistrationRequired);
       expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName);
     });

@@ -629,7 +629,7 @@ void main() async {
                 'id': 'XYZ',
                 'image': 'sampleimg',
                 'name': 'Sample1',
-                'isPublic': true,
+                'userRegistrationRequired': false,
                 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'},
               },
             ],
@@ -646,7 +646,7 @@ void main() async {
       expect(org.id, testOrg.id);
       expect(org.name, testOrg.name);
       expect(org.image, testOrg.image);
-      expect(org.isPublic, testOrg.isPublic);
+      expect(org.userRegistrationRequired, testOrg.userRegistrationRequired);
       expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName);
     });

@@ -664,7 +664,7 @@ void main() async {
                 'id': 'XYZ',
                 'image': 'sampleimg',
                 'name': 'Sample1',
-                'isPublic': true,
+                'userRegistrationRequired': false,
                 'creator': {'firstName': 'Shivam', 'lastName': 'Gupta'},
               },
             ],
@@ -681,7 +681,7 @@ void main() async {
       expect(org.id, testOrg.id);
       expect(org.name, testOrg.name);
       expect(org.image, testOrg.image);
-      expect(org.isPublic, testOrg.isPublic);
+      expect(org.userRegistrationRequired, testOrg.userRegistrationRequired);
       expect(org.creatorInfo!.firstName, testOrg.creatorInfo!.firstName);
     });

diff --git a/test/service_tests/org_service_test.dart b/test/service_tests/org_service_test.dart
index bb0b1a0cce..736e6cd77b 100644
--- a/test/service_tests/org_service_test.dart
+++ b/test/service_tests/org_service_test.dart
@@ -31,7 +31,7 @@ void main() {
           _id
         }
         description
-        isPublic
+        userRegistrationRequired
         creator{
           _id
           firstName
diff --git a/test/view_model_tests/access_request_view_model_test.dart b/test/view_model_tests/access_request_view_model_test.dart
index bd0352028e..e6a63d6a5f 100644
--- a/test/view_model_tests/access_request_view_model_test.dart
+++ b/test/view_model_tests/access_request_view_model_test.dart
@@ -53,7 +53,7 @@ void main() {
                   'name': 'Organization Name',
                   'image': null,
                   'description': null,
-                  'isPublic': false,
+                  'userRegistrationRequired': true,
                   'creator': {
                     'firstName': 'ravidi',
                     'lastName': 'shaikh',
@@ -106,7 +106,7 @@ void main() {
                   'name': 'Organization Name',
                   'image': null,
                   'description': null,
-                  'isPublic': false,
+                  'userRegistrationRequired': true,
                   'creator': {
                     'firstName': 'ravidi',
                     'lastName': 'shaikh',
diff --git a/test/view_model_tests/custom_drawer_view_model_test.dart b/test/view_model_tests/custom_drawer_view_model_test.dart
index ee24e31fff..3d5f92550e 100644
--- a/test/view_model_tests/custom_drawer_view_model_test.dart
+++ b/test/view_model_tests/custom_drawer_view_model_test.dart
@@ -166,7 +166,7 @@ void main() {
       final OrgInfo fakeOrg = OrgInfo(
         id: '5',
         name: 'fake org 1',
-        isPublic: false,
+        userRegistrationRequired: true,
         creatorInfo: User(firstName: 'fake', lastName: 'user'),
       );
       //check if the mocked org is present or not
diff --git a/test/view_model_tests/pre_auth_view_models/login_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/login_view_model_test.dart
index f2b7be22f9..b9f1c737e1 100644
--- a/test/view_model_tests/pre_auth_view_models/login_view_model_test.dart
+++ b/test/view_model_tests/pre_auth_view_models/login_view_model_test.dart
@@ -162,7 +162,7 @@ class MockUserConfig extends Mock implements UserConfig {
                 OrgInfo(
                   id: '3',
                   name: 'test org 3',
-                  isPublic: true,
+                  userRegistrationRequired: false,
                   creatorInfo: User(firstName: 'test', lastName: '1'),
                 ),
               ],
diff --git a/test/view_model_tests/pre_auth_view_models/select_organization_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/select_organization_view_model_test.dart
index 7d6770aace..ed8223f16e 100644
--- a/test/view_model_tests/pre_auth_view_models/select_organization_view_model_test.dart
+++ b/test/view_model_tests/pre_auth_view_models/select_organization_view_model_test.dart
@@ -79,7 +79,7 @@ void main() {
     org = OrgInfo(
       id: '3',
       name: 'test org 3',
-      isPublic: true,
+      userRegistrationRequired: false,
       creatorInfo: User(firstName: 'test', lastName: '1'),
     );
     locator.registerSingleton(Queries());
@@ -272,7 +272,8 @@ void main() {

       expect(selectOrganizationViewModel.selectedOrganization, org);
     });
-    testWidgets('Test for successful selectOrg function when org is private',
+    testWidgets(
+        'Test for successful selectOrg function when org requires userRegistration',
         (WidgetTester tester) async {
       locator.registerSingleton<UserConfig>(_MockUserConfig());
       final selectOrganizationViewModel = SelectOrganizationViewModel();
@@ -282,7 +283,7 @@ void main() {
           qrKey: selectOrganizationViewModel.qrKey,
         ),
       );
-      org.isPublic = false;
+      org.userRegistrationRequired = true;
       selectOrganizationViewModel.selectedOrganization = org;

       when(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!)))
@@ -537,7 +538,7 @@ void main() {
     });

     /// we no longer have the tap button to join a org
-    // testWidgets('Test for successful onTapJoin function when isPublic is false',
+    // testWidgets('Test for successful onTapJoin function when userRegistrationRequired is false',
     //     (WidgetTester tester) async {
     //   locator.registerSingleton<UserConfig>(_MockUserConfig());
     //   final selectOrganizationViewModel = SelectOrganizationViewModel();
@@ -548,7 +549,7 @@ void main() {
     //     ),
     //   );
     //
-    //   org.isPublic = false;
+    //   org.userRegistrationRequired = false;
     //   selectOrganizationViewModel.selectedOrganization = org;
     //   _user = User(joinedOrganizations: []);
     //
@@ -583,7 +584,7 @@ void main() {
     //   );
     // });
     // testWidgets(
-    //     'Test for successful onTapJoin function when isPublic is false and joined orgnazation is not empty',
+    //     'Test for successful onTapJoin function when userRegistrationRequired is false and joined orgnazation is not empty',
     //     (WidgetTester tester) async {
     //   locator.registerSingleton<UserConfig>(_MockUserConfig());
     //   final selectOrganizationViewModel = SelectOrganizationViewModel();
@@ -594,7 +595,7 @@ void main() {
     //     ),
     //   );
     //
-    //   org.isPublic = false;
+    //   org.userRegistrationRequired = false;
     //   selectOrganizationViewModel.selectedOrganization = org;
     //   _user = User(joinedOrganizations: [org]);
     //
@@ -630,7 +631,7 @@ void main() {
     //   );
     // });
     // testWidgets(
-    //     'Test for successful onTapJoin function when isPublic is false and result is null',
+    //     'Test for successful onTapJoin function when userRegistrationRequired is false and result is null',
     //     (WidgetTester tester) async {
     //   locator.registerSingleton<UserConfig>(_MockUserConfig());
     //   final selectOrganizationViewModel = SelectOrganizationViewModel();
@@ -641,7 +642,7 @@ void main() {
     //     ),
     //   );
     //
-    //   org.isPublic = false;
+    //   org.userRegistrationRequired = false;
     //   selectOrganizationViewModel.selectedOrganization = org;
     //
     //   when(
@@ -672,7 +673,7 @@ void main() {
     //   );
     // });
     testWidgets(
-        'Test for successful onTapJoin function when isPublic is true and throws exception',
+        'Test for successful onTapJoin function when userRegistrationRequired is false and throws exception',
         (WidgetTester tester) async {
       locator.registerSingleton<UserConfig>(_MockUserConfig());
       final selectOrganizationViewModel = SelectOrganizationViewModel();
@@ -699,7 +700,7 @@ void main() {
       verify(databaseFunctions.gqlAuthMutation(queries.joinOrgById(org.id!)));
     });
     // testWidgets(
-    //     'Test for successful onTapJoin function when isPublic is false and throws exception',
+    //     'Test for successful onTapJoin function when userRegistrationRequired is false and throws exception',
     //     (WidgetTester tester) async {
     //   locator.registerSingleton<UserConfig>(_MockUserConfig());
     //   final selectOrganizationViewModel = SelectOrganizationViewModel();
@@ -709,7 +710,7 @@ void main() {
     //       qrKey: selectOrganizationViewModel.qrKey,
     //     ),
     //   );
-    //   org.isPublic = false;
+    //   org.userRegistrationRequired = false;
     //
     //   selectOrganizationViewModel.selectedOrganization = org;
     //
diff --git a/test/view_model_tests/pre_auth_view_models/signup_details_view_model_test.dart b/test/view_model_tests/pre_auth_view_models/signup_details_view_model_test.dart
index f41bd73534..cfd954522b 100644
--- a/test/view_model_tests/pre_auth_view_models/signup_details_view_model_test.dart
+++ b/test/view_model_tests/pre_auth_view_models/signup_details_view_model_test.dart
@@ -18,7 +18,7 @@ import '../../helpers/test_helpers.dart';

 bool empty = true;
 bool userSaved = true;
-bool isPublic = true;
+bool userRegistrationRequired = false;
 final data = {
   'signUp': {
     'user': {
@@ -51,7 +51,7 @@ class SignUpMock extends StatelessWidget {
 OrgInfo get org => OrgInfo(
       id: '3',
       name: 'test org 3',
-      isPublic: isPublic,
+      userRegistrationRequired: userRegistrationRequired,
       creatorInfo: User(firstName: 'test', lastName: '1'),
     );

@@ -62,7 +62,7 @@ void main() {
     await locator.unregister<UserConfig>();
     userSaved = true;
     empty = true;
-    isPublic = true;
+    userRegistrationRequired = false;
   });
   tearDown(() async {
     await locator.unregister<Queries>();
@@ -286,9 +286,9 @@ void main() {
       );
     });
     testWidgets(
-        'Check if signup() is working fine when selected organization is not public',
+        'Check if signup() is working fine when selected organization requires userRegistration',
         (tester) async {
-      isPublic = false;
+      userRegistrationRequired = true;
       locator.registerSingleton<UserConfig>(MockUserConfig());

       final model = SignupDetailsViewModel();
@@ -465,7 +465,7 @@ void main() {
     testWidgets(
         'Check if signup() is working fine when process of send membership request throws exception',
         (tester) async {
-      isPublic = false;
+      userRegistrationRequired = true;
       locator.registerSingleton<UserConfig>(MockUserConfig());

       final model = SignupDetailsViewModel();
diff --git a/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart b/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart
index aeb9075374..448d301d86 100644
--- a/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart
+++ b/test/views/after_auth_screens/join_org_after_auth_test/join_organisation_after_auth_test.dart
@@ -236,7 +236,7 @@ void main() {
           firstName: "ravidi",
           lastName: "shaikh",
         ),
-        isPublic: false,
+        userRegistrationRequired: true,
       );
       final orgTwo = OrgInfo(
         name: "org_two",
@@ -244,7 +244,7 @@ void main() {
           firstName: "ravidi",
           lastName: "shaikh",
         ),
-        isPublic: false,
+        userRegistrationRequired: true,
       );

       final selectOrgInfoVM = locator.get<SelectOrganizationViewModel>();
diff --git a/test/widget_tests/after_auth_screens/feed/organization_feed_test.dart b/test/widget_tests/after_auth_screens/feed/organization_feed_test.dart
index bc08c8142b..61b92337c6 100644
--- a/test/widget_tests/after_auth_screens/feed/organization_feed_test.dart
+++ b/test/widget_tests/after_auth_screens/feed/organization_feed_test.dart
@@ -55,7 +55,6 @@ Widget createOrganizationFeedScreen({
 // late OrganizationFeedViewModel _organizationFeedViewModel;

 Widget createOrganizationFeedScreen2({
-  bool isPublic = true,
   bool viewOnMap = true,
   required MainScreenViewModel homeModel,
 }) {
diff --git a/test/widget_tests/after_auth_screens/feed/pinned_post_screen_test.dart b/test/widget_tests/after_auth_screens/feed/pinned_post_screen_test.dart
index 3132eac4be..cb47343218 100644
--- a/test/widget_tests/after_auth_screens/feed/pinned_post_screen_test.dart
+++ b/test/widget_tests/after_auth_screens/feed/pinned_post_screen_test.dart
@@ -34,7 +34,7 @@ Widget createApp() {
         final OrgInfo org = OrgInfo(
           id: '2',
           name: 'test org',
-          isPublic: true,
+          userRegistrationRequired: false,
           creatorInfo: User(firstName: 'test', lastName: 'test'),
         );
         print(org);
diff --git a/test/widget_tests/pre_auth_screens/signup_details_test.dart b/test/widget_tests/pre_auth_screens/signup_details_test.dart
index 039466814f..6bbdfede4e 100644
--- a/test/widget_tests/pre_auth_screens/signup_details_test.dart
+++ b/test/widget_tests/pre_auth_screens/signup_details_test.dart
@@ -27,7 +27,7 @@ Widget createApp() {
         final OrgInfo org = OrgInfo(
           id: '2',
           name: 'test org',
-          isPublic: true,
+          userRegistrationRequired: false,
           creatorInfo: User(firstName: 'test', lastName: 'test'),
         );

diff --git a/test/widget_tests/pre_auth_screens/waiting_page_test.dart b/test/widget_tests/pre_auth_screens/waiting_page_test.dart
index 5ec2e8c9b1..2d945e41c2 100644
--- a/test/widget_tests/pre_auth_screens/waiting_page_test.dart
+++ b/test/widget_tests/pre_auth_screens/waiting_page_test.dart
@@ -16,7 +16,7 @@ import 'package:talawa/router.dart' as router;
 import 'package:talawa/services/navigation_service.dart';
 import 'package:talawa/services/size_config.dart';
 import 'package:talawa/utils/app_localization.dart';
-import 'package:talawa/views/pre_auth_screens/waiting_to_join_private_org.dart';
+import 'package:talawa/views/pre_auth_screens/waiting_screen.dart';
 import 'package:talawa/widgets/raised_round_edge_button.dart';
 import 'package:talawa/widgets/rich_text.dart';

diff --git a/test/widget_tests/widgets/custom_list_tile_test.dart b/test/widget_tests/widgets/custom_list_tile_test.dart
index a069faf13c..ffb78db782 100644
--- a/test/widget_tests/widgets/custom_list_tile_test.dart
+++ b/test/widget_tests/widgets/custom_list_tile_test.dart
@@ -90,7 +90,7 @@ void main() {
       bool executed = false;
       _orgInfo = OrgInfo(
         name: 'Test Name',
-        isPublic: true,
+        userRegistrationRequired: false,
         creatorInfo: User(
           firstName: 'Test firstname',
           lastName: 'Test lastname',
@@ -144,7 +144,7 @@ void main() {
         (WidgetTester tester) async {
       _orgInfo = OrgInfo(
         name: 'Test Name',
-        isPublic: false,
+        userRegistrationRequired: true,
         creatorInfo: User(
           firstName: 'Test firstname',
           lastName: 'Test lastname',
@@ -237,7 +237,7 @@ void main() {

       // expect(userSizedBoxFallback, findsOneWidget);

-      // Testing SizedBox for users fallback for isPublic info
+      // Testing SizedBox for users fallback for userRegistrationRequired info
       // final userSizedBoxFallback1 = find
       //     .descendant(
       //       of: find.byType(Expanded).at(1),


fixed fetch events bug

<!--
This section can be deleted after reading.

We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:

- `develop`: For unstable code: New features and bug fixes.
- `master`: Where the stable production ready code lies. Only security related bugs.

NOTE!!!

ONLY SUBMIT PRS AGAINST OUR `DEVELOP` BRANCH. THE DEFAULT IS `MAIN`, SO YOU WILL HAVE TO MODIFY THIS BEFORE SUBMITTING YOUR PR FOR REVIEW. PRS MADE AGAINST `MAIN` WILL BE CLOSED.
-->

<!--
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
-->

**What kind of change does this PR introduce?**

This PR fixes the event fetching bug in explore events page.

**Issue Number:**

Fixes #2307

**Did you add tests for your changes?**

**Snapshots/Videos:**

![Screenshot_20240106-041619](https://github.com/PalisadoesFoundation/talawa/assets/120930148/2d2e4614-a5b2-45d2-91c9-253685bdf3e6)

**If relevant, did you update the documentation?**

<!--Add link to Talawa-Docs.-->

**Summary**

Removed a field name `registrants` from the query which is not actually defined for the Collection `Event` in the `database`.

**Does this PR introduce a breaking change?**

No

**Other information**

<!--Add extra information about this PR here-->

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?**
Yes

Explore Events page is failing to fetch Events.
**Describe the bug**
**Explore Events page not working properly.**
The `Explore Events page` fails to retrieve events from the server, consistently displaying an `empty list message` on the screen despite the` existence of events` in the database.

**To Reproduce**
Steps to reproduce the behavior:

1. Navigate to Explore Events page.
2. Refresh the page / Create an event.

**Expected behavior**
The `created events` / `existing events from database` should be shown on screen in a vertical scrolling fashion.

**Actual behavior**
`empty list` message is being shown always, despite the events present in the database.

**Screenshots**
**Actual**
![Screenshot_20240106-041638](https://github.com/PalisadoesFoundation/talawa/assets/120930148/cbae99e2-06de-401f-96e5-1d98c914645f)

**Expected**
![Screenshot_20240106-041619](https://github.com/PalisadoesFoundation/talawa/assets/120930148/555a838c-c0ea-41a2-9518-33b8af78647b)

**Additional details**
1. The Details of the Event are also not properly being fetched into the `EventCard` and `Event Page`.

**Potential internship candidates**
Please read this if you are planning to apply for a Palisadoes Foundation internship https://github.com/PalisadoesFoundation/talawa/issues/359

@noman2002 @Cioppolo14 @Kevoniat please assign me this issue, I would like to work on this.
https://github.com/PalisadoesFoundation/talawa/issues/2195

This issue already exists and someone is working on it, the reason why events are not getting fetched because of same problem why you cannot create an event which is related to firebase. Right when app initialise if you check debug console you could see graphql exception related to this.
@Dante291 Please understand This issue is different from the issue you have mentioned.
1. The issue you have mentioned solely  focuses on Failure of creating a new event.
2. This issue focuses on failure of fetching the events existing in the database.
3. Try creating an Event through admin panel and then try to find it in explore events page. It's not possible to see the created event in the explore events page
But it's visible in admin panel.
@Azad99-9 This is the exception you get when you try to make a new event

![image](https://github.com/PalisadoesFoundation/talawa/assets/103507835/d8c5b9dd-b8e7-4fb2-9690-b6aa97925f99)

and this is the exception when you fetch events

![image](https://github.com/PalisadoesFoundation/talawa/assets/103507835/72612d25-4658-4cfc-818f-0688e6f8dee1)

which are basically same, this exception is occurring due to some error related to firebase.

You could work on this though, this will resolve both issues ig.

> @Dante291 Please understand This issue is different from the issue you have mentioned.
>
> 1. The issue you have mentioned solely  focuses on Failure of creating a new event.
> 2. This issue focuses on failure of fetching the events existing in the database.
> 3. Try creating an Event through admin panel and then try to find it in explore events page. It's not possible to see the created event in the explore events page
>    But it's visible in admin panel.

Yeah, event is getting created successfully but the main problem is with fetching ig so basically https://github.com/PalisadoesFoundation/talawa/issues/2195 this issue should be about fetching of events is giving exception due to firebase?? maybe this exception is occurring because we are using same query to fetch events just after making a new event (which is created successfully).
> @Dante291 I am working with @Abhisheksainii on this.

I figured out the root cause of the problem by some lil debugging

![Screenshot 2024-01-06 130842](https://github.com/PalisadoesFoundation/talawa/assets/103507835/21d03654-33fc-4226-b9e7-b63178e31191)

![Screenshot 2024-01-06 130820](https://github.com/PalisadoesFoundation/talawa/assets/103507835/52c4a2ca-a791-4bb2-a930-9ae7d6c3e4da)

I think the problem is with fetchOrgEvents query (it is stated as mutation, it should be query not mutation) which may be related to backend side ig.
@Dante291 nice work bro. This will surely help the backend developer to resolve the issue
> @Dante291 nice work bro. This will surely help the backend developer to resolve the issue

No ig the issue is with fetchOrgEvents  query only because in admin portal events are getting fetched successfully, so it might not be a problem related to backend but with the query only, you guys could further work on this to find the main cause and if its the query do update it and ig that will fix the problem.
@Dante291 Yes you are right I solved an issue earlier in which comments were not visible, initially I thought it was backend issue but then I realized  I was able to fetch the comments by just modifying the query. Events can be fetched in a similar way.

diff --git a/lib/utils/event_queries.dart b/lib/utils/event_queries.dart
index 23b06458b5..14c9e82e52 100644
--- a/lib/utils/event_queries.dart
+++ b/lib/utils/event_queries.dart
@@ -1,9 +1,15 @@
-// ignore_for_file: talawa_api_doc
-// ignore_for_file: talawa_good_doc_comments
-
 ///This class creates queries related to the events.
 class EventQueries {
-  //Returns a query to fetch an organization's events
+  /// Fetches events by organization ID.
+  ///
+  /// **params**:
+  /// * `orgId`: The ID of the organization to fetch events for.
+  ///
+  /// **returns**:
+  /// * `String`: Returns a GraphQL query string to fetch events associated with the specified organization ID.
+  ///
+  /// This function generates a GraphQL query string to retrieve events
+  /// based on the provided organization ID.
   String fetchOrgEvents(String orgId) {
     return """
       query {
@@ -34,17 +40,21 @@ class EventQueries {
             firstName
             lastName
           }
-          registrants {
-            user {
-              _id
-            }
-          }
         }
       }
     """;
   }

-  //returns a query to get the registrants of a particular event.
+  /// Fetches registrants by event ID.
+  ///
+  /// **params**:
+  /// * `eventId`: The ID of the event to fetch registrants for.
+  ///
+  /// **returns**:
+  /// * `String`: Returns a GraphQL query string to retrieve registrants associated with the specified event ID.
+  ///
+  /// This function generates a GraphQL query string to fetch registrants
+  /// based on the provided event ID.
   String registrantsByEvent(String eventId) {
     return '''
       query {
@@ -58,7 +68,15 @@ class EventQueries {
     ''';
   }

-  //returns a query to add an event.
+  /// Creates a GraphQL mutation for adding an event.
+  ///
+  /// **params**:
+  ///   None
+  ///
+  /// **returns**:
+  /// * `String`: Returns a GraphQL mutation string to create an event.
+  ///
+  /// This function generates a GraphQL mutation string for creating an event.
   String addEvent() {
     return """
      mutation createEvent( \$organizationId: ID!,
@@ -98,7 +116,15 @@ class EventQueries {
   """;
   }

-  //returns a query to register for an event
+  /// Creates a GraphQL mutation for registering for an event.
+  ///
+  /// **params**:
+  ///   None
+  ///
+  /// **returns**:
+  /// * `String`: Returns a GraphQL mutation string to register for the specified event.
+  ///
+  /// This function generates a GraphQL mutation string for registering an individual for an event.
   String registerForEvent() {
     return """
      mutation registerForEvent(\$eventId: ID!) {
@@ -112,7 +138,16 @@ class EventQueries {
   """;
   }

-  //returns a query to delete an event
+  /// Creates a GraphQL mutation for deleting an event.
+  ///
+  /// **params**:
+  /// * `id`: The ID of the event to delete.
+  ///
+  /// **returns**:
+  /// * `String`: Returns a GraphQL mutation string to delete the specified event.
+  ///
+  /// This function generates a GraphQL mutation string for removing/deleting an event
+  /// based on the provided event ID.
   String deleteEvent(String id) {
     return """
       mutation {
@@ -125,7 +160,19 @@ class EventQueries {
     """;
   }

-  //returns a query to update an event
+  /// Creates a GraphQL mutation for updating an event.
+  ///
+  /// **params**:
+  /// * `eventId`: The ID of the event to update.
+  ///
+  /// **returns**:
+  /// * `String`: Returns a GraphQL mutation string to update the specified event.
+  ///
+  /// This function generates a GraphQL mutation string for updating an event
+  /// based on the provided parameters. It takes the event ID along with updated
+  /// details.
+  /// The mutation updates the event details and returns the ID, title, and description
+  /// of the updated event.
   String updateEvent({
     eventId,
   }) {

diff --git a/test/utils/event_queries_test.dart b/test/utils/event_queries_test.dart
index a3d03a86f4..cb9fe23fe9 100644
--- a/test/utils/event_queries_test.dart
+++ b/test/utils/event_queries_test.dart
@@ -1,6 +1,3 @@
-// ignore_for_file: talawa_api_doc
-// ignore_for_file: talawa_good_doc_comments
-
 import 'package:flutter_test/flutter_test.dart';
 import 'package:talawa/utils/event_queries.dart';

@@ -36,11 +33,6 @@ void main() {
             firstName
             lastName
           }
-          registrants {
-            user {
-              _id
-            }
-          }
         }
       }
     """;


Navigation Services Test Written

<!--
This section can be deleted after reading.

We employ the following branching strategy to simplify the development process and to ensure that only stable code is pushed to the `master` branch:

- `develop`: For unstable code: New features and bug fixes.
- `master`: Where the stable production ready code lies. Only security related bugs.

NOTE!!!

ONLY SUBMIT PRS AGAINST OUR `DEVELOP` BRANCH. THE DEFAULT IS `MAIN`, SO YOU WILL HAVE TO MODIFY THIS BEFORE SUBMITTING YOUR PR FOR REVIEW. PRS MADE AGAINST `MAIN` WILL BE CLOSED.
-->

<!--
Thanks for submitting a pull request! Please provide enough information so that others can review your pull request.
-->

**What kind of change does this PR introduce?**
1) Unit tests written for Navigation Services
2) Code coverage went from 67% to 100%
3) Minor bug fix, `duration` parameter was not being used in `showTalawaErrorSnackBar` method, hence it's duration was always 4 seconds instead of 2 seconds

<!-- E.g. a bugfix, feature, refactoring, etc… -->

**Issue Number:**

Fixes #2158

**Did you add tests for your changes?** Yes

<!--Yes or No. Note: Add unit tests or automation tests for your code.-->

**Snapshots/Videos:**

<!--Add snapshots or videos wherever possible.-->

**If relevant, did you update the documentation?**

<!--Add link to Talawa-Docs.-->

**Summary**

<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->

**Does this PR introduce a breaking change?**

<!-- If this PR introduces a breaking change, please describe the impact and a migration path for existing applications. -->

**Other information**

<!--Add extra information about this PR here-->

**Have you read the [contributing guide](https://github.com/PalisadoesFoundation/talawa/blob/master/CONTRIBUTING.md)?**
Yes
<!--Yes or No-->

Write tests for service navigation_service.dart
The Talawa code base needs to be 100% reliable. This means we need to have 100% unittest code coverage.

We will need unittests done for all methods, classes and functions found in this file.

Any widgets referenced in this file must also have unittests done

```
lib/services/navigation_service.dart
```

The current code coverage for this file can be found here:
-  https://app.codecov.io/gh/PalisadoesFoundation/talawa?displayType=list

This issue did not get any activity in the past 10 days and will be closed in 180 days if no update occurs. Please check if the develop branch has fixed it and report again or close the issue.
@palisadoes @noman2002
Can you assign this issue to me
@Manik2708 Assigned to you, please consider adding a profile picture. It helps us to remember people who are consistently working.

diff --git a/lib/services/navigation_service.dart b/lib/services/navigation_service.dart
index cc177b8d0a..508da99bd9 100644
--- a/lib/services/navigation_service.dart
+++ b/lib/services/navigation_service.dart
@@ -131,6 +131,7 @@ class NavigationService {
           errorMessage: errorMessage,
         ),
         backgroundColor: const Color.fromRGBO(65, 65, 66, 1),
+        duration: duration,
       ),
     );
   }

diff --git a/test/service_tests/navigation_service_test.dart b/test/service_tests/navigation_service_test.dart
new file mode 100644
index 0000000000..13a90a35dd
--- /dev/null
+++ b/test/service_tests/navigation_service_test.dart
@@ -0,0 +1,563 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_localizations/flutter_localizations.dart';
+import 'package:flutter_test/flutter_test.dart';
+import 'package:talawa/enums/enums.dart';
+import 'package:talawa/services/navigation_service.dart';
+import 'package:talawa/services/size_config.dart';
+import 'package:talawa/utils/app_localization.dart';
+import 'package:talawa/widgets/talawa_error_dialog.dart';
+import 'package:talawa/widgets/talawa_error_snackbar.dart';
+
+// This methods tries to cover all the cases which can be there in future!
+Route<dynamic> _onGenerateTestRoute(RouteSettings settings) {
+  if (settings.name == '/second-screen') {
+    if (settings.arguments == null) {
+      return MaterialPageRoute(builder: (context) => const SecondTestScreen());
+    } else {
+      if (settings.arguments is String) {
+        return MaterialPageRoute(
+          builder: (context) => SecondTestScreen(
+            arguments: settings.arguments! as String,
+          ),
+        );
+      } else if (settings.arguments is Function) {
+        return MaterialPageRoute(
+          builder: (context) => SecondTestScreen(
+            onclick: settings.arguments! as VoidCallback,
+          ),
+        );
+      } else if (settings.arguments is Map<String, dynamic>) {
+        final map = settings.arguments! as Map<String, dynamic>;
+        return MaterialPageRoute(
+          builder: (context) => SecondTestScreen(
+            arguments: map['Argument'] as String,
+            onclick: map['Function'] as VoidCallback,
+          ),
+        );
+      }
+    }
+  }
+  if (settings.name == '/first-screen') {
+    if (settings.arguments == null) {
+      return MaterialPageRoute(
+        builder: (context) => FirstTestScreen(
+          onClick: () {},
+        ),
+      );
+    } else {
+      return MaterialPageRoute(
+        builder: (context) => FirstTestScreen(
+          onClick: () {},
+          arguments: settings.arguments! as String,
+        ),
+      );
+    }
+  }
+  if (settings.name == '/third-screen') {
+    if (settings.arguments == null) {
+      return MaterialPageRoute(builder: (context) => const ThirdTestScreen());
+    } else {
+      return MaterialPageRoute(
+        builder: (context) => ThirdTestScreen(
+          arguments: settings.arguments! as String,
+        ),
+      );
+    }
+  }
+  return MaterialPageRoute(
+    builder: (context) => FirstTestScreen(
+      onClick: () {},
+    ),
+  );
+}
+
+class HomeApp extends StatefulWidget {
+  const HomeApp({
+    super.key,
+    required this.onClick,
+    required this.navigateorKey,
+  });
+  final GlobalKey<NavigatorState> navigateorKey;
+  final VoidCallback onClick;
+
+  @override
+  State<HomeApp> createState() => _HomeAppState();
+}
+
+class _HomeAppState extends State<HomeApp> {
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      navigatorKey: widget.navigateorKey,
+      initialRoute: '/',
+      onGenerateRoute: _onGenerateTestRoute,
+      home: FirstTestScreen(
+        onClick: () {
+          widget.onClick();
+        },
+      ),
+    );
+  }
+}
+
+class FirstTestScreen extends StatefulWidget {
+  const FirstTestScreen({super.key, required this.onClick, this.arguments});
+  final VoidCallback onClick;
+  final String? arguments;
+
+  @override
+  State<FirstTestScreen> createState() => _FirstScrenState();
+}
+
+class _FirstScrenState extends State<FirstTestScreen> {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      body: Column(
+        children: [
+          Center(
+            child: ElevatedButton(
+              child: const Text('Button'),
+              onPressed: () {
+                widget.onClick();
+              },
+            ),
+          ),
+          const Text('First Screen'),
+          Center(
+            child: Text(widget.arguments == null ? 'null' : widget.arguments!),
+          ),
+        ],
+      ),
+    );
+  }
+}
+
+class SecondTestScreen extends StatefulWidget {
+  const SecondTestScreen({super.key, this.arguments, this.onclick});
+  final String? arguments;
+  final VoidCallback? onclick;
+
+  @override
+  State<SecondTestScreen> createState() => _SecondTestScreenState();
+}
+
+class _SecondTestScreenState extends State<SecondTestScreen> {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      body: Column(
+        children: [
+          const Center(child: Text('Second Screen')),
+          Center(
+            child: Text(widget.arguments == null ? 'null' : widget.arguments!),
+          ),
+          ElevatedButton(
+            onPressed: () {
+              if (widget.onclick != null) {
+                widget.onclick?.call();
+              }
+            },
+            child: const Text('Button 2'),
+          ),
+        ],
+      ),
+    );
+  }
+}
+
+class ThirdTestScreen extends StatefulWidget {
+  const ThirdTestScreen({super.key, this.arguments});
+  final String? arguments;
+
+  @override
+  State<ThirdTestScreen> createState() => _ThirdTestScreenState();
+}
+
+class _ThirdTestScreenState extends State<ThirdTestScreen> {
+  @override
+  Widget build(BuildContext context) {
+    return Scaffold(
+      body: Column(
+        children: [
+          const Text('Third Screen'),
+          Center(
+            child: Text(widget.arguments == null ? 'null' : widget.arguments!),
+          ),
+        ],
+      ),
+    );
+  }
+}
+
+class TalawaErrorWidget extends StatelessWidget {
+  const TalawaErrorWidget({
+    super.key,
+    required this.navigationService,
+    required this.onClick,
+  });
+  final NavigationService navigationService;
+  final VoidCallback onClick;
+
+  @override
+  Widget build(BuildContext context) {
+    return MaterialApp(
+      navigatorKey: navigationService.navigatorKey,
+      navigatorObservers: [],
+      locale: const Locale('en'),
+      supportedLocales: [
+        const Locale('en', 'US'),
+        const Locale('es', 'ES'),
+        const Locale('fr', 'FR'),
+        const Locale('hi', 'IN'),
+        const Locale('zh', 'CN'),
+        const Locale('de', 'DE'),
+        const Locale('ja', 'JP'),
+        const Locale('pt', 'PT'),
+      ],
+      localizationsDelegates: [
+        const AppLocalizationsDelegate(isTest: true),
+        GlobalMaterialLocalizations.delegate,
+        GlobalWidgetsLocalizations.delegate,
+      ],
+      home: Scaffold(
+        body: TextButton(
+          child: const Text('Open'),
+          onPressed: () {
+            onClick();
+          },
+        ),
+      ),
+    );
+  }
+}
+
+void main() {
+  SizeConfig().test();
+  group('Navigation Services Tests', () {
+    late NavigationService navigationService;
+    late GlobalKey<NavigatorState> mockKey;
+    setUp(() {
+      navigationService = NavigationService();
+      mockKey = navigationService.navigatorKey;
+    });
+    testWidgets('pushScreen() test without arguments',
+        (WidgetTester tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await navigationService.pushScreen('/second-screen');
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(find.textContaining('Second Screen'), findsOneWidget);
+      expect(find.textContaining('null'), findsOneWidget);
+    });
+    testWidgets('pushScreen() test with arguments', (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await navigationService.pushScreen(
+              '/second-screen',
+              arguments: 'Hello Talawa',
+            );
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(find.textContaining('Second Screen'), findsOneWidget);
+      expect(find.textContaining('Hello Talawa'), findsOneWidget);
+    });
+    testWidgets('popAndPushScreen() test without arguments', (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await mockKey.currentState!.pushNamed('/second-screen');
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      final initialPageLength = mockKey.currentState!.widget.pages.length;
+      navigationService.popAndPushScreen('/first-screen');
+      await tester.pumpAndSettle();
+      final finalPageLength = mockKey.currentState!.widget.pages.length;
+      expect(find.textContaining('null'), findsOneWidget);
+      expect(find.textContaining('First Screen'), findsOneWidget);
+      expect(finalPageLength, initialPageLength);
+    });
+    testWidgets('popAndPushScreen() test with arguments', (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await mockKey.currentState!.pushNamed('/second-screen');
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      final initialPageLength = mockKey.currentState!.widget.pages.length;
+      navigationService.popAndPushScreen(
+        '/first-screen',
+        arguments: 'Hello Talawa',
+      );
+      await tester.pumpAndSettle();
+      final finalPageLength = mockKey.currentState!.widget.pages.length;
+      expect(find.textContaining('Hello Talawa'), findsOneWidget);
+      expect(find.textContaining('First Screen'), findsOneWidget);
+      expect(finalPageLength, initialPageLength);
+    });
+    testWidgets('pushReplacementScreen() test without arguments',
+        (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await mockKey.currentState!.pushNamed(
+              '/second-screen',
+              arguments: mockKey.currentState!.pushNamed('/first-screen'),
+            );
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      navigationService.pushReplacementScreen('/first-screen');
+      await tester.pumpAndSettle();
+      expect(find.textContaining('null'), findsOneWidget);
+      expect(find.textContaining('First Screen'), findsOneWidget);
+    });
+    testWidgets('pushReplacementScreen() test with arguments', (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await mockKey.currentState!.pushNamed(
+              '/second-screen',
+              arguments: mockKey.currentState!.pushNamed('/first-screen'),
+            );
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      navigationService.pushReplacementScreen(
+        '/first-screen',
+        arguments: 'Hello Talawa',
+      );
+      await tester.pumpAndSettle();
+      expect(find.textContaining('Hello Talawa'), findsOneWidget);
+      expect(find.textContaining('First Screen'), findsOneWidget);
+    });
+    testWidgets('removeAllAndPush() test without arguments', (tester) async {
+      void functionToTest() {
+        navigationService.removeAllAndPush(
+          '/third-screen',
+          '/second-screen',
+        );
+      }
+
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await mockKey.currentState!.pushNamed(
+              '/second-screen',
+              arguments: functionToTest,
+            );
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(find.textContaining('null'), findsOneWidget);
+      expect(find.textContaining('Third Screen'), findsOneWidget);
+      expect(mockKey.currentState!.widget.pages.length, 0);
+    });
+    testWidgets('removeAllAndPush() test with arguments', (tester) async {
+      void functionToTest() {
+        navigationService.removeAllAndPush(
+          '/third-screen',
+          '/second-screen',
+          arguments: 'Hello Talawa',
+        );
+      }
+
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () async {
+            await mockKey.currentState!.pushNamed(
+              '/second-screen',
+              arguments: functionToTest,
+            );
+          },
+        ),
+      );
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(find.textContaining('Hello Talawa'), findsOneWidget);
+      expect(find.textContaining('Third Screen'), findsOneWidget);
+      expect(mockKey.currentState!.widget.pages.length, 0);
+    });
+    testWidgets('pushDialog() test', (tester) async {
+      Widget testDialog() {
+        return const AlertDialog(
+          title: Text('Test Dialog'),
+          content: Text('This is a test dialog.'),
+        );
+      }
+
+      void functionForOnClick() {
+        navigationService.pushDialog(testDialog());
+      }
+
+      await tester.pumpWidget(
+        HomeApp(navigateorKey: mockKey, onClick: functionForOnClick),
+      );
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(find.byWidget(testDialog()), findsOneWidget);
+      await tester.tap(find.byType(FirstTestScreen), warnIfMissed: false);
+      await tester.pumpAndSettle();
+      expect(find.byWidget(testDialog()), findsOneWidget);
+    });
+    testWidgets('showSnackBar() test with default duration', (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () {
+            navigationService.showSnackBar('Hello Talawa');
+          },
+        ),
+      );
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(find.textContaining('Hello Talawa'), findsOneWidget);
+      final snackBarFinder = find.byType(SnackBar);
+      final snackBarWidget = tester.widget<SnackBar>(snackBarFinder);
+      expect(snackBarWidget.behavior, equals(SnackBarBehavior.floating));
+      expect(snackBarWidget.duration, equals(const Duration(seconds: 2)));
+    });
+    testWidgets('showSnackBar() test with custom duration', (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () {
+            navigationService.showSnackBar(
+              'Hello Talawa',
+              duration: const Duration(seconds: 3),
+            );
+          },
+        ),
+      );
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(find.textContaining('Hello Talawa'), findsOneWidget);
+      final snackBarFinder = find.byType(SnackBar);
+      final snackBarWidget = tester.widget<SnackBar>(snackBarFinder);
+      expect(snackBarWidget.behavior, equals(SnackBarBehavior.floating));
+      expect(snackBarWidget.duration, equals(const Duration(seconds: 3)));
+    });
+    testWidgets('showTalawaErrorSnackBar() test with default duration',
+        (tester) async {
+      await tester.pumpWidget(
+        TalawaErrorWidget(
+          navigationService: navigationService,
+          onClick: () {
+            navigationService.showTalawaErrorSnackBar(
+              'Error Message',
+              MessageType.error,
+            );
+          },
+        ),
+      );
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(TextButton));
+      await tester.pumpAndSettle();
+      expect(find.byType(TalawaErrorSnackBar), findsOneWidget);
+      final snackBarFinder = find.byType(SnackBar);
+      final snackBarWidget = tester.widget<SnackBar>(snackBarFinder);
+      expect(snackBarWidget.duration, equals(const Duration(seconds: 2)));
+      expect(
+        snackBarWidget.backgroundColor,
+        const Color.fromRGBO(65, 65, 66, 1),
+      );
+    });
+    testWidgets('showTalawaErrorSnackBar() test with custom duration',
+        (tester) async {
+      await tester.pumpWidget(
+        TalawaErrorWidget(
+          navigationService: navigationService,
+          onClick: () {
+            navigationService.showTalawaErrorSnackBar(
+              'Error Message',
+              MessageType.error,
+              duration: const Duration(seconds: 3),
+            );
+          },
+        ),
+      );
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(TextButton));
+      await tester.pumpAndSettle();
+      expect(find.byType(TalawaErrorSnackBar), findsOneWidget);
+      final snackBarFinder = find.byType(SnackBar);
+      final snackBarWidget = tester.widget<SnackBar>(snackBarFinder);
+      expect(snackBarWidget.duration, equals(const Duration(seconds: 3)));
+      expect(
+        snackBarWidget.backgroundColor,
+        const Color.fromRGBO(65, 65, 66, 1),
+      );
+    });
+    testWidgets('showTalawaErrorDialog() test with custom duration',
+        (tester) async {
+      await tester.pumpWidget(
+        TalawaErrorWidget(
+          navigationService: navigationService,
+          onClick: () {
+            navigationService.showTalawaErrorDialog(
+              'Hello Talawa',
+              MessageType.error,
+            );
+          },
+        ),
+      );
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(TextButton));
+      await tester.pumpAndSettle();
+      expect(find.byType(TalawaErrorDialog), findsOneWidget);
+      await tester.tap(find.byType(TalawaErrorWidget), warnIfMissed: false);
+      await tester.pumpAndSettle();
+      expect(find.byType(TalawaErrorDialog), findsOneWidget);
+    });
+    testWidgets('pop() method test', (tester) async {
+      await tester.pumpWidget(
+        HomeApp(
+          navigateorKey: mockKey,
+          onClick: () {
+            navigationService.pop();
+          },
+        ),
+      );
+      await tester.pumpAndSettle();
+      await tester.tap(find.byType(ElevatedButton));
+      await tester.pumpAndSettle();
+      expect(mockKey.currentState!.canPop(), false);
+    });
+  });
+}