Skip to content

Commit 83e18bd

Browse files
authored
Fix for duplicated icons in test result visualizer. (#1691)
Fixes #1678
1 parent 7d7d46b commit 83e18bd

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

Actions/AnalyzeTests/TestResultAnalyzer.ps1

+11-6
Original file line numberDiff line numberDiff line change
@@ -23,27 +23,32 @@ function BuildTestMarkdownTable {
2323
[hashtable] $resultIcons
2424
)
2525

26+
$mdTableRows = [System.Collections.ArrayList]@()
2627
$mdTableSB = [System.Text.StringBuilder]::new()
2728

2829
foreach($row in $Rows) {
29-
Write-Host $row
30+
$row -join ',' | Out-Host
31+
$formattedRow = @()
3032
for($i=0; $i -lt $row.Length; $i++) {
3133
#If resultIcons has a key for this column, we want to display an emoji for values > 0 and an empty cell for 0
3234
if ($resultIcons.ContainsKey($i)) {
3335
if ($row[$i] -gt 0) {
34-
$row[$i] = "$($row[$i])$($resultIcons[$i])"
36+
$formattedRow += "$($row[$i])$($resultIcons[$i])"
3537
}
3638
else {
37-
$row[$i] = $null
39+
$formattedRow += ""
3840
}
41+
} else {
42+
$formattedRow += "$($row[$i])"
3943
}
4044
}
41-
Write-Host $row
45+
$mdTableRows.Add($formattedRow) | Out-Null
46+
"|$($formattedRow -join '|')|" | Out-Host
4247
}
4348

4449
$mdTable = ''
4550
try {
46-
$mdTable = Build-MarkdownTable -Headers $Headers -Rows $Rows
51+
$mdTable = Build-MarkdownTable -Headers $Headers -Rows $mdTableRows
4752
} catch {
4853
$mdTable = "<i>Failed to generate result table</i>"
4954
}
@@ -198,8 +203,8 @@ function GetTestResultSummaryMD {
198203
}
199204
$failuresSB = BuildHTMLFailureSummary -rootFailureNode $rootFailureNode
200205
}
201-
$summarySb = BuildTestMarkdownTable -Headers $mdTableHeaders -Rows $mdTableRows -resultIcons $mdTableEmojis
202206
}
207+
$summarySb = BuildTestMarkdownTable -Headers $mdTableHeaders -Rows $mdTableRows -resultIcons $mdTableEmojis
203208
}
204209
if ($totalFailed -gt 0) {
205210
$failuresSummaryMD = "<i>$totalFailed failing tests, download test results to see details</i>"

RELEASENOTES.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Issues
22

3+
- Issue 1678 Test summary is showing too many status icons
34
- Issue 1640 AL1040 error due to app folder within the artifacts cache being incorrectly recognized as an app folder
45
- Issue 1630 Error when downloading a release, when the destination folder already exists.
56
- Issue 1540 and 1649 Apps with dependencies to Microsft\_\_EXCLUDE\_ apps fails deployment

0 commit comments

Comments
 (0)