tests: add the first tests for ViewLocator
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 88/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- csharp
- Ambito
- desktop, testing-qa
Direzione di ricerca
Aggiungi un file di test in tests/LageBuch.Acceptance.Tests/ per src/LageBuch.App.Shared/ViewLocator.cs. Inizia leggendo ViewLocator.cs e NumericInputTests.cs, poi esegui make test PROJECT=tests/LageBuch.Acceptance.Tests FILTER=Name~ViewLocator. Copri il fallback null, il fallback in caso di vista mancante e le asserzioni Match; i test filtrati dovrebbero passare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
src/LageBuch.App.Shared/ViewLocator.cs maps a view model to its view by string
convention: it replaces ViewModel with View in the type name and resolves
that type. Convention-based resolution breaks quietly when a file is renamed,
and there is no test file for it anywhere — the only mention in tests/ is a
passing comment in ForcesTabRenderTests.cs.
What to do
Add a new test file in tests/LageBuch.Acceptance.Tests/ (the only test project
that references LageBuch.App.Shared). Three cheap assertions cover the whole
class:
Build(null)returns aTextBlockwhose text is the em-dash placeholder.Build(x)for anObservableObjectsubclass with no matching view returns a
TextBlockstarting withNicht gefunden:.Matchis true for aCommunityToolkit.Mvvm.ComponentModel.ObservableObject
and false for a plainobject.
The two fallback paths construct a TextBlock only, so a plain [Fact] is
enough and you do not need the Avalonia dispatcher. If you want to also assert
that a real view model resolves to its view, use [AvaloniaFact] and copy the
setup from NumericInputTests.cs in the same project.
Note this project is on xunit.v3 while the other test projects are on v2.
Verify
make test PROJECT=tests/LageBuch.Acceptance.Tests FILTER=Name~ViewLocator
Difficulty: easy.
New here?
Comment to claim this issue and it is yours. If no pull request appears within
seven days it goes back in the pool, no hard feelings.
Before you open the PR, please skim CONTRIBUTING.md:
commits need DCO sign-off (git commit -s) and a Conventional Commit subject.
Changes under src/ additionally need an entry under ## [Unreleased] in
CHANGELOG.md — CI fails the PR otherwise.
Questions are welcome right here or in
Discussions.
- Lingua principale
- C#
- Stelle
- 1
- Fork
- 3
- Merge medio
- 4h 49m
- PR unite (30g)
- 177
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di CodeForFire/lagebuch
-
Stammdaten: in the Checkliste editor the PFLICHT header is not aligned with its columnForse già presa @Saad-elnagar l’ha presa 1 giorno fa. Apertabug ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
CodeForFire/lagebuch#714 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Stammdaten: on a phone the Fahrzeuge editor squeezes Wache and Funkrufname to nothingForse già presa @Saad-elnagar l’ha presa 1 giorno fa. Apertabug ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
CodeForFire/lagebuch#713 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
CodeForFire/lagebuch#405 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
CodeForFire/lagebuch#349 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
CodeForFire/lagebuch#348 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di CodeForFire/lagebuch
Issue simili
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:no-new-fix-pr clawsweeper:not-repro-on-main impact:ux-release-blocker issue-rating: 🦪 silver shellfish P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
openclaw/openclaw-windows-node#1843 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
-
kind:ux size:S type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
elsa-workflows/elsa-foundation#3256 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: Revit selector reads process ids 2000-2099 as years (flaky AgentClientTests.AYearOrAProcessIdSelectsTheHost)Forse già presa @Wurschdhaud l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
pyrevitlabs/pyRevit#3817 ·
I maintainer di solito rispondono entro 1 giorno
-
bug effort:S P2
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
nightscout/nocturne#2449 ·
I maintainer di solito rispondono entro 1 giorno