Kiwi icon indicating copy to clipboard operation
Kiwi copied to clipboard

Render Individual test case health on test case page

Open asankov opened this issue 3 years ago • 6 comments

This will be used to render individual test case health widget

asankov avatar Mar 03 '21 21:03 asankov

@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

asankov avatar Jul 31 '21 15:07 asankov

@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

asankov avatar Aug 18 '21 17:08 asankov

Push whatever you have and I will review as soon as I can

atodorov avatar Aug 18 '21 17:08 atodorov

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 Screenshot_2021-08-19 Kiwi TCMS - TC-1 Login with valid credentials works

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
    }
  ]
}

atodorov avatar Aug 19 '21 14:08 atodorov

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

asankov avatar Sep 07 '21 20:09 asankov

First commit without UI patches cherry-picked as part of https://github.com/kiwitcms/Kiwi/pull/2537

atodorov avatar Sep 20 '21 16:09 atodorov