UCF-CEN-5016 / sde-development-project-acv_trio

sde-development-project-acv_trio created by GitHub Classroom
GNU General Public License v3.0
0 stars 0 forks source link

Implement test cases for Account Type Visibility on Profile, User List, and Posts #25

Closed Aishwaryasri15 closed 6 months ago

Aishwaryasri15 commented 6 months ago

Description:

We need to implement test cases to ensure proper visibility of user account types across various sections of the platform, including the user profile, user list, and posts.

Test Cases:

Unit Test Cases:

  1. Profile Page Account Type Display Test:

    • Mock the profile page component.
    • Set up a test user with a known account type.
    • Render the profile page with the test user's data.
    • Assert that the account type is displayed correctly on the profile page.
  2. User List Account Type Display Test:

    • Mock the user list component.
    • Create mock user data with various account types.
    • Render the user list with the mock user data.
    • Assert that the account type is displayed correctly for each user in the user list.
  3. Post Template Account Type Display Test:

    • Mock the post template component.
    • Set up a test post with a known user and account type.
    • Render the post template with the test post data.
    • Assert that the account type is displayed correctly beside the user's username in the post template.
  4. Account Type Display Consistency Test:

    • Mock various components (profile page, user list, post template).
    • Use the same mock user data across all components.
    • Render each component separately with the mock user data.
    • Assert that the account type is consistently displayed across all components for each user.
  5. User Authentication and Account Type Retrieval Test:

    • Mock the user authentication service.
    • Simulate user authentication with different account types.
    • Ensure that the correct account type is retrieved for each authenticated user.
  6. Styling and Formatting Test:

    • Test the CSS classes associated with the account type display.
    • Ensure that the styling (alignment, margin, font size) is applied correctly for visibility and readability.

These unit test cases ensure that the account type display functionality works as expected across different components of the platform, maintains consistency, and adheres to styling conventions.

Manual Test Cases

  1. Profile Page Account Type Visibility:

    • Verify that the account type associated with the user is displayed prominently on the profile page.
    • Check that the account type is presented in a readable format and aligned properly with the user's information.
    • Ensure that the account type is visible to users accessing their own profiles as well as to other users viewing their profiles.
  2. User List Account Type Visibility:

    • Confirm that the account type is visible next to each user's name in the user list.
    • Check that the account type is displayed consistently across different user lists, such as online users, recent users, etc.
    • Ensure that the account type display does not disrupt the layout or readability of the user list.
  3. Post Template Account Type Visibility:

    • Validate that the account type is shown alongside the username in post templates.
    • Check that the account type is displayed uniformly across various types of posts, including replies, comments, and original posts.
    • Ensure that the account type display is consistent with the styling and formatting of other user-related information in the post template.

Acceptance Criteria:

Dependencies:

  1. Mocking Framework: Utilization of a mocking framework such as Jest or Sinon to mock components and services for isolated testing.
  2. User Authentication Service: Availability of a mocked user authentication service to simulate user authentication with different account types.
  3. Sample User Data: Provision of mock user data with various account types to facilitate testing of the display functionality across different components.
  4. CSS Styling: Assurance that CSS styling for the account type display remains consistent and correctly applied across all components, as changes may impact the accuracy of unit tests.
  5. Integration with Testing Environment: Integration of unit tests with the testing environment and setup of testing infrastructure (e.g., test runners, test suites) to effectively execute the unit test cases.
  6. Development Environment: Establishment of the development environment with necessary tools and dependencies for writing and running unit tests, including libraries like React Testing Library or Enzyme for testing React components.
  7. Version Control: Implementation of version control (e.g., Git) to manage changes to code and test files, facilitating collaboration and tracking of modifications related to unit testing.

Effort: High

Aishwaryasri15 commented 6 months ago

Due to time constraints, manual testing was conducted for the implementation of Account Type Visibility on Profile, User List, and Posts. The testing procedure involved verifying the visibility and functionality of the account type display across these sections of the platform. Below is the detailed procedure for conducting manual testing:

Description

As a developer, the goal is to implement test cases for the visibility of the account type on the profile, user list, and posts. This enhancement aims to ensure that the account type associated with each user is prominently displayed across different sections of the platform, including user profiles, user lists, and post templates. By verifying the visibility and functionality of the account type display, we ensure consistency and accuracy in presenting user information, thereby improving user identification and engagement within the community.

Installation and Usage

  1. First clone the project:

    git clone https://github.com/UCF-CEN-5016/sde-development-project-acv_trio.git
  2. Once the project is cloned, ensure npm is updated:

    npm install
  3. Start the Redis server:

    redis-server
  4. Setup NodeBB:

    ./nodebb setup
  5. Start NodeBB:

    ./nodebb start
  6. Open the webpage with the URL: http://localhost:4567/

Where to See Changes

To see the changes, open the URL http://localhost:4567/ and follow these steps:

Procedure for Manual Testing

  1. Profile Page Testing:

    • Log in to the platform using the provided login credentials.
    • Click on the profile icon located on the page.
    • A small page should appear; proceed to click on the username within this page.
    • You will be redirected to the user's profile page.
    • On the profile page, locate the section displaying the user's name.
    • Beneath the user's name, the account type associated with the user should be visible.
  2. User List Testing:

  1. Post Template Testing:
    • Log in to the platform using the provided login credentials.
    • Navigate to the home page.
    • Click on the "Announcements" section.
    • Choose any post from the list displayed.
    • In the post details or comments section, the account type of the user who made the post or comment should be visible beside their username.

By conducting thorough manual testing based on the outlined test cases, we can validate the implementation of the account type visibility feature across the profile, user list, and post templates, ensuring a seamless and consistent user experience on the platform.