Test-TUI-Governance-voting for witnesses
Test cases related to the functionality Voting for witnesses.
Preconditions:
- There is at least 40 witnesses (witness_01, wintess_02...). The first one should have more voted HP than the second, etc (let me know if it is impossible).
- Each user has:
a. a created profile.
b. enough RC to make a transfer. - Clive is activated.
There are following users:
- User 1 hasn't voted for any witnesses.
- User 2 has voted for two witnesses (witness_02 and witness_03).
- User 3 has voted for 30 witnesses (witness_01 - witness_30).
The each operation should be done in the following way: a. Fast broadcast. b. Finalize transaction. c. Add to cart and then broadcast.
1. Test cases: Vote for one witness.
1.1. User 1 votes for one witness and then broadcast it (a/b/c).
1.2. User 2 votes for one witness and then broadcast it (a/b/c).
1.3. User 3 tries to vote for one witness - validation doesn't allow it.
2. Test cases: Remove a vote for one witness.
2.1. User 2 removes a vote for one witness and then broadcast it (a/b/c).
2.2. User 3 removes a vote for one witness and then broadcast it (a/b/c).
3. Test cases: Add and remove votes for witnesses.
3.1. User 1 votes for the first 30 witnesses and then broadcast the transaction (a/b/c).
3.2. User 2 votes for two witnesses (witness_04 and witness_05) and removes vote for witness_02 and then broadcast the transaction (a/b/c).
3.3. User 3 removes votes for all witnesses and votes for then witnesses that he hasn't voted before and then broadcast the transaction (a/b/c).
4. Test cases: Pending operations (cart).
4.1. User votes for the witnesses one by one.
Steps:
- User 1 votes for one witness and adds the operation to the cart.
- User 1 goes back to the Witness View (Check of the operation is pending).
- User 1 votes for two witnesses and adds the operations to the cart.
- User 1 broadcasts the transaction with 3 operations.
4.2. User removes an operation from cart.
Steps:
- User 2 votes for two witnesses and adds the operations to the cart.
- User 2 goes to the cart and removes one of the operation.
- User 2 goes back to the Witness View (Check of the only one operation is pending).
- User 2 broadcasts the transaction with 1 operation.
4.3. User removes votes for the witnesses one by one.
Steps:
- User 3 removes votes for two witnesses and adds the operation to the cart.
- User 3 goes back to the Witness View (Check of the operation is pending).
- User 3 removes votes for two witnesses and adds the operations to the cart.
- User 3 goes to the cart and removes one operation.
- User 3 broadcasts the transaction with three operations.
5. Test cases: Cart and other way of broadcast.
5.1. Cart and fast broadcast - User 2 has operations in the cart and fast broadcast another operations.
Steps:
- User 2 votes for witnesses: witness_04 and witness_05 and adds the operations to the cart.
- User 2 goes to the Witness View, removes the vote for wintess_02 and fast broadcasts it.
- To check:
a. Operations vote for wintess_04 and witness_05 are still pending.
b. Operation vote for wintess_02 was broadcast.
5.2. Cart and finalize transaction - User 1 has operations in the cart and then finalize transaction.
Steps:
- User 1 votes for witnesses: witness_04 and witness_05 and adds the operations to the cart.
- User 1 goes to the Witness View, adds the vote for wintess_02 and finalize transaction.
- To check:
a. Operations vote for witness_02, wintess_04 and witness_05 were broadcast.
6. Test cases: Check if the sorting is correct.
- For user 2. The order should be: witness_02, witness_03 and then witness_01 and witness_04 etc.
7. Test cases: Check the pages of the witnesses list - vote for the last witness.
7.1. User 1 votes for the last witness.
Steps:
- User 1 is on the Witness View.
- User 1 goes to the next page of the list of witnesses.
- User 1 votes for the witness_40 (the last on the list).
- User 1 broadcasts the transaction.
8. Test cases: Searching the witnesses.
8.1. User 2: Search 'witness_01' - Should be one result 'witness_01'.
Check that 'Clear' removes the results.
8.2. User 2: Search 'witness_1' - should be 10 results.
9. Test cases: Check if the witness details are displayed
9.1. Check if all information about witness are displayed:
a. Time of the query,
b. url,
c. Created,
d. Missed blocks,
e. price feed,
f. version.