Automatic tests comment
Tests scenarios
Before going in details, here I want to present you list of our pages
- Home page
/
- Block page
/block/[blockId]
- Transaction page
/transaction/[transactionId]
- Account page
/account/[accountName]
- Witnesses
/witnesses
- Comments
/comments
- Long operation pages
/longOperation/[operationId]
- Error page
/ErrorPage
Every page is in most of their functionalities isolated from other. So you can just start from there and do necessary tests. From time to time we need to check links.
So I'm going to tell you quickly about stuff to tests:
Home page – head block data
Not very much things here, just data from hive.blog (because a lot of stuff here cannot be get properly by our API). Two links, one to witnesses account page, second to block page. Counter of operations and a lot of data in expandable lists.
I suggest checking links and if the list can be expanded.
Home page – witnesses list
Just top 20 witnesses and link to Witnesses page at the end. Nothing important. If you really have too much time you can compare this list with the list on Witnesses page, but I don't think it's necessary.
Home page – searches
This one is crazy big. That's proably the most complicated and nuanced component in the whole app. Let me explain quickly:
- Block search allows to to search block IDs for given property. You can pick some range, user account, operation types and one additional thing in pair: property – value for given operation. The last thing works only if user picks one operation type. After successfull search you can see links to Block page below.
- Account search returns operations, not block ids or accounts. For given account, ranges and operation types it will return operations and link to check this in Account page. If user will type only the account name, it will just return all operations in descending order. The results are paginated. Most of the time it's used to get link to account page, the user can compare context there.
- Comment search return operations related to commenting. It can search them for single user or permlink (or both). It;s very similar to account search, but operations are limited. Also it contains link to Comments page, when you can share your comment search results.
Because this is complicated and full of suprises, you should try to test it a lot. Please notify, that some responses are very slow, especially in comment search.
Home page – last blocks widget
Bar chart to show what's going on with last 20 blocks. It's mostly third part library. You can go to account page of witness clicking pic above bar or to block page clicking bar itself.
I don't think it is very important to test it deeply.
Block page
The whole block page has two parts, but there are so connected to each other, that I decided to describe them both in one section.
Top sections allows you to jump to block, change time and set operation types filter. You can also see details, witness, block time, hashes and operation countes.
The rest is just list of operations. Every operations has short message and few links. It can be expendable to see property.
Please note, that you can use Raw JSON view
toggle in top bar to switch this page data presentation.
Every block should be stable in its presentation, but the data is different between other blocks. I believe we should mostly check navigation, counters and behaviour of our functionalities. Of course we can compere blocks with BE data, but I don't think that's the most important part.
Transaction page
Nothing much to see there, just transaction details and operations list. It may be that there is more than one operation per transaction.
It's all about presentation and Raw JSON.
Account page – account details
In the left section of account page you can see account details. Counter of posts, account creation dates, manabars, and other properties in expandable rows.
I believe the most important part to test are manabars. But in the same time it's rather difficult to create good test case for that.
Account page – operations list
It's more than that – pagination, filters and ranges on top are also a part of this.
You can use all that features to navigate through user's operations. You can filter them, find selected range, go to page of operations history.
It's complicated and deeply connected to URL. I believe we should test it heavy, even on the level of searches. Probably we'll check all ranges and filters working together, maybe even how URL works then.
Comments page
It contains almost the same as comment search with its result, with few differences:
- URL that allows to sharing it with other users.
- It should open results at the start of the search.
I'd be glad for some basic tests for that, especially if URL works correctly and if page shows data after coming from Home page.
Witnesses page
The table in witnesses page is a very simple components. It's non sortable table with link to account page and two dialogs. Nothing much to do here, maybe except comparing if the data is presented at all. The fun is in the dialogs.
Votes History dialog and Voters dialog
Those two dialogs contain important data for given witness.
-
Votes History shows who voted for given witnesses (or who withdrawn votes) and what is the current power of given voter. You can use two ranges to navigate between dates.
-
Voters shows sortable table with voters names and their power. You can switch the unit from vests to hive power.
Please find some way to check if those things work.