Rehearsal

Forms: A note on a response stays in its notes panel and out of wp-admin Comments (changes the site)

Rehearsal ID
b22c260
Steps
19
Runs in CI when
packages/forms
Requires plugins
jetpack
Requires theme
Any
Runs as
The logged-in admin
Screen size
Desktop only
Format
2 (shared by a site running Rehearsal 0.21.0)
Shared from
https://freely-silky-stork.jurassic.ninja/ (WordPress 7.1.5 · Theme: Twenty Twenty-Four 1.6 · Akismet Anti-spam: Spam Protection 5.7.2 · Jetpack 16.5-a.5)
For CI
JSON · Playwright test · GitHub block

Install on your site

Your site needs Rehearsal, which comes with the Jurassic Ninja Companion plugin. You'll see the rehearsal again before anything is saved.

{
    "format": 2,
    "requires": [
        "jetpack"
    ],
    "covers": [
        "packages/forms"
    ],
    "viewport": "desktop",
    "timeout": 30000,
    "steps": [
        {
            "goto": "/rehearsal-notes-form/"
        },
        {
            "expect": "form.contact-form button[type=submit]",
            "toBeVisible": true
        },
        {
            "fill": "form.contact-form input[type=text]",
            "value": "Rehearsal {{run}}"
        },
        {
            "click": "form.contact-form button[type=submit]"
        },
        {
            "expectText": "Thank you for your response."
        },
        {
            "goto": "/wp-admin/admin.php?page=jetpack-forms-responses-wp-admin&p=%2Fresponses%2Finbox"
        },
        {
            "click": "[role=checkbox][aria-label=\"Rehearsal {{run}}\"]"
        },
        {
            "expect": ".jp-forms__feedback-comments-heading",
            "toContainText": "Notes"
        },
        {
            "fill": ".jp-forms__feedback-comments-form textarea",
            "value": "Rehearsal note {{run}}"
        },
        {
            "click": ".jp-forms__feedback-comments-form button:has-text(\"Add note\")"
        },
        {
            "expect": ".jp-forms__feedback-comments-list",
            "toContainText": "Rehearsal note {{run}}"
        },
        {
            "goto": "/wp-admin/admin.php?page=jetpack-forms-responses-wp-admin&p=%2Fresponses%2Finbox"
        },
        {
            "click": "[role=checkbox][aria-label=\"Rehearsal {{run}}\"]"
        },
        {
            "expect": ".jp-forms__feedback-comments-heading",
            "toContainText": "Notes"
        },
        {
            "expect": ".jp-forms__feedback-comments-list",
            "toContainText": "Rehearsal note {{run}}"
        },
        {
            "goto": "/wp-admin/edit-comments.php?comment_status=all"
        },
        {
            "expect": "h1",
            "toContainText": "Comments"
        },
        {
            "expect": "#the-comment-list",
            "toContainText": "Rehearsal note {{run}}",
            "not": true
        },
        {
            "expectNoConsoleErrors": true
        }
    ]
}