[DataGrid] Tweak display: flex
and DataGridDisplayMode.Table
#2340
build-core-lib.yml
on: pull_request
Build and Test Core Lib
3m 14s
Build and Deploy Demo site
3m 15s
Close Pull Request Job
0s
Annotations
3 errors and 1 warning
Microsoft.FluentUI.AspNetCore.Components.Tests.DataGrid.FluentDataGridColumSelectTests ► FluentDataGrid_ColumSelect_SingleStickySelect_Rendering:
tests/Core/FluentAssert.cs#L113
Failed test found in:
TestResults/runneradmin_fv-az1258-413_2025-01-12_21_27_39.trx
Error:
Bunit.HtmlEqualException : HTML comparison failed.
The following errors were found:
1: The value of the attribute table(1) > thead(1) > tr(1) > th(1)[class] and actual attribute table(1) > thead(0) > tr(0) > th(0)[class] are different.
2: The value of the attribute table(1) > thead(1) > tr(1) > th(1)[style] and actual attribute table(1) > thead(0) > tr(0) > th(0)[style] are different.
3: The value of the attribute table(1) > thead(1) > tr(1) > th(3)[class] and actual attribute table(1) > thead(0) > tr(0) > th(1)[class] are different.
4: The value of the attribute table(1) > thead(1) > tr(1) > th(3)[style] and actual attribute table(1) > thead(0) > tr(0) > th(1)[style] are different.
Actual HTML:
<table id="xxx" class="fluent-data-grid grid" style="grid-template-columns: 50px auto;" aria-rowcount="4" >
<thead >
<tr class="fluent-data-grid-row" data-row-index="0" role="row" row-type="header" >
<th col-index="1" class="column-header select-all col-justify-center" style="grid-column: 1; text-align: center; align-content: center; padding-top: calc(var(--design-unit) * 2.5px); height: 32px; min-height: 44px;" scope="col" aria-sort="none" ></th>
<th col-index="2" class="column-header col-justify-start" style="grid-column: 2; height: 32px; min-height: 44px;" scope="col" aria-sort="none" >
<div class="col-title" style="width: calc(100% - 20px);" >
<div class="col-title-text" >Name</div>
</div>
</th>
</tr>
</thead>
<tbody >
<tr class="fluent-data-grid-row" data-row-index="2" role="row" aria-rowindex="2" >
<td col-index="1" class="col-justify-center" style="grid-column: 1; text-align: center; align-content: center; padding-inline-start: calc(((var(--design-unit)* 3) + var(--focus-stroke-width) - var(--stroke-width))* 1px); padding-top: calc(var(--design-unit) * 1.5px); height: 32px;" role="gridcell" tabindex="0" >
<svg style="width: 20px; fill: var(--neutral-fill-inverse-rest);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" >
<title>Row unselected</title>
<path d="M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm-8 7a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"></path>
</svg>
</td>
<td col-index="2" class="col-justify-start" style="grid-column: 2; height: 32px;" role="gridcell" tabindex="0" >Jean Martin</td>
</tr>
<tr class="fluent-data-grid-row" data-row-index="3" role="row" aria-rowindex="3" >
<td col-index="1" class="col-justify-center" style="grid-column: 1; text-align: center; align-content: center; padding-inline-start: calc(((var(--design-unit)* 3) + var(--focus-stroke-width) - var(--stroke-width))* 1px); padding-top: calc(var(--design-unit) * 1.5px); height: 32px;" role="gridcell" tabindex="0" >
<svg style="width: 20px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" row-selected="">
<title>Row selected.</title>
<path d="M10 15a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0-13a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-7 8a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z"></path>
</svg>
</td>
<td col-index="2" class="col-justify-start" style="grid-column: 2; height: 32px;" role="gridcell" tabindex="0" >Kenji Sato</td>
</tr>
<tr class="fluent-data-grid-row" data-row-index="4" role="row" aria-rowindex="4" >
<td col-index="1" class="col-justify-center" style="grid-column: 1; text-align: center; align-content: center; padding-inline-start: calc(((var(--design-unit)* 3) + var(--focus-stroke-width) - var(--stroke-width))* 1px); padding-top: calc(var(--design-unit) * 1.5px); height: 32px;" role="gridcell" tabindex="0" >
<svg style="width: 20px; fill: var(--neutral-fill-inverse-rest);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" >
<title>Row unselected</title>
<path d="M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm-8 7a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"></path>
</svg>
</td>
<td col-index="2" class="col-justify-start" style="grid-column: 2; height: 32px;" role="gridcell" tabindex="0" >Julie Smith</td>
</tr>
</tbody>
</table>
Expected HTML:
<table id="xxx" class="fluent-data-grid grid" style="grid-template-columns: 50px auto;" aria-rowcount="4" >
<thead >
<tr class="fluent-data-grid-row" data-row-index="0" role="row" row-type="header" >
<th col-index="1" class="column-header select-all col-justify-center col-sort-desc" style="grid-column: 1; text-align: center; align-content: center; padding-top: calc(var(--design-unit) * 2.5px); height: 32px; min-height: 44px; display: flex;" scope="col" aria-sort="none" ></th>
<th col-index="2" class="column-header col-justify-start col-sort-desc" style="grid-column: 2; height: 32px; min-height: 44px; display: flex;" scope="col" aria-sort="none" >
<div class="col-title" style="width: calc(100% - 20px);" >
<div class="col-title-text" >Name</div>
</div>
</th>
</tr>
</thead>
<tbody >
<tr class="fluent-data-grid-row" data-row-index="2" role="row" aria-rowindex="2" >
<td col-index="1" class="col-justify-center" style="grid-column: 1; text-align: center; align-content: center; padding-inline-start: calc(((var(--design-unit)* 3) + var(--focus-stroke-width) - var(--stroke-width))* 1px); padding-top: calc(var(--design-unit) * 1.5px); height: 32px;" role="gridcell" tabindex="0" >
<svg style="width: 20px; fill: var(--neutral-fill-inverse-rest);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" >
<title>Row unselected</title>
<path d="M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm-8 7a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"></path>
</svg>
</td>
<td col-index="2" class="col-justify-start" style="grid-column: 2; height: 32px;" role="gridcell" tabindex="0" >Jean Martin</td>
</tr>
<tr class="fluent-data-grid-row" data-row-index="3" role="row" aria-rowindex="3" >
<td col-index="1" class="col-justify-center" style="grid-column: 1; text-align: center; align-content: center; padding-inline-start: calc(((var(--design-unit)* 3) + var(--focus-stroke-width) - var(--stroke-width))* 1px); padding-top: calc(var(--design-unit) * 1.5px); height: 32px;" role="gridcell" tabindex="0" >
<svg style="width: 20px; fill: var(--accent-fill-rest);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" row-selected="">
<title>Row selected.</title>
<path d="M10 15a5 5 0 1 0 0-10 5 5 0 0 0 0 10Zm0-13a8 8 0 1 0 0 16 8 8 0 0 0 0-16Zm-7 8a7 7 0 1 1 14 0 7 7 0 0 1-14 0Z"></path>
</svg>
</td>
<td col-index="2" class="col-justify-start" style="grid-column: 2; height: 32px;" role="gridcell" tabindex="0" >Kenji Sato</td>
</tr>
<tr class="fluent-data-grid-row" data-row-index="4" role="row" aria-rowindex="4" >
<td col-index="1" class="col-justify-center" style="grid-column: 1; text-align: center; align-content: center; padding-inline-start: calc(((var(--design-unit)* 3) + var(--focus-stroke-width) - var(--stroke-width))* 1px); padding-top: calc(var(--design-unit) * 1.5px); height: 32px;" role="gridcell" tabindex="0" >
<svg style="width: 20px; fill: var(--neutral-fill-inverse-rest);" focusable="false" viewBox="0 0 20 20" aria-hidden="true" >
<title>Row unselected</title>
<path d="M10 3a7 7 0 1 0 0 14 7 7 0 0 0 0-14Zm-8 7a8 8 0 1 1 16 0 8 8 0 0 1-16 0Z"></path>
</svg>
</td>
<td col-index="2" class="col-justify-start" style="grid-column: 2; height: 32px;" role="gridcell" tabindex="0" >Julie Smith</td>
</tr>
</tbody>
</table>
|
Microsoft.FluentUI.AspNetCore.Components.Tests.DataGrid.FluentDataGridTests ► FluentDataGrid_With_ItemProvider_And_Uncontrolled_Loading_Starts_Loading:
tests/Core/DataGrid/FluentDataGridTests.razor#L126
Failed test found in:
TestResults/runneradmin_fv-az1258-413_2025-01-12_21_27_39.trx
Error:
Bunit.Extensions.WaitForHelpers.WaitForFailedException : The state predicate did not pass before the timeout period passed. Check count: 0. Component render count: 1. Total render count: 1.
|
Build and Test Core Lib
Process completed with exit code 1.
|
Build and Deploy Demo site
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
|