Skip to content

5.1.5 E2E-MOD-006 Report Content Workflow #394

Description

@flyblackbox

5.1.5 E2E-MOD-006 Report Content Workflow

Summary

Add Playwright end-to-end coverage for the content reporting workflow.

This test should confirm that a logged-in user can report content that may violate platform rules, choose a report reason, submit the report, and receive a clear confirmation. The test should also confirm that duplicate reports are handled gracefully.

User Story

As a user, I want to report content that violates rules.

Test Metadata

Field Value
Test ID E2E-MOD-006
Feature Area Moderation
Scenario Report Content Workflow
Priority P1
Actor Registered User
Auth State Logged in
Required Account authorUser
Required Data Public post or comment
Viewports Desktop, Mobile
Suggested Spec File moderation.spec.ts
Source Quote Vote User Stories

Test Steps

  1. Log in as authorUser.
  2. Navigate to a public post or comment that can be reported.
  3. Open the report action.
  4. Select a report reason.
  5. Submit the report.
  6. Confirm that a report confirmation appears.
  7. Attempt to report the same content again.
  8. Confirm that duplicate reporting is handled gracefully.

Expected Result

The user can report content successfully.

The application should:

  • Open the report flow from reportable content
  • Allow the user to select a report reason
  • Submit the report without errors
  • Show a clear confirmation message
  • Prevent duplicate reports or display a clear message if the content was already reported
  • Preserve the user's current context after submission

Required Assertions

  • Reportable content loads successfully
  • Report action is visible and accessible
  • Report dialog or menu opens
  • Report reason can be selected
  • Submit button becomes available when required fields are valid
  • Report submission completes successfully
  • Confirmation message appears
  • Duplicate report attempt does not create confusing or broken behavior
  • No runtime error or generic error toast appears

Suggested Selectors

Use stable data-testid selectors where possible:

  • [data-testid="post-card"]
  • [data-testid="comment-card"]
  • [data-testid="report-button"]
  • [data-testid="report-dialog"]
  • [data-testid="report-reason-option"]
  • [data-testid="report-submit-button"]
  • [data-testid="report-confirmation"]
  • [data-testid="report-duplicate-message"]

If these selectors do not exist yet, add them as part of the test implementation.

Out of Scope

This issue does not need to test:

  • Moderator review queue behavior
  • Moderator removal decisions
  • Content deletion
  • User suspension
  • Report notification delivery
  • Admin-only moderation tools

Those workflows should be covered by separate moderation or admin test issues.

Acceptance Criteria

  • Playwright test exists for reporting content
  • Test logs in as authorUser
  • Test opens report flow from a public post or comment
  • Test selects a report reason
  • Test submits the report
  • Test verifies confirmation appears
  • Test verifies duplicate reporting is handled gracefully
  • Test runs on desktop and mobile Playwright projects
  • Test passes locally and in CI

Test Instructions

Run all Playwright tests:

npx playwright test

Run only moderation tests:

npx playwright test moderation.spec.ts

Run in headed mode for debugging:

npx playwright test moderation.spec.ts --headed

Labels

testing e2e playwright moderation reporting frontend p1

Metadata

Metadata

Assignees

Labels

Not Readynot ready to be assigned.enhancementNew feature or request

Type

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions