Skip to content

Test user standard_user sees zero posts in category page #1566

@trichoplax

Description

@trichoplax

Describe the bug
The test database has 7 posts in the Main category. All of the other test users see these 7 posts, and the 7 posts are visible when logged out. However, standard_user sees zero posts, and also does not see new posts added during tests to the Meta category.

To Reproduce
To see that basic_user can see the 7 posts, run the following in a system test:

    category = categories(:main)
    log_in :basic_user
    visit category_path(category)
    assert_text 'Nonexistent to force screenshot'

To see that standard_user can see zero posts, run the following in a system test:

    category = categories(:main)
    log_in :standard_user
    visit category_path(category)
    assert_text 'Nonexistent to force screenshot'

In either case the deliberate failure when running the test lists the location a screenshot has been saved to. These are also included below under "Screenshots".

Expected behavior
The 7 posts, along with any new posts added during a test, should be visible to standard_user on the relevant category page. If there is a deliberate reason for standard_user to not see posts, this should be reflected in the username to avoid confusion when writing or amending tests.

Screenshots
Main category for basic_user:
Main category for basic_user showing 7 posts

Main category for standard_user:
Main category for standard_user showing 0 posts

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: testingChanges to testing infrastructure

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions