Skip to content

Commit

Permalink
Add explanation why the fix for #3367 works and what the root cause is
Browse files Browse the repository at this point in the history
  • Loading branch information
atodorov committed Nov 29, 2023
1 parent 49f1e87 commit 24672fb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tcms/testruns/static/testruns/js/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,13 @@ function renderAdditionalInformation (testRunId, execution) {

for (const testCase of testCases) {
let rowSelector = `.test-execution-case-${testCase.id}`
// Preferably operate over the exact execution row to prevent
// appending new HTML onto existing values, e.g. Tags. See #3367
//
// Root cause of the bug in #3367 is that some fields contain icons
// and pre-existing HTML coming from the template and we can't call .empty()
// on them. When such TE is parametrized then there are multiple HTML rows
// matching `rowSelector`/`testCase.id`, therefore the UI is appended to many times!
if (execution) {
rowSelector += `.test-execution-${execution.id}`
}
Expand Down

0 comments on commit 24672fb

Please sign in to comment.