Tests - operation in Hive - delete comment
Operation: delete_comment_operation, // 17
Test cases
-
1. User deletes a post without comments, votes and downvotes. -
2. User deletes a comment without comments, votes and downvotes.
Preconditions (test 1 and 2):
- test 1 - there is a post without comments, votes and downvotes.
- test 2 - there is a comment without comments, votes and downvotes.
Steps:
Step 1: User deletes a post/a comment.
Expected results:
- After operation: RC is reduced.
- After operation: User tries to vote for the deleting post/comment but the error occurs.
Test cases
-
3. User deletes a post without comments, votes but with downvotes. -
4. User deletes a comment without comments, votes but with downvotes.
Preconditions (test 3 and 4):
- test 3 - there is a post without comments, votes, but with downvotes.
- test 4 - there is a comment without comments, votes, but with downvotes.
Steps (test 3 and 4):
Step 1: User deletes a post/a comment.
Expected results:
- After operation: RC is reduced.
- After operation: User tries to vote for the deleting post/comment but the error occurs.
Test cases
-
5. User tries to delete a post without comments, but with votes. -
6. User tries to delete a comment without comments, but with votes.
Remark:
The post/comment with votes cannot be deleted.
Preconditions (test 5 and 6):
- test 5 - there is a post without comments, but with votes.
- test 6 - there is a comment without comments, but with votes.
Steps (test 5 and 6):
Step 1: User deletes a post/a comment (creates operation delete_comment_operation).
Expected results:
- The operation fails - the error occurs.
Test cases
-
7. User tries to delete a post with comments. -
8. User tries to delete a comment with comments.
Remark:
The post/comment with comments cannot be deleted.
Preconditions (test 7 and 8):
- test 7 - there is a post with comments.
- test 8 - there is a comment with comments.
Steps (test 7 and 8):
Step 1: User deletes a post/a comment (creates operation delete_comment_operation).
Expected results:
- The operation fails - the error occurs.
Test cases
-
9. User tries to delete an already paid out post. -
10. User tries to delete an already paid out comments.
Remark:
The post/comment paid out cannot be deleted.
Preconditions (test 9 and 10):
- test 9 - there is a paid out post (so it has a votes).
- test 10 - there is a paid out comment (so it has a votes).
Steps (test 9 and 10):
Step 1: User deletes a post/a comment (creates operation delete_comment_operation).
Expected results:
- The operation fails - the error occurs.
Test cases
-
11. User reuses a deleted permlink of the post. -
12. User reuses a deleted permlink of the comment.
Preconditions (test 11 and 12):
- test 11 - there is a post without comments, votes and downvotes.
- test 12 - there is a comment without comments, votes and downvotes.
Steps:
Step 1: User deletes a post/a comment.
Expected results:
- After operation: RC is reduced.
- After operation: User tries to vote for the deleting post/comment but the error occurs.
Step 2: User created a post/a comment using the deleted permlink.
Expected results:
- After operation: After operation: The post/a comment is published.
- After operation: RC is reduced.
Edited by Radosław Masłowski