Skip to content

Tests: Cover front-end comment submission in admin E2E - #15729

Closed
shail-mehta wants to merge 3 commits into
WordPress:trunkfrom
shail-mehta:tests/52895-comments-frontend-e2e
Closed

shail-mehta wants to merge 3 commits into
WordPress:trunkfrom
shail-mehta:tests/52895-comments-frontend-e2e

Conversation

@shail-mehta

Copy link
Copy Markdown
Member

Trac ticket: #52895

Adds Comments e2e coverage from ticket #52895.

What

  • Creates a published post with comments open
  • Views the post on the front end
  • Submits a comment through the comment form
  • Asserts the comment appears on the Comments admin screen

Why

Ticket #52895 says for Comments: create a post, view it, add a comment, and check that it displays on the comments page.

How

New Playwright spec: tests/e2e/specs/comments.test.js. Post creation and cleanup use the REST API; the comment is submitted through the front-end form while logged in as admin.

Testing instructions

  1. Start the local environment if needed: npm run env:start
  2. Run: npm run test:e2e -- tests/e2e/specs/comments.test.js
  3. Confirm the test passes and the fixture post is removed afterward

Use of AI Tools

  • Cursor

Adds coverage from #52895 for creating a post, viewing it, submitting a comment, and checking the Comments screen.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The comment textarea locator expects the exact label Comment, but the form uses Comment *, causing the test to time out before submitting a comment.

1 open issue
What changed in this PR

Adds Playwright coverage for front-end comment submission and verification in the Comments admin screen, addressing the Comments workflow described in ticket #52895.

Changes:

  • Creates a published post with comments enabled and removes it after the test.
  • Submits a unique comment through the front-end form as an administrator.
  • Checks the saved comment through REST and verifies its content in the admin list.
File Description
tests/​e2e/​specs/​comments.test.js Adds the comment submission workflow, persistence checks, admin verification, and fixture cleanup.

Review effort: Balanced

Comment thread tests/e2e/specs/comments.test.js Resolved
shail-mehta and others added 2 commits November 6, 2026 20:49
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the added end-to-end comment submission coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@shail-mehta
shail-mehta marked this pull request as ready for review November 6, 2026 16:00
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

Core Committers: Use this line as a base for the props when committing in SVN:

Props shailu25.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@lancewillett lancewillett left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Posting a comment from the front end is not covered yet (moderate-comments.test.js creates its comments through REST), and the test checks both the saved comment and its row in Comments.

AI review · claude-opus-5-5

@lancewillett lancewillett moved this from Backlog to In review in WordPress Project Build Tooling Nov 6, 2026
wporg-sync pushed a commit that referenced this pull request Nov 6, 2026
Post a comment through the comment form on a published post. Check that the comment is saved and approved, and that it appears in the Comments screen.

Developed in: #15729

Props shailu25.
See #52895.


git-svn-id: https://develop.svn.wordpress.org/trunk@65323 602fd350-edb4-49c9-b593-d223f7449a82
@lancewillett

Copy link
Copy Markdown
Member

@github-project-automation github-project-automation Bot moved this from In review to Done in WordPress Project Build Tooling Nov 6, 2026
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Nov 6, 2026
Post a comment through the comment form on a published post. Check that the comment is saved and approved, and that it appears in the Comments screen.

Developed in: WordPress/wordpress-develop#15729

Props shailu25.
See #52895.

Built from https://develop.svn.wordpress.org/trunk@65323


git-svn-id: http://core.svn.wordpress.org/trunk@64463 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants