Kiwi
Kiwi copied to clipboard
Render Individual test case health on test case page
This will be used to render individual test case health widget
@atodorov PTAL.
since they last time I worked on this was few months ago I lost context. I made the API as simple as possible and transfered all counting logic on the UI side + I wrote a ugly minimalistic UI so that we have a notion of how the data is going to be used.
let's start with this and as discuss the necessary changes to make the API a bit less generic, but still reusable between the TC and TP page
@atodorov do you need more input for me on this, or should I just wait for you to get to it? I have started working on the UI for the test run page and I can push that as well, if you want
Push whatever you have and I will review as soon as I can
Also I think I am seeing a bug here. See how the widgets look like on the page. The numbers/data doesn't correspond to reality
The request on this page is:
{"jsonrpc":"2.0","method":"Testing.individual_test_case_health","params":[{"case_id":1}],"id":"jsonrpc"}
and the response is
{
"id": "jsonrpc",
"jsonrpc": "2.0",
"result": [
{
"run__plan": 1,
"case_id": 1,
"status__name": "BLOCKED",
"status__weight": -10
},
{
"run__plan": 1,
"case_id": 1,
"status__name": "PASSED",
"status__weight": 20
},
{
"run__plan": 1,
"case_id": 1,
"status__name": "PASSED",
"status__weight": 20
},
{
"run__plan": 4,
"case_id": 1,
"status__name": "IDLE",
"status__weight": 0
}
]
}
With the latest commit I am still seeing the same as in #2277 (comment) which is a bug. The progress bars are totally different than the actual counts.
the last commit should fix the calculation logic. let's discuss the UI after this is resolved. I think it makes sense to make the UI similar to the one in Execution trends
First commit without UI patches cherry-picked as part of https://github.com/kiwitcms/Kiwi/pull/2537