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
- Log in as
authorUser.
- Navigate to a public post or comment that can be reported.
- Open the report action.
- Select a report reason.
- Submit the report.
- Confirm that a report confirmation appears.
- Attempt to report the same content again.
- 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
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
E2E-MOD-006P1authorUsermoderation.spec.tsTest Steps
authorUser.Expected Result
The user can report content successfully.
The application should:
Required Assertions
Suggested Selectors
Use stable
data-testidselectors 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:
Those workflows should be covered by separate moderation or admin test issues.
Acceptance Criteria
authorUserTest Instructions
Run all Playwright tests:
npx playwright testRun only moderation tests:
npx playwright test moderation.spec.tsRun in headed mode for debugging:
npx playwright test moderation.spec.ts --headedLabels
testinge2eplaywrightmoderationreportingfrontendp1