CommunityToolkit / CommunityToolkit/Windows

Primitives tests failing in Visual Studio but not in CI

Aperta
#662 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
bug components::controls::primitives regression testing 🏗
Lingua principale
C#
Stelle
1.1k
Fork
166
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Describe the bug

This was found while investigating [Fix: DockPanel measure fix #618](https://github.com/CommunityToolkit/Windows/pull/618)

The tests in Primitives are failing when run in Visual Studio, but not when run in CI.

```
Message: 
Test method PrimitivesTests.Test_WrapPanel_BasicLayout.Test_WrapPanel_Normal_Horizontal threw exception:
Microsoft.UI.Xaml.Markup.XamlParseException: The text associated with this error code could not be found.

The type 'WrapPanel' was not found. [Line: 5 Position: 25]

Stack Trace: 
ExceptionHelpers.g__Throw|38_0(Int32 hr)
ExceptionHelpers.ThrowExceptionForHR(Int32 hr)
IXamlReaderStaticsMethods.Load(IObjectReference _obj, String xaml)
XamlReader.Load(String xaml)
Test_WrapPanel_BasicLayout.b__0_0()
<b__1>d.MoveNext()
--- End of stack trace from previous location ---
Test_WrapPanel_BasicLayout.Test_WrapPanel_Normal_Horizontal()
ThreadOperations.ExecuteWithAbortSafety(Action action)

```

### Steps to reproduce

```text
1. Open Primitives in the single-component solution using `./tooling/GenerateSingleSolution.ps1 -c Primitives`
2. Run the unit tests in Visual Studio and observe the failure
```

### Expected behavior

Tests that were passing in the past should pass now.

### Screenshots

![Image](https://github.com/user-attachments/assets/65fa71e6-2d3e-4bca-9cbb-e9d4be9448bb)

### Code Platform

- [ ] UWP
- [ ] WinAppSDK / WinUI 3
- [ ] Web Assembly (WASM)
- [ ] Android
- [ ] iOS
- [ ] MacOS
- [ ] Linux / GTK

### Windows Build Number

- [ ] Windows 10 1809 (Build 17763)
- [ ] Windows 10 1903 (Build 18362)
- [ ] Windows 10 1909 (Build 18363)
- [ ] Windows 10 2004 (Build 19041)
- [ ] Windows 10 20H2 (Build 19042)
- [ ] Windows 10 21H1 (Build 19043)
- [ ] Windows 10 21H2 (Build 19044)
- [ ] Windows 10 22H2 (Build 19045)
- [ ] Windows 11 21H2 (Build 22000)
- [ ] Other (specify)

### Other Windows Build number

_No response_

### App minimum and target SDK version

- [ ] Windows 10, version 1809 (Build 17763)
- [ ] Windows 10, version 1903 (Build 18362)
- [ ] Windows 10, version 1909 (Build 18363)
- [ ] Windows 10, version 2004 (Build 19041)
- [ ] Windows 10, version 2104 (Build 20348)
- [ ] Windows 11, version 22H2 (Build 22000)
- [ ] Other (specify)

### Other SDK version

_No response_

### Visual Studio Version

_No response_

### Visual Studio Build Number

_No response_

### Device form factor

_No response_

### Additional context

_No response_

### Help us help you

Yes, I'd like to be assigned to work on this item.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia generando la soluzione a componente singolo di Primitives con ./tooling/GenerateSingleSolution.ps1 -c Primitives, quindi esegui i test di Primitives in Visual Studio e confrontali con CI. Concentrati sul fallimento Test_WrapPanel_BasicLayout.Test_WrapPanel_Normal_Horizontal, in cui WrapPanel non viene trovato. Il lavoro è completato quando i test di Primitives passano localmente come in CI.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
testing-qa
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.