You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scenario: User edits a comment
Given I am logged in
When I edit a comment
Then the edited comment appears in the list of comments
And I see the updated content in the comment
Ensure User is Logged In
Navigate to the login page: /login.
Enter the username in the "Email" input field: user@example.com.
Enter the password in the "Password" input field: password123.
Click the "Login" button.
Navigate to the Comments Page
After logging in, go to the comments page: /comments-page.
Locate the Comment to Edit
Find the comment you want to edit in the list of comments: .comment-item.
Ensure the comment contains the text: "This is a test comment".
Enter Edit Mode
Click the "Edit" button next to the comment: button contains "Edit".
Edit the Comment
Locate the textarea: textarea[placeholder="Add comment here"].
Clear the existing comment text and enter new text: "This is the updated test comment".
Submit the Edited Comment
Click the "Update" button: button[type="submit"] contains "Update".
Verify Comment Update
Check that the updated comment appears in the list: .comments-list.
Ensure the updated comment text is present: .comments-list contains "This is the updated test comment".
Check for Edit and Delete Buttons
Locate the newly updated comment item: .comment-item.
Within the updated comment, check for the "Edit" button: button contains "Edit".
Check for the "Delete" button: button contains "Delete".
The text was updated successfully, but these errors were encountered:
Feature: Comment editing
Scenario: User edits a comment
Given I am logged in
When I edit a comment
Then the edited comment appears in the list of comments
And I see the updated content in the comment
Ensure User is Logged In
/login
.user@example.com
.password123
.Navigate to the Comments Page
/comments-page
.Locate the Comment to Edit
.comment-item
.Enter Edit Mode
button
contains "Edit".Edit the Comment
textarea[placeholder="Add comment here"]
.Submit the Edited Comment
button[type="submit"]
contains "Update".Verify Comment Update
.comments-list
..comments-list
contains "This is the updated test comment".Check for Edit and Delete Buttons
.comment-item
.button
contains "Edit".button
contains "Delete".The text was updated successfully, but these errors were encountered: