Skip to content

UserGuide.md: Jerry -> View All Category #89

Description

@jarchenn

Name of Feature: Email Notification

Link to the related user story and pull request(s)

Manual Testing

Detailed instructions on how to use and user test your new feature

  1. Download the .env file from the shared google drive, and add it to the root directory.

  2. Run ./nodebb setup

  3. Run npm install

  4. Run ./nodebb dev

  5. Log in as admin using username=admin and password=password123!. image

  6. Create a Few Sample Topics and Posts Per Topic in Each of the Categories for Testing

Image
  1. Ensure the Topics and Posts Per Category correctly Sum to the Values Displayed in the View All Category on the Homepage.
Image
  1. Select the View All Category, and ensure that all of the Sample Topics are Displayed in the List of All Topics (I created 7 in this example, and 7 Topics populate the View All Category)
Image
  1. As an Example to Test Deletion and How it Affects the View All Category, I deleted all Topics in Announcements.
Image
  1. Verify the Topics you Deleted are Now Grayed Out in the View All Category Tab
Image

Automated Tests

Link/description of where your added automated tests can be found

Description of what is being tested and why you believe the tests are sufficient for covering the changes that you have made

What is being tested

  • Synthetic "View All" category aggregation:Confirms that the system correctly exposes a synthetic “View All” category and that the aggregate topic and post counts reflect all visible categories. This ensures that the API dynamically builds and updates the overall forum view.
  • Rendering via the recent controller: Verifies that the /api/category/all endpoint correctly renders the “View All” category using the recent template, confirming that the routing and rendering logic integrate properly with the new aggregate category.
  • Privilege handling in aggregates: Tests that categories without the find privilege are excluded from the “View All” aggregates, preventing restricted or private content from being counted or displayed in aggregate statistics.
  • Teaser behavior for latest visible activity: Checks that the “View All” teaser corresponds to the most recent visible topic across categories. By mocking timestamps with MockDate, the test ensures that teaser logic prioritizes the newest valid topic, even when categories are created at different times.

###Why these tests are sufficient
These tests collectively ensure that the “View All” category feature behaves as intended across the full range of functional, security, and temporal scenarios. They verify correct data aggregation, ensuring that topic and post counts are accurate and update dynamically as new content is created.
They confirm robust privilege enforcement, validating that restricted categories remain invisible in the aggregate view to users lacking access. They test UI consistency and rendering, ensuring that the /api/category/all endpoint serves the expected data model and template for front-end use.
Finally, the teaser test introduces time-sensitive validation, confirming that the displayed teaser always represents the latest available activity. Together, these test cases provide comprehensive coverage for correctness, security, and reliability of the “View All” category aggregation system.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions