Tests - operation in Hive - comment options
Operation: comment_options_operation, // 19
Test cases - comment_operation and comment_options_operation in the same transaction
-
1. User creates a post and updates the default comment option - both operation in the same transaction.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them in the same transaction.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = false.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Test cases - comment_operation and comment_options_operation in the same transaction
-
2. User creates a commant and updates the default comment option - both operation in the same transaction.
Preconditions:
- There are users A and B.
- User B creates a post.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them in the same transaction.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = false.
Expected results:
- RC is reduced.
- The comment is added.
- The new options are applied.
Test cases - comment_operation and comment_options_operation in the different transaction
-
3. User creates a post and updates the default comment option - the operations in the different transactions.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them in the different transaction.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = false.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Test cases - comment_operation and comment_options_operation in the different transaction
-
4. User creates a commant and updates the default comment option - both operation in the different transaction.
Preconditions:
- There are users A and B.
- User B creates a post.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them in the different transaction.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = false.
Test cases - comment_options_operation twice
-
5. User creates a post and updates the default comment option and then updates them one more time.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them. Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Step 2:
User creates the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 70 HBD
- percent_hbd to 30 HBD
- allow_votes = false
- allow_curation_rewards = false.
Expected results:
- RC is reduced.
- The new options are applied.
Test cases - comment_options_operation twice
-
6. User creates a comment and updates the default comment option and then updates them one more time.
Preconditions:
- There are users A and B.
- User B creates a post.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Step 2:
User creates the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 70 HBD.
- percent_hbd to 30 HBD
- allow_votes = false
- allow_curation_rewards = false.
Expected results:
- RC is reduced.
- The new options are applied.
Test cases - comment_options_operation twice - increase max_accepted_payout - impossible
-
7. User creates a post and updates the default comment option and then updates them one more time.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them. Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 120 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation twice - increase max_accepted_payout - impossible
-
8. User creates a comment and updates the default comment option and then updates them one more time.
Preconditions:
- There are users A and B.
- User B creates a post.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 120 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation twice - increase percent_hbd - impossible
-
9. User creates a post and updates the default comment option and then updates them one more time.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them. Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 70 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation twice - increase percent_hbd - impossible
-
10. User creates a comment and updates the default comment option and then updates them one more time.
Preconditions:
- There are users A and B.
- User B creates a post.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 70 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation twice - change allow_votes from false to true - impossible
-
11. User creates a post and updates the default comment option and then updates them one more time.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them. Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = true.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation twice - change allow_votes from false to true - impossible
-
12. User creates a comment and updates the default comment option and then updates them one more time.
Preconditions:
- There are users A and B.
- User B creates a post.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = true.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation twice - change allow_curation_rewards from false to true - impossible
-
13. User creates a post and updates the default comment option and then updates them one more time.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation and broadcasts them. Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = false.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation twice - change allow_curation_rewards from false to true - impossible
-
14. User creates a comment and updates the default comment option and then updates them one more time.
Preconditions:
- There are users A and B.
- User B creates a post.
Steps:
Step 1:
User creates two operations: comment_operation and comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = false.
Step 2:
User tries to create the operation: comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = true
- allow_curation_rewards = true.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - comment_options_operation after a comment
-
15. User creates a post and updates the default comment option after a comment.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post.
Steps:
Step 1:
User A updates the comment option using comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD.
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = false.
Expected results:
- RC is reduced.
- The post is added.
- The new options are applied.
Test cases - comment_options_operation after a comment
-
16. User creates a comment and updates the default comment option after a comment.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comment on a post.
- User A comment on the user B's comment.
Steps:
Step 1:
User B updates the comment option using comment_options_operation.
Using comment_options_operation user changes:
- max_accepted_payout to 100 HBD
- percent_hbd to 50 HBD
- allow_votes = false
- allow_curation_rewards = false.
Test cases - comment_options_operation {percent_hbd} after a vote
-
17. User creates a post and updates {percent_hbd} after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B votes for a post.
Steps:
Step 1:
User A updates {percent_hbd} using comment_options_operation.
Using comment_options_operation user changes:
- percent_hbd to 50 HBD
Expected results:
- RC is reduced.
- The new options are applied.
Test cases - comment_options_operation {percent_hbd} after a vote
-
18. User creates a comment and updates the default comment option after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comment on a post.
- User A votes for user B's comment.
Steps:
Step 1:
User B updates {percent_hbd} using comment_options_operation.
Using comment_options_operation user changes:
- percent_hbd to 50 HBD
Expected results:
- RC is reduced.
- The new options are applied.
Test cases - comment_options_operation after a vote - impossible
-
19. User creates a post and updates {allow_votes} after a vote. -
20. User creates a post and updates {max_accepted_payout} after a vote. -
21. User creates a post and updates {allow_curation_rewards} after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B votes for a post.
Steps:
Step 1:
User A updates using comment_options_operation:
test 19: {allow_votes} = false
test 20: {max_accepted_payout} = 100 HBD
test 21: {allow_curation_rewards} = false
Expected results:
- RC is not reduced.
- The error occurs.
Test cases - comment_options_operation after a vote - impossible
-
22. User creates a comment and updates {allow_votes} after a vote. -
23. User creates a comment and updates {max_accepted_payout} after a vote. -
24. User creates a comment and updates {allow_curation_rewards} after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post.
- User A votes for user B's comment.
Steps:
Step 1:
User B using comment_options_operation:
test 22: {allow_votes} = false
test 23: {max_accepted_payout} = 100 HBD
test 24: {allow_curation_rewards} = false
Expected results:
- RC is not reduced.
- The error occurs.
Test cases - beneficiaries
Test cases
-
25. User creates a post and adds the beneficiary after a comment.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post.
Steps:
Step 1:
User A adds a beneficiary using comment_options_operation.
Expected results:
- RC is reduced.
- The beneficiary is added.
Test cases
-
26. User creates a post and tries to remove the beneficiary after a comment.
Preconditions:
- There are users A and B.
- User A creates a post with beneficiary.
- User B comments on a post.
Steps:
Step 1:
User A tries to remove a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases
-
27. User creates a post and tries to add the another beneficiary after a comment.
Preconditions:
- There are users A and B.
- User A creates a post with beneficiary.
- User B comments on a post.
Steps:
Step 1:
User A tries to add a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases
-
28. User creates a comment and adds the beneficiary after a comment.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post.
- User A comments on a user B's comment.
Steps:
Step 1:
User B adds a beneficiary using comment_options_operation.
Expected results:
- RC is reduced.
- The beneficiary is added.
Test cases
-
29. User creates a comment and tries to remove the beneficiary after a comment.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post (add beneficiary to the comment).
- User A comments on a user B's comment.
Steps:
Step 1:
User B tries to remove a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases
-
30. User creates a comment and adds the another beneficiary after a comment.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post (add beneficiary to the comment).
- User A comments on a user B's comment.
Steps:
Step 1:
User B adds a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- An error occurs.
Test cases - beneficiaries after vote - impossible
Test cases
-
31. User creates a post and adds the beneficiary after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B votes for a post.
Steps:
Step 1:
User A tries to add a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- The error occurs.
Test cases
-
32. User creates a post and removes the beneficiary after a vote.
Preconditions:
- There are users A and B.
- User A creates a post with beneficiary.
- User B votes for a post.
Steps:
Step 1:
User A tries to remove a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- The error occurs.
Test cases
-
33. User creates a post and adds the another beneficiary after a vote.
Preconditions:
- There are users A and B.
- User A creates a post with beneficiary.
- User B votes for a post.
Steps:
Step 1:
User A tries to add a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- The error occurs.
Test cases
-
34. User creates a comment and adds the beneficiary after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post.
- User A votes for a user B's comment.
Steps:
Step 1:
User B tries to add a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- The error occurs.
Test cases
-
35. User creates a comment and removes the beneficiary after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post (add beneficiary to the comment).
- User A votes for a user B's comment.
Steps:
Step 1:
User B tries to remove a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- The error occurs.
Test cases
-
36. User creates a comment and adds the another beneficiary after a vote.
Preconditions:
- There are users A and B.
- User A creates a post.
- User B comments on a post (add beneficiary to the comment).
- User A votes for a user B's comment.
Steps:
Step 1:
User B tries to add a beneficiary using comment_options_operation.
Expected results:
- RC is not reduced.
- The error occurs.