tests: add the first tests for ViewLocator
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- csharp
- Área
- desktop, testing-qa
Línea de trabajo
Añade un archivo de pruebas en tests/LageBuch.Acceptance.Tests/ para src/LageBuch.App.Shared/ViewLocator.cs. Empieza leyendo ViewLocator.cs y NumericInputTests.cs y, después, ejecuta make test PROJECT=tests/LageBuch.Acceptance.Tests FILTER=Name~ViewLocator. Cubre el fallback de null, el fallback cuando falta la vista y las aserciones de Match; las pruebas filtradas deberían pasar.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C#
- Estrellas
- 1
- Forks
- 3
- Merge medio
- 4 h 34 min
- PR fusionados (30 d)
- 182
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de CodeForFire/lagebuch
-
bug ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CodeForFire/lagebuch#714 ·
Los mantenedores suelen responder en 1 día
-
bug ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
CodeForFire/lagebuch#713 ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
CodeForFire/lagebuch#405 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
CodeForFire/lagebuch#349 ·
Los mantenedores suelen responder en 1 día
-
documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
CodeForFire/lagebuch#348 ·
Los mantenedores suelen responder en 1 día
Todos los issues de CodeForFire/lagebuch
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
KnifeLemon/Filee#363 ·
Los mantenedores suelen responder en 1 día
-
[CI] .trgen-ignore required for several grammars.Posiblemente ocupada @kaby76 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
antlr/grammars-v4#5073 ·
Los mantenedores suelen responder en 1 día
-
/api/oauth/introspect emits clientId and tokenType instead of RFC 7662's client_id and token_typeAbiertobug P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nightscout/nocturne#2317 ·
Los mantenedores suelen responder en 1 día
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderPosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
joinrpg/joinrpg-net#5752 ·
Los mantenedores suelen responder en 1 día